ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alan Char" <ac...@vitria.com>
Subject <ant inheritAll="false">
Date Wed, 13 Jul 2005 19:37:03 GMT
I am using Ant 1.6.2 and it looks to me like inheritAll="false"
isn't working for the <ant> task.  I have a build.xml:

  <project name="sub" default="default">
    <target name="default">
      <echoproperties prefix="ant."/>
      <echo message="myprop: ${myprop}"/>
    </target>
  </project>

and a sub/build.xml:

  <project name="bug" default="default">
    <property name="myprop" value="foo"/>
    <target name="default">
      <echoproperties prefix="ant."/>
      <ant dir="sub" target="default"/>
    </target>
  </project>

When I run ant, I see this:

Buildfile: build.xml

default:
[echoproperties] #Ant properties
[echoproperties] #Wed Jul 13 12:16:38 PDT 2005
[echoproperties] ant.file.bug=C\:\\devel\\test\\bug\\build.xml
[echoproperties] ant.file=C\:\\devel\\test\\bug\\build.xml
[echoproperties] ant.project.name=bug
[echoproperties] ant.java.version=1.4
[echoproperties] ant.home=C\:\\devel\\yoda\\build\\ant\\bin\\..
[echoproperties] ant.library.dir=C\:\\devel\\yoda\\build\\ant\\lib
[echoproperties] ant.version=Apache Ant version 1.6.2 compiled on July
16 2004

default:
[echoproperties] #Ant properties
[echoproperties] #Wed Jul 13 12:16:38 PDT 2005
[echoproperties] ant.file.bug=C\:\\devel\\test\\bug\\build.xml
[echoproperties] ant.file=C\:\\devel\\test\\bug\\sub\\build.xml
[echoproperties] ant.project.name=sub
[echoproperties] ant.file.sub=C\:\\devel\\test\\bug\\sub\\build.xml
[echoproperties] ant.java.version=1.4
[echoproperties] ant.home=C\:\\devel\\yoda\\build\\ant\\bin\\..
[echoproperties] ant.library.dir=C\:\\devel\\yoda\\build\\ant\\lib
[echoproperties] ant.version=Apache Ant version 1.6.2 compiled on July
16 2004
     [echo] myprop: foo

BUILD SUCCESSFUL
Total time: 0 seconds


Shouldn't ${myprop} be undefined in the sub directory project?  I am
expecting to see

     [echo] myprop: ${myprop}

instead of

     [echo] myprop: foo

Have I misunderstood something about Ant, or is this a bug?  I couldn't
find a
bug like this in the database.

Any help would be greatly appreciated.  Thanks.  --Alan

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


Mime
View raw message