Modified Maven script to build from the JJTree.

git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@202 51baf565-9d33-0410-a72c-fc3788e3496d
This commit is contained in:
David Dixon-Peugh
2002-07-03 17:47:12 +00:00
parent 6d96b6a2e9
commit a57743119f
3 changed files with 58 additions and 1 deletions

50
pmd/pmd.xml Normal file
View File

@ -0,0 +1,50 @@
<?xml version="1.0"?>
<!--
pmd.xml
This is a Maven Callback Build File. It will
build the Parser again, if needed. As well, it
will update documents on the Build Site.
-->
<project name="pmd">
<target name="pre-build"
depends="JavaCC" />
<target name="checkJJTree">
<uptodate property="jjTree.notRequired"
srcfile="etc/Java1.4-c.jjt"
targetfile="src/net/sourceforge/pmd/ast/Java1.4-c.jj" />
</target>
<target name="jjTree"
depends="checkJJTree"
unless="jjTree.notRequired">
<fail message="javacc.home must be set."
unless="javacc.home" />
<jjtree target="etc/Java1.4-c.jjt"
outputdirectory="src/net/sourceforge/pmd/ast/"
javacchome="${javacc.home}" />
</target>
<target name="checkJavaCC"
depends="jjTree">
<uptodate property="javaCC.notRequired"
srcfile="src/net/sourceforge/pmd/ast/Java1.4-c.jj"
targetfile="src/net/sourceforge/pmd/ast/JavaParser.java" />
</target>
<target name="JavaCC"
depends="checkJavaCC"
unless="javaCC.notRequired">
<fail message="javacc.home must be set."
unless="javacc.home" />
<javacc target="src/net/sourceforge/pmd/ast/Java1.4-c.jj"
outputdirectory="src/net/sourceforge/pmd/ast/"
javacchome="${javacc.home}" />
</target>
</project>

7
pmd/project.properties Normal file
View File

@ -0,0 +1,7 @@
#
# Project Properties - Change this file to match your
# environment.
#
maven.core.callback.pre-compile.buildFile=pmd.xml
maven.core.callback.pre-compile.buildTarget=pre-build

View File

@ -93,7 +93,7 @@ PMD scans Java source code and looks for potential problems:
<contributors>
<contributor>
<name>Damian O'Neill</name>
<name>Damian ONeill</name>
</contributor>
</contributors>