Implement clean for generated xdocs

This commit is contained in:
Andreas Dangel 2014-10-12 19:50:25 +02:00
parent 64f9b04811
commit c714a7da87
7 changed files with 116 additions and 5 deletions

View File

@ -63,6 +63,23 @@
<goal>run</goal>
</goals>
</execution>
<execution>
<id>pmd-clean</id>
<phase>clean</phase>
<configuration>
<target>
<echo>PMD specific tasks: cleaning generated xdocs</echo>
<delete quiet="true">
<fileset dir="${basedir}/src/site/xdoc/rules/" includes="**/*.xml" />
<fileset dir="${basedir}/src/site/xdoc/" includes="mergedruleset.xml" />
<fileset dir="${basedir}/src/site/" includes="site.xml" />
</delete>
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>

View File

@ -50,6 +50,30 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>pmd-clean</id>
<phase>clean</phase>
<configuration>
<target>
<echo>PMD specific tasks: cleaning generated xdocs</echo>
<delete quiet="true">
<fileset dir="${basedir}/src/site/xdoc/rules/" includes="**/*.xml" />
<fileset dir="${basedir}/src/site/xdoc/" includes="mergedruleset.xml" />
<fileset dir="${basedir}/src/site/" includes="site.xml" />
</delete>
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>

View File

@ -52,6 +52,23 @@
<goal>run</goal>
</goals>
</execution>
<execution>
<id>pmd-clean</id>
<phase>clean</phase>
<configuration>
<target>
<echo>PMD specific tasks: cleaning generated xdocs</echo>
<delete quiet="true">
<fileset dir="${basedir}/src/site/xdoc/rules/" includes="**/*.xml" />
<fileset dir="${basedir}/src/site/xdoc/" includes="mergedruleset.xml" />
<fileset dir="${basedir}/src/site/" includes="site.xml" />
</delete>
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>

View File

@ -52,6 +52,23 @@
<goal>run</goal>
</goals>
</execution>
<execution>
<id>pmd-clean</id>
<phase>clean</phase>
<configuration>
<target>
<echo>PMD specific tasks: cleaning generated xdocs</echo>
<delete quiet="true">
<fileset dir="${basedir}/src/site/xdoc/rules/" includes="**/*.xml" />
<fileset dir="${basedir}/src/site/xdoc/" includes="mergedruleset.xml" />
<fileset dir="${basedir}/src/site/" includes="site.xml" />
</delete>
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>

View File

@ -52,6 +52,23 @@
<goal>run</goal>
</goals>
</execution>
<execution>
<id>pmd-clean</id>
<phase>clean</phase>
<configuration>
<target>
<echo>PMD specific tasks: cleaning generated xdocs</echo>
<delete quiet="true">
<fileset dir="${basedir}/src/site/xdoc/rules/" includes="**/*.xml" />
<fileset dir="${basedir}/src/site/xdoc/" includes="mergedruleset.xml" />
<fileset dir="${basedir}/src/site/" includes="site.xml" />
</delete>
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>

View File

@ -50,6 +50,30 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>pmd-clean</id>
<phase>clean</phase>
<configuration>
<target>
<echo>PMD specific tasks: cleaning generated xdocs</echo>
<delete quiet="true">
<fileset dir="${basedir}/src/site/xdoc/rules/" includes="**/*.xml" />
<fileset dir="${basedir}/src/site/xdoc/" includes="mergedruleset.xml" />
<fileset dir="${basedir}/src/site/" includes="site.xml" />
</delete>
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>

View File

@ -267,11 +267,6 @@
<java.version>1.6</java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<!-- This value actually differs to maven default expectation(src/site/xdoc/)
as we need to pre process those and we place them instead in target/generated-xdocs/.
If the xdocs files stay in src/site/xdoc/, mvn tries to copy over the generated
one, and complains... -->
<src.xdocs.dir>src/site/xdocs</src.xdocs.dir>
<pmd.website.baseurl>http://pmd.sourceforge.net/snapshot/${project.artifactId}</pmd.website.baseurl>
<config.basedir>${basedir}/pmd</config.basedir>