Java Mailing List Archive

http://www.ant-tasks.com/

Home » Ant Users List »

Re: <ant> task, inheritAll=false and ant.version property

Peter Reilly

2008-03-03

Replies: Find Java Web Hosting

Author LoginPost Reply
This is a bug in ant 1.7.0, it has been fixed
and will be in the soon to be released 1.7.1.
https://issues.apache.org/bugzilla/show_bug.cgi?id=42263
Peter

On Mon, Mar 3, 2008 at 9:53 AM, Keith Hatton <khatton@(protected):
> It seems that something has changed between Ant 1.6.2 and 1.7.0 in the
> way the ant.version property is handled when another build file is
> invoked using the <ant> task.
>
> Given the following files:
> main-build.xml:
> <project name="test-case-main-build" default="main-build">
>   <target name="main-build">
>      <echo>Ant version is ${ant.version}</echo>
>      <ant antfile="sub-build.xml" inheritAll="false"/>
>   </target>
> </project>
>
> sub-build.xml:
> <project name="test-case-sub-build" default="sub-build">
>   <target name="sub-build">
>      <echo>Ant version is ${ant.version}</echo>
>   </target>
> </project>
>
> I get the following results:
> Ant 1.6.2:
> C:\...>ant -f main-build.xml
> Buildfile: main-build.xml
>
> main-build:
>    [echo] Ant version is Apache Ant version 1.6.2 compiled on July 16
> 2004
>
> sub-build:
>    [echo] Ant version is Apache Ant version 1.6.2 compiled on July 16
> 2004
>
> But with Ant 1.7.0:
> C:\...>ant -f main-build.xml
> Buildfile: main-build.xml
>
> main-build:
>    [echo] Ant version is Apache Ant version 1.7.0 compiled on December
> 13 2006
>
>
> sub-build:
>    [echo] Ant version is ${ant.version}
>
>
> Is this an Ant bug? It seems reasonable that ant.version should not be
> inherited, but I would have expected the new Ant "environment" to detect
> its own version and set the property (and maybe other ant.* properties
> too), and clearly it did that before.
>
> Thanks,
> Keith
>
>
> Axiom Systems Limited is a limited company registered in England and
> Wales. Registered number: 2358771. Registered office: One Forbury
> Square, The Forbury, Reading, Berks RG1 3EB
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)

©2008 ant-tasks.com - Jax Systems, LLC, U.S.A.