This has been fixed in cvs.
Bugzilla report 31487 http://issues.apache.org/bugzilla/show_bug.cgi?id=31487
Peter
Jacob Kjome wrote:
I noticed an issue with <import>, <property>, and <target> where a property specified in an imported file will not exist in an overridden target of the importing file depending on the position of said target in the imported file relative to the position of said property in the imported file. Maybe an example would be more clear....
<project name="imported" basedir=".">
<target name="overrideme"/> <property name="targetdir" location="${basedir}/target"/>
</project>
<project name="importer" basedir=".">
<import file="./imported.xml"/>
<property name="mydir" location="${targetdir}/mydir"/> <target name="overrideme"> <echo>mydir is : ${mydir}</echo> </target>
</project>
Output: overrideme: [echo] mydir is : C:\dev\${targetdir}\mydir
However, if the "overrideme" target, in imported.xml, is moved below the "targetdir" property, the output will be correct....
Output: overrideme: [echo] mydir is : C:\dev\target\mydir
Is this a known issue? In any case, is it a bug or, somehow, expected behavior. If this is expected behavior, it sure makes build files fragile. Why should the position of a <target> matter in a build file, imported or not?
Jake
--------------------------------------------------------------------- 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]
