ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan.Mate...@rzf.fin-nrw.de
Subject AW: Returning data from an Ant task?
Date Tue, 11 Jan 2005 07:22:54 GMT
Usually tasks set the property themselves via
  getProject().setNewProperty("propname", "propvalue");
If you┬┤re result is in a file, you can load that via <loadfile>

And you can hook another property helper ... (somewhere in the 
proposal section should be an example).


Jan

> -----Urspr├╝ngliche Nachricht-----
> Von: Karl [mailto:karlkras@comcast.net]
> Gesendet am: Dienstag, 11. Januar 2005 06:17
> An: user@ant.apache.org
> Betreff: Returning data from an Ant task?
> 
> I'm writing a custom ant task that parses a text file and I'd like to 
> somehow pass the results back to the ant process. Is it possible to 
> return an "output parameter" string value to an ant process? 
> Ideally I'd 
> like to do something like:
> <target name="getversion" description="Retrieves the version of the 
> product build out of the version file.">
>     <taskdef name="getversion" classname="GetVersion" 
> classpath="MyAntExtension.jar"/>
>     <property name="MyVersion" value={getversion 
> fileName="c:\work\AntExtensions\EXT_VERSION"} />
> </target>
> ?
> regards,
> Karl
> 
> 
> ---------------------------------------------------------------------
> 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