ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jack J. Woehr" <...@purematrix.com>
Subject Number of Args to Java Task
Date Mon, 21 Jan 2002 22:18:04 GMT
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



Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message