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: property inheritance
Date Tue, 30 Jun 2009 06:13:50 GMT
I set up a little test and all props are set as via CLI.


Jan


build.xml
<project>
  <property name="prop.first" value="set in the main buildfile"/>
  <ant antfile="second.xml"/>
</project>

second.xml
<project>
  <import file="imported-by-2nd.xml"/>
  <property name="prop.second" value="set in called buildfile"/>
  <echoproperties prefix="prop."/>
</project>

imported-by-2nd.xml
<project>
  <property name="prop.imported" value="imported value"/>
</project>

output
------
[echoproperties] #Ant properties
[echoproperties] #Tue Jun 30 08:12:00 CEST 2009
[echoproperties] prop.first=set in the main buildfile
[echoproperties] prop.imported=imported value
[echoproperties] prop.second=set in called buildfile 

>-----Urspr√ľngliche Nachricht-----
>Von: Cole, Derek E [mailto:derek.e.cole@lmco.com] 
>Gesendet: Montag, 29. Juni 2009 23:09
>An: Ant Users List
>Betreff: property inheritance
>
>Hi all.
>
> 
>
>If I have a build script that makes an <ant> call to another build
>script, for a specific target in that build script, are the 
>imports that
>the 2nd build script has initialized just the same as if I had called
>the 2nd build script's target from command line?
>
> 
>
>I seem to have an issue where when the call to the "package" target of
>the 2nd ant from the first ant build script, one of my 
>properties is not
>being set correctly (it is set in the file the 2nd build script is
>importing)
>
> 
>
>Thanks!
>
>
>Derek
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message