ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Reilly <peterrei...@apache.org>
Subject Re: <import>, <property>, and <target> order sensitivity problem
Date Wed, 20 Oct 2004 08:04:34 GMT
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: 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