One way to achieve that is not to set the properties explicitly in target
'project1', but to load them from a properties file. That way, you can still
do your global target, by replacing your pseudo code 'antcall project1' by
the _content_ of target1, which has become as simple as <property
file="project1.properties" />. Maybe not ideal, but I cannot think of any
other way. --DD

-----Original Message-----
From: Nick Pellow [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, August 28, 2002 10:38 AM
To: Ant Users List
Subject: AW: setting properties using antcall Vs ant target1 target2 .

Matt,
The difference between "ant target1 target2"
and
 <target name="jar" depends="project1">
 ...
 </target>

is subtle.

I use the first as a way of paramaterizing certain targets in
a build file. I set certain properties specific to a sub project.

ant project1 war   -- builds the war for project1
ant project2 war   -- builds the war for project2.

This means my build file is "scalable" (in size and complexitiy)
with respect to the number of sub-projects.

The problem I am trying to solve is that at times, I want to build all sub
projects
with a simple "ant build.all" .

In psuedo ant code

target
  antcall project1
  antcall war
  antcall project2
  antcall war

(where the project2 target sets properties for project2 that the war target
uses.)
will only build the war for project1 !


Cheers,
Nick


> -----Ursprungliche Nachricht-----
> Von: Matt Benson [mailto:[EMAIL PROTECTED]]
> Gesendet: Mittwoch, 28. August 2002 15:10
> An: Ant Users List
> Betreff: Re: setting properties using antcall Vs ant target1 target2 .
>
>
> I guess you could do this with <antcall>, but why
> would you just not write
>
> <target name="jar" depends="project1">
> ...
> </target>
>
> ?
>
> -Matt
>
> --- Nick Pellow <[EMAIL PROTECTED]> wrote:
> > Hi,
> > I would like to know if I can achieve the same
> > behaviour
> > regarding properties with an ANTCALL as I can if I
> > call
> > two targets from the command line at the same time.
> >
> > ie: ant project1 jar
> >
> >   where the project1 target simply sets the
> > properties needed for the jar
> > target.
> >
> > Does anyone know if the same be done using ANTCALL
> > (or ANT) somehow?
> >
> > I guess the antcall target would allow multiple
> > target(s) to be supplied.
> >
> > Cheers,
> > Nick
> >
> >
> > --
> > To unsubscribe, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> >
>
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Finance - Get real-time stock quotes
> http://finance.yahoo.com
>
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
>
>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to