Add xml-maven-plugin to check indentation and fix violations

Motivation:

See https://github.com/netty/netty-build/issues/5

Modifications:

Add xml-maven-plugin to check indentation and fix violations

Result:
pom.xml will be checked in the PR build
This commit is contained in:
Xiaoyan Lin 2016-02-26 19:02:35 -08:00 committed by Norman Maurer
parent 4fad9e89f2
commit 57cebc7f5b
5 changed files with 57 additions and 32 deletions

View File

@ -305,7 +305,7 @@
</patternset> </patternset>
</unzip> </unzip>
<concat destfile="${project.build.outputDirectory}/META-INF/${project.groupId}.versions.properties" append="true"> <concat destfile="${project.build.outputDirectory}/META-INF/${project.groupId}.versions.properties" append="true">
<path path="${dependencyVersionsDir}/META-INF/${project.groupId}.versions.properties" /> <path path="${dependencyVersionsDir}/META-INF/${project.groupId}.versions.properties" />
</concat> </concat>
</sequential> </sequential>
</for> </for>
@ -377,14 +377,14 @@
<goals> <goals>
<goal>jar</goal> <goal>jar</goal>
</goals> </goals>
<configuration> <configuration>
<archive> <archive>
<manifest> <manifest>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries> <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
</manifest> </manifest>
<index>true</index> <index>true</index>
</archive> </archive>
</configuration> </configuration>
</execution> </execution>
</executions> </executions>
</plugin> </plugin>

View File

@ -73,9 +73,9 @@
<exclude>**/AbstractMicrobenchmark.java</exclude> <exclude>**/AbstractMicrobenchmark.java</exclude>
<exclude>**/*$*.class</exclude> <exclude>**/*$*.class</exclude>
</excludes> </excludes>
<systemPropertyVariables> <systemPropertyVariables>
<perfReportDir>${project.build.directory}/reports/performance/</perfReportDir> <perfReportDir>${project.build.directory}/reports/performance/</perfReportDir>
</systemPropertyVariables> </systemPropertyVariables>
</configuration> </configuration>
</plugin> </plugin>
</plugins> </plugins>

43
pom.xml
View File

@ -434,7 +434,7 @@
<artifactId>jboss-marshalling-serial</artifactId> <artifactId>jboss-marshalling-serial</artifactId>
<version>${jboss.marshalling.version}</version> <version>${jboss.marshalling.version}</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.jboss.marshalling</groupId> <groupId>org.jboss.marshalling</groupId>
<artifactId>jboss-marshalling-river</artifactId> <artifactId>jboss-marshalling-river</artifactId>
@ -573,12 +573,12 @@
<artifactId>animal-sniffer-maven-plugin</artifactId> <artifactId>animal-sniffer-maven-plugin</artifactId>
<version>1.9</version> <version>1.9</version>
<dependencies> <dependencies>
<!-- Upgrade ASM and support Java 8 bytecode --> <!-- Upgrade ASM and support Java 8 bytecode -->
<dependency> <dependency>
<groupId>org.ow2.asm</groupId> <groupId>org.ow2.asm</groupId>
<artifactId>asm-all</artifactId> <artifactId>asm-all</artifactId>
<version>5.0.3</version> <version>5.0.3</version>
</dependency> </dependency>
</dependencies> </dependencies>
<configuration> <configuration>
<signature> <signature>
@ -659,6 +659,31 @@
</dependency> </dependency>
</dependencies> </dependencies>
</plugin> </plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>xml-maven-plugin</artifactId>
<version>1.0.1</version>
<executions>
<execution>
<id>check-style</id>
<goals>
<goal>check-format</goal>
</goals>
<phase>validate</phase>
</execution>
</executions>
<configuration>
<formatFileSets>
<formatFileSet>
<directory>${project.basedir}</directory>
<includes>
<include>**/pom.xml</include>
</includes>
</formatFileSet>
</formatFileSets>
<useDefaultFormatFileSet>false</useDefaultFormatFileSet>
</configuration>
</plugin>
<!-- Download the npn-boot.jar in advance to add it to the boot classpath. --> <!-- Download the npn-boot.jar in advance to add it to the boot classpath. -->
<plugin> <plugin>
<artifactId>maven-dependency-plugin</artifactId> <artifactId>maven-dependency-plugin</artifactId>
@ -681,8 +706,8 @@
<artifactId>maven-surefire-plugin</artifactId> <artifactId>maven-surefire-plugin</artifactId>
<configuration> <configuration>
<includes> <includes>
<include>**/*Test*.java</include> <include>**/*Test*.java</include>
<include>**/*Benchmark*.java</include> <include>**/*Benchmark*.java</include>
</includes> </includes>
<excludes> <excludes>
<exclude>**/Abstract*</exclude> <exclude>**/Abstract*</exclude>

View File

@ -161,12 +161,12 @@
<groupId>org.ops4j.pax.exam</groupId> <groupId>org.ops4j.pax.exam</groupId>
<artifactId>maven-paxexam-plugin</artifactId> <artifactId>maven-paxexam-plugin</artifactId>
<executions> <executions>
<execution> <execution>
<id>generate-config</id> <id>generate-config</id>
<goals> <goals>
<goal>generate-depends-file</goal> <goal>generate-depends-file</goal>
</goals> </goals>
</execution> </execution>
</executions> </executions>
</plugin> </plugin>
<plugin> <plugin>

View File

@ -34,11 +34,11 @@
<artifactId>netty-buffer</artifactId> <artifactId>netty-buffer</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>${project.groupId}</groupId> <groupId>${project.groupId}</groupId>
<artifactId>netty-codec</artifactId> <artifactId>netty-codec</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>${project.groupId}</groupId> <groupId>${project.groupId}</groupId>
<artifactId>netty-transport</artifactId> <artifactId>netty-transport</artifactId>