You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Jacob Kjome <ho...@visi.com> on 2004/10/19 21:40:10 UTC

, , and order sensitivity problem

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


Re: , , and order sensitivity problem

Posted by Peter Reilly <pe...@apache.org>.
Jacob Kjome wrote:

>Quoting Peter Reilly <pe...@apache.org>:
>
>  
>
>>This has been fixed in cvs.
>>
>>Bugzilla report 31487
>>http://issues.apache.org/bugzilla/show_bug.cgi?id=31487
>>
>>Peter
>>    
>>
>
>I thought this sounded familiar shortly after I sent my email, but I couldn't
>find the bug.  Thanks!
>
>BTW, Peter, your last comment in said bug is:
>"Fixed in HEAD.  (Need to sync to 1.6 branch?)"
>
>Does that mean it isn't fixed in the 1.6 branch?  I'm hoping this will be fixed
>for the next release.
>  
>
Yes, it has been applied to the 1.6 branch.

Peter

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


Re: , , and order sensitivity problem

Posted by Jacob Kjome <ho...@visi.com>.
Quoting Peter Reilly <pe...@apache.org>:

> This has been fixed in cvs.
>
> Bugzilla report 31487
> http://issues.apache.org/bugzilla/show_bug.cgi?id=31487
>
> Peter

I thought this sounded familiar shortly after I sent my email, but I couldn't
find the bug.  Thanks!

BTW, Peter, your last comment in said bug is:
"Fixed in HEAD.  (Need to sync to 1.6 branch?)"

Does that mean it isn't fixed in the 1.6 branch?  I'm hoping this will be fixed
for the next release.

Jake


>
> 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
>




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


Re: , , and order sensitivity problem

Posted by Peter Reilly <pe...@apache.org>.
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