Move xml and xsl into own sub-module pmd-xml

This commit is contained in:
Andreas Dangel
2014-10-04 19:06:41 +02:00
parent d2a7bc85f1
commit 36dd58a4ab
31 changed files with 142 additions and 20 deletions

View File

@ -11,7 +11,6 @@ import static org.junit.Assert.assertTrue;
import net.sourceforge.pmd.lang.ParserOptions;
import net.sourceforge.pmd.lang.ecmascript.rule.AbstractEcmascriptRule;
import net.sourceforge.pmd.lang.rule.properties.BooleanProperty;
import net.sourceforge.pmd.lang.xml.XmlParserOptions;
import org.junit.Test;
@ -55,28 +54,14 @@ public class EcmascriptParserOptionsTest {
@Test
public void testSetters() {
XmlParserOptions options = new XmlParserOptions();
EcmascriptParserOptions options = new EcmascriptParserOptions();
options.setSuppressMarker("foo");
assertEquals("foo", options.getSuppressMarker());
options.setSuppressMarker(null);
assertNull(options.getSuppressMarker());
options.setCoalescing(true);
assertTrue(options.isCoalescing());
options.setCoalescing(false);
assertFalse(options.isCoalescing());
options.setExpandEntityReferences(true);
assertTrue(options.isExpandEntityReferences());
options.setExpandEntityReferences(false);
assertFalse(options.isExpandEntityReferences());
options.setIgnoringComments(true);
assertTrue(options.isIgnoringComments());
options.setIgnoringComments(false);
assertFalse(options.isIgnoringComments());
}
@Test
public void testEqualsHashcode() throws Exception {
BooleanProperty[] properties = new BooleanProperty[] { EcmascriptParserOptions.RECORDING_COMMENTS_DESCRIPTOR,

137
pmd-xml/pom.xml Normal file
View File

@ -0,0 +1,137 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>pmd-xml</artifactId>
<name>PMD XML and XSL</name>
<parent>
<groupId>net.sourceforge.pmd</groupId>
<artifactId>pmd-aggregate</artifactId>
<version>5.1.4-SNAPSHOT</version>
</parent>
<build>
<plugins>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<configuration>
<useDefaultDelimiters>false</useDefaultDelimiters>
<delimiters>
<delimiter>${*}</delimiter>
</delimiters>
</configuration>
</plugin>
<!-- As Clover can be quite an hassle, know that you can skip
it by using the following option when running mvn: $ mvn clean -Dmaven.clover.skip=true
site -->
<plugin>
<groupId>com.atlassian.maven.plugins</groupId>
<artifactId>maven-clover2-plugin</artifactId>
<configuration>
<jdk>${java.version}</jdk>
<licenseLocation>${basedir}/../pmd/licences/clover2.license</licenseLocation>
</configuration>
<executions>
<execution>
<phase>pre-site</phase>
<goals>
<goal>instrument</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>net.sourceforge.pmd</groupId>
<artifactId>pmd</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>net.sourceforge.pmd</groupId>
<artifactId>pmd-test</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant-testutil</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>jaxen</groupId>
<artifactId>jaxen</artifactId>
<exclusions>
<exclusion>
<artifactId>xercesImpl</artifactId>
<groupId>xerces</groupId>
</exclusion>
<exclusion>
<artifactId>xalan</artifactId>
<groupId>xalan</groupId>
</exclusion>
<exclusion>
<artifactId>icu4j</artifactId>
<groupId>com.ibm.icu</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.beust</groupId>
<artifactId>jcommander</artifactId>
</dependency>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
</dependency>
<dependency>
<groupId>net.sourceforge.saxon</groupId>
<artifactId>saxon</artifactId>
</dependency>
<dependency>
<groupId>net.sourceforge.saxon</groupId>
<artifactId>saxon</artifactId>
<classifier>dom</classifier>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
<type>jar</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>net.java.dev.javacc</groupId>
<artifactId>javacc</artifactId>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,2 @@
net.sourceforge.pmd.lang.xml.XmlLanguageModule
net.sourceforge.pmd.lang.xsl.XslLanguageModule

View File

@ -16,7 +16,6 @@ import net.sourceforge.pmd.RuleContext;
import net.sourceforge.pmd.lang.LanguageRegistry;
import net.sourceforge.pmd.lang.Parser;
import net.sourceforge.pmd.lang.ast.Node;
import net.sourceforge.pmd.lang.java.JavaLanguageModule;
import net.sourceforge.pmd.lang.xml.XmlLanguageModule;
import net.sourceforge.pmd.lang.xml.XmlParserOptions;
import net.sourceforge.pmd.lang.xml.ast.XmlNode;

View File

@ -1,5 +1,3 @@
net.sourceforge.pmd.lang.fortran.FortranLanguageModule
net.sourceforge.pmd.lang.php.PhpLanguageModule
net.sourceforge.pmd.lang.ruby.RubyLanguageModule
net.sourceforge.pmd.lang.xml.XmlLanguageModule
net.sourceforge.pmd.lang.xsl.XslLanguageModule

Some files were not shown because too many files have changed in this diff Show More