ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Cohen" <SCo...@sportvision.com>
Subject RE: re-reading build file from within ant
Date Fri, 20 Jun 2003 16:24:03 GMT
Okay, your needs are more complicated than I thought, then.

-----Original Message-----
From: Phillip Lord [mailto:p.lord@russet.org.uk] 
Sent: Friday, June 20, 2003 10:45 AM
To: Ant Users List
Subject: Re: re-reading build file from within ant


>>>>> "Steve" == Steve Cohen <SCohen@sportvision.com> writes:

  Steve>     <target name="autobuild">
  Steve> 	...
  Steve>     </target>

  Steve>     <target name="auto" depends="checkout.build.xml">
  Steve>         <echo message="ant.file=${ant.file}"/> <ant
  Steve>         antfile="${ant.file}" target="autobuild"
  Steve> inheritrefs="false" inheritall="false"/>
  Steve>     </target>

  Steve> Neither of these targets, auto or autobuild, is the default
  Steve> target, although, conceivably, either could be.

  Steve> Are you perhaps missing the "target" attribute of the ant
  Steve> task?

Yes, but you know which targets you are going to be running in advance.
I would need this decision to be made at runtime. 


Say I have....

build.xml

and 

build-generated.xml

and I call "ant -find build.xml blah" I can not delegate that
functionality to build-generated.xml. The best that I can do is either,
put a dummy target into build.xml called "blah" which delegates its real
functionality to build.xml. Or in build.xml I can do 

target delegate
        ant target="${delegated.target}"


and call

ant -Ddelegated.target=blah delegate

Phil


---------------------------------------------------------------------
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