ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claudio Corsi <cco...@progress.com>
Subject Re: multiple args to java task
Date Mon, 20 Oct 2003 18:05:17 GMT
Amit,

I have not followed this thread and you will forgive me if I might be 
asking the same questions again.

Are these jar files known when processing the build, i.e., you know that 
  a.jar, b.jar, etc will be created?

Does each developer require to run a different set of jar files?

If the answer is yes to both of the previous question then why not 
create a target that expects you to define a property that is used with 
the task. You can also us depend to determine if the property is define 
and generate an error if it is not.

For instance,

<target name="command" depends="verify">

    <java ...>
       <arg line="${arg.line}" />
    </java>

</target>

<target name="verify">

   <fail message="The arg.line property needs to be defined"
         unless="arg.line" />

</target>

You can then create a target that will call the command target for each 
of the targeted jar files.

You can also have the developer set the arg.line property by using the 
-D option but this is painful when you need to run the command for a 
large list of jar files.


Ciramella, EJ wrote:

> I'm sure you could do a similar thing in Linux (open a new shell, for name
> in...).  Also, put the two exec tasks in ONE target, one that has
> os="<windows flavor>" and one that has os="<Linux flavor>"...
> 
> -----Original Message-----
> From: Amit Kulkarni [mailto:proudlyindian@yahoo.com]
> Sent: Monday, October 20, 2003 12:24 PM
> To: Ant Users List
> Subject: RE: multiple args to java task
> 
> 
> Ciramella thanks,
> but we r on both platforms.
> some prefer windows while some linux
> 
> --- "Ciramella, EJ" <ECiramella@emptoris.com> wrote:
> 
>>since there's no reply, if you're in windows, you can do something like
>>this:
>>
>><exec dir="." executable="cmd.exe">
>>  <arg value="/q /c for /l %a in (1,1,10) do echo %a"/>
>></exec>
>>
>>loop however you want...
>>
>>-----Original Message-----
>>From: Ciramella, EJ [mailto:ECiramella@emptoris.com]
>>Sent: Monday, October 20, 2003 11:14 AM
>>To: 'Ant Users List'
>>Subject: RE: multiple args to java task
>>
>>
>>Just for giggles, windows or Unix/Linux?
>>
>>-----Original Message-----
>>From: Amit Kulkarni [mailto:proudlyindian@yahoo.com]
>>Sent: Monday, October 20, 2003 11:17 AM
>>To: Ant Users List
>>Subject: RE: multiple args to java task
>>
>>
>>see wot im trying to automate is something like this
>>
>>java jode.decompiler.Main --dest somedir 1stJarFileinDir.jar
>>java jode.decompiler.Main --dest somedir 2ndJarFileinDir.jar
>>... so on
>>
>>thanks
>>
>>--- Dominique Devienne <DDevienne@lgc.com> wrote:
>>
>>>>From: Amit Kulkarni [mailto:proudlyindian@yahoo.com]
>>>>
>>>>hi Dominique,
>>>>thanks for the try, but ill xplain my situation better.
>>>>I have a dir which has hundreds of jars of which some i want to
> 
> compile
> 
>>>>and leave the others as
>>>>is.
>>>>then i use a java program which takes one jar at a time
>>>>so my script is
>>>>
>>>><java classname="jode.decompiler.Main">
>>>><arg value="--dest"/>
>>>><arg value="test-classes"/>
>>>><arg value="abc.jar"/>   ######### i want to give multiple jars here
> 
> but
> 
>>>>not a list of jars like
>>>>made in path convert
>>>></java>
>>>
>>>So? I'm probably missing something, because I don't see why it cannot be
>>>done using either method I outlined... No need for <foreach> or <for>
as
>>>suggested. Really, with a little effort, it's doable. I don't have time
> 
> to
> 
>>>give you a full solution, sorry. --DD
>>>
>>>
>>>>--- Dominique Devienne <DDevienne@lgc.com> wrote:
>>>>
>>>>>Define your <fileset> outside, then <pathconvert> it to a
string
>>
>>stuffed
>>
>>>>in
>>>>
>>>>>a property, then use <arg line="${all my jars}" />. Or use <apply>,
>>>>
>>>>forking
>>>>
>>>>>a Java VM manually, and parallel="true". --DD
>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>>>For additional commands, e-mail: user-help@ant.apache.org
>>>
>>
>>
>>__________________________________
>>Do you Yahoo!?
>>The New Yahoo! Shopping - with improved product search
>>http://shopping.yahoo.com
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>>For additional commands, e-mail: user-help@ant.apache.org
>>
> 
> 
> 
> =====
> Regards,
> Amit Kulkarni
> Sr. Software Engineer
> AG Technologies Pvt. Ltd. 
> Tel: +91-22 28250567/28250568 Xtn: 138
> 
> Homepage: http://66.246.62.176/~amitkulk/
> 
> __________________________________
> Do you Yahoo!?
> The New Yahoo! Shopping - with improved product search
> http://shopping.yahoo.com
> 
> ---------------------------------------------------------------------
> 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
View raw message