ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "glenn opdycke-hansen" <glenn...@gmail.com>
Subject Re: Multiple .properties in the same ANT
Date Mon, 14 Aug 2006 17:11:54 GMT
I agree with the comment that ant-contrib can be useful here.
I believe this an appropriate place to use antcall, for these reasons.

   1. antcall takes a param element that can be used to specify the name
   of the .properties file you want processed.
   2. properties that are assigned in the target of the antcall are
   "forgotten" at the completion of the antcall.
   3. multiple antcalls can be executed for the different properties
   files to be processed.  This gives the illusion of a for-loop.


You can also use ant-contrib for a foreach task.

I try to limit the use of antcall in scripts.  This appears to be a
situation where it would work well.

--glenn

On 8/14/06, LIRA Olavo <Olavo.LIRA@gemalto.com> wrote:
>
>
> Hi Ben,
>
>         Did you had a chance to look into my Build.xml? I understand
> what you have said about passing the .properties dynamically, this I can
> do, what I don't know how to do is to run "n" times the same ANT with
> different .properties each time...
>         Is it possible? In Eclipse for instance, I can specify the
> .properties I'm passing to my Build.xml, put they are all passed in one
> shot, what I'd like (if it's not clear yet) is to execute ANT as many
> times as I have .properties and each time ANT take into account just one
> of them.
>
>         Please let me know if it's not clear or if you need more
> precisions. Thanks!!
>
> ========================================
> Olavo Lira
>
> -----Original Message-----
> From: Burgess, Benjamin [mailto:BBurgess@tiaa-cref.org]
> Sent: Thursday, August 10, 2006 1:34 PM
> To: Ant Users List
> Subject: RE: Multiple .properties in the same ANT
>
> You will have to give more information (such as the contents of your
> build.xml).
>
> Can you use a macrodef to define the target and have it take in the name
> of the properties file as an argument?  Then the macrodef can load the
> properties with a prefix based on the argument.
>
> Ben
>
> -----Original Message-----
> From: LIRA Olavo [mailto:Olavo.LIRA@gemalto.com]
> Sent: Thursday, August 10, 2006 12:07 PM
> To: Ant Users List
> Subject: Multiple .properties in the same ANT
>
> Sorry I forgot to change the subject
>
> .....
>
> Hello everyone,
>
>         I'm new in here and I know the basic of ANT. I use it for
> compiling javacard applets. Well my problem is that I would like to know
> if it is possible with ANT to run the same ANT with multiple different
> .properties that I pass in my init target? Now I'm using one ANT for
> each applet that I have to create, but I think it should have a more
> efficient way...
>         Is there anyone who could help me out with this? Thanks in
> advance.
>
> Olavo Lira
>
>
> ---------------------------------------------------------------------
> 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
>
>
>
> **************************************************************
> This message, including any attachments, contains confidential
> information intended for a specific individual and purpose, and is
> protected by law.  If you are not the intended recipient, please contact
> sender immediately by reply e-mail and destroy all copies.  You are
> hereby notified that any disclosure, copying, or distribution of this
> message, or the taking of any action based on it, is strictly
> prohibited.
> TIAA-CREF
> **************************************************************
>
>
> ---------------------------------------------------------------------
> 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