ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jacob Kjome <h...@visi.com>
Subject Re: ant trgjava 12
Date Sat, 24 May 2003 13:20:00 GMT

Well, you could do that if you had...

<target name="12">
....
</target>

However, why not do...

<target name="-choseid" unless="id">
     <input message="please enter your id: " addproperty="id" />
</target>

<target name="run" depends="-choseid">
   <exec ....>
      <arg line="${id}"/>
   </exec>
</target>

And call...
ant run

if you want to skip the prompt, then do...

ant run -Did=12


Jake

At 03:14 PM 5/24/2003 +0530, you wrote:
>Idea was to provide the simplest way to the developers
>to test their forms. We have many forms each having
>an ID. So if I say "ant test 12" then it starts the testing
>of form that has id 12. But now it seems that I need to
>settle at least with using it like "ant test -Did=12".
>Right! The whole idea was to convert "ant test -Did=12"
>to "ant test 12". Thanks for your comments.
>
>
>
>
>----- Original Message -----
>From: "Erik Hatcher" <jakarta-ant@ehatchersolutions.com>
>To: "Ant Users List" <user@ant.apache.org>
>Sent: Saturday, May 24, 2003 2:58 PM
>Subject: Re: ant trgjava 12
>
>
>| Let me get this straight.... you want to pass an _argument_ to your
>| Java program, but you don't want to use _<arg>_?
>|
>| May I ask why that constraint?
>|
>| To pass a parameter from the command-line of ant:
>|
>| ant trgjava -Darg=12
>|
>| Then use:
>|
>| <arg line="${arg}"/>
>|
>| nested within <java>.
>|
>| What's wrong with that?
>|
>| Erik
>|
>| On Saturday, May 24, 2003, at 05:00  AM, D Bamud wrote:
>| > I want to give argument values to java task in one of my target. In
>| > nutshell I want to fire "ant
>| > trgjava 12" at DOS prompt. 12 will go as the first argument to my
>| > program executed by the java task
>| > in trgjava target. How to do this. (Note I do not want to use <arg>
>| > attribute).
>| >
>| >
>| > ---------------------------------------------------------------------
>| > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>| > For additional commands, e-mail: user-help@ant.apache.org
>| >
>|
>|
>| ---------------------------------------------------------------------
>| To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>| For additional commands, e-mail: user-help@ant.apache.org
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>For additional commands, e-mail: user-help@ant.apache.org

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