I think I may have found something. It seems one of the developers have used 
the <apply> task to pass their parameters in, however, I am guessing that this 
means that any property I over-ride on command line is not available in that 
new "shell" that the apply task creates, is this a correct assumption? 

-----Original Message-----
From: [email protected] [mailto:[email protected]] 
Sent: Tuesday, June 30, 2009 2:14 AM
To: [email protected]
Subject: AW: property inheritance

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:[email protected]] 
>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: [email protected]
For additional commands, e-mail: [email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to