I'd like to make a Java executor target to unit execute code within our byzantine
classpath.
However, if I do:
<target description="Execute in Java a specific unit, i.e., a main() routine of a
class file." if="unitexec.mainclass" name="unitexec">
<java classname="${unitexec.mainclass}" classpathref="library.classpath.unitexec">
<arg value="${unitexec.arg1}"/>
<arg value="${unitexec.arg2}"/>
<arg value="${unitexec.arg3}"/>
</java>
</target>
and those args aren't present, of course I have trouble with some classes, null args.
How do I make a target that can
accept (via properties) a varying number of <arg> elements to the Java task so I can
say:
ant -Dunitexec.mainclass="com.foo.Main" -Dunitexec.arg1="arf" unitexec
ant -Dunitexec.mainclass="com.bar.Main" -Dunitexec.arg1="woof"
-Dunitexec.arg2="fred" unitexec
... etc., please?
--
Jack J. Woehr # We have but one choice: the path of secular
Senior Consultant # humanism, based upon the principles of
Purematrix, Inc. # logic and reason. - Prof.Pervez Hoodbhoy,
www.purematrix.com # Quaid-e-Azam University in Islamabad