You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@velocity.apache.org by wg...@apache.org on 2007/03/13 07:12:13 UTC
svn commit: r517555 - /velocity/engine/trunk/build/build.xml
Author: wglass
Date: Mon Mar 12 23:12:12 2007
New Revision: 517555
URL: http://svn.apache.org/viewvc?view=rev&rev=517555
Log:
cleanup extra files after javacc task is run. This allows the user to type "ant parser" and "ant compile" with no manual steps.
Modified:
velocity/engine/trunk/build/build.xml
Modified: velocity/engine/trunk/build/build.xml
URL: http://svn.apache.org/viewvc/velocity/engine/trunk/build/build.xml?view=diff&rev=517555&r1=517554&r2=517555
==============================================================================
--- velocity/engine/trunk/build/build.xml (original)
+++ velocity/engine/trunk/build/build.xml Mon Mar 12 23:12:12 2007
@@ -291,7 +291,7 @@
<!-- =================================================================== -->
<!-- rebuilds the JJTree/JavaCC based parser -->
<!-- =================================================================== -->
- <target name="parser" depends="parser-check,jjtree,javacc"
+ <target name="parser" depends="parser-check,jjtree,javacc,javacc-cleanup"
description="Rebuilds the JJTree/JavaCC based parser" />
<target name="parser-check">
@@ -311,10 +311,15 @@
<and>
<available file="${javacc.home}" type="dir"/>
- <!-- include a list of acceptable ant versions here -->
- <or>
- <contains string="${ant.version}" substring="1.6"/>
- </or>
+ <!-- specify ant versions in the negative, to allow future upgrades-->
+ <not>
+ <or>
+ <contains string="${ant.version}" substring="1.2"/>
+ <contains string="${ant.version}" substring="1.3"/>
+ <contains string="${ant.version}" substring="1.4"/>
+ <contains string="${ant.version}" substring="1.5"/>
+ </or>
+ </not>
</and>
</condition>
@@ -322,7 +327,7 @@
Could not run javacc:
***********************************************************
**
- ** JavaCC 3.1 or later must be installed at ${javacc.home}.
+ ** JavaCC 3.2 or later must be installed at ${javacc.home}.
** Ant must be at least version 1.6.x.
**
***********************************************************
@@ -364,6 +369,15 @@
outputdirectory="${build.parser}"
javacchome="${javacc.home}" />
</target>
+
+ <target name="javacc-cleanup" depends="parser-check">
+ <delete>
+ <fileset dir="${src.java.dir}/org/apache/velocity/runtime/parser/">
+ <include name="Node.java"/>
+ <include name="ParserVisitor.java"/>
+ </fileset>
+ </delete>
+ </target>
<!-- ================================================================ -->
<!-- Gets the classes we need from the various support jars -->