It would be usefull to add <fileset> to <arg>, I see a case where you would use this feature. For example if you like to pass all the files with **/*.java or **/*.sqlj to the argument for execution you would use something like this (See last section): ----------------------------------------------------- <java classname="sqlj.tools.Sqlj"> <arg value="-linemap=0"/> <arg value="-user="/> <arg value="-status=1"/> <arg value="-compile=0"/> <arg value="-explain=1"/> <arg value="-warn=all"/> <arg value="-d=${build.temp.translated_sqlj}"/> <arg value="-dir=${build.temp.translated_sqlj}"/> <arg> <fileset dir="${cc.src}" casesensitive="yes" > <patternset> <include name="**/*.sqlj"/> <include name="**/*.java"/> </patternset> </fileset> </arg> </java> ----------------------------------- Another feature to add is a directory finder tag that works with <arg> for finding directories that contains certain files such as **/*.sqlj or **/*.java and include the path directory plus the "*.java" or "*.sqlj" (Just the wildcard "*.java", not replacing "*" with the actual file names). See example: -------------------------------------- My src/com/sun/tools/ directory has java files. The new directory finder tag would add "src/com/sun/tools/*.java" to the command line argument. If the directory doesn't have *.java files then it'll be excluded. Let's make adding "*.java" an optional argrument to the <directoryfinder>. here's an example: <arg> <directoryfinder appendExtension="yes"> <include name="**/*.sqlj"/> <include name="**/*.java"/> </directoryfinder> <arg> The result for the arg would look something like this: All results are in one line and seperated by space, we should customize the delimeters. e.x. "src/com/sun/tools/*.java src/com/sun/tools/ext/*.sqlj ..." -------------------------------------- - Benjamin
I really feel this is pushing the limits of what <java> should provide rather than encouraging folks to write wrapper Ant tasks for the Java programs they invoke. Its quite easy to write a wrappter task which can provide all of these facilities.
I suspect what you're looking for is a <sqlj> task. One was posted to ant-user: http://marc.theaimsgroup.com/?l=ant-user&m=98691896600862&w=2 In case that doesn't do what you want, there are also a number of examples of targets using the <apply> task (just search the archive for 'sqlj').
Would that need a change to the Java Task that uses <ARG> if new feature are added to the <ARG>? I was thinking that this would be transparent to tasks that uses <arg> task. -Benjamin Excellent! I was on the progress of writing the task for SQLJ. I had to make some modifications to the sqljTask.java you referred. I changed to add *.java files to the sqlj translator, because some .sqlj refers to .java files as host variables, so those .java files had to be included in order for sqlj to translate it without error. Thanks! Benjamin Chi
mixed RFEs again: Q: directoryfinder A: custom file selector Q: adding fileset to arg A: WONTFIX