Hi all, I am writing you because while checking the ANT mailing list archives I saw that you were interested in JavaCC related tasks for ANT.
Since running JJTree and JavaCC are time consuming my main problem is running them only if the source grammar file was touched. While you can get this quite easily with a classic make utility, there is no support for this in ANT. Do you have a solution for this? The way I run JavaCC is by using a "java" task to run the main applications directly: <target name="jjdoc" depends="jj"> <java classname="COM.sun.labs.jjdoc.JJDocMain" args="-OUTPUT_FILE=Doc/grammar.html java.jj" fork="yes"/> </target> <target name="jj" depends="jjt"> <java classname="COM.sun.labs.javacc.Main" args="-OUTPUT_DIRECTORY=Source/parser java.jj" fork="yes"/> </target> <target name="jjt"> <java classname="COM.sun.labs.jjtree.Main" args="-OUTPUT_DIRECTORY=Source/parser java.jjt" fork="yes"/> <rename src="Source/parser/java.jj" dest="java.jj"/> </target> This will work assuming that JavaCC.zip is in your class path. To solve the time stamp based conditional task run I was thinking to create a generic task that will add a property based on time stamp comparison between two sets of files, the inputs and outputs to some other task. This other task/targets could then be run only if this property is set. Please let me know if all this makes sense in your opinion. Cheers, Marius
