ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dino Valente <d...@3dstockcharts.com>
Subject Problems with subbuild
Date Thu, 27 Jul 2000 02:26:31 GMT
I'm having problems running sub builds (I am using the latest binaries). It
seems the variable can't be override in sub builds (this problem does not
occur with the ant.jar and xerces.jar distributed with JDOM FYI).

I have two build files:

test1.xml:
=====================
<project default="package" basedir=".">

  <target name="package">
    <property name="name" value="test1"/>
    <echo message="----------- module ${name} ------------"/> 
  </target>

</project>
=======================

test2.xml
=======================
<project default="package" basedir=".">

  <target name="test1">
    <ant antfile="test1.xml"/>
  </target>

  <target name="package" depends="test1">
    <property name="name" value="test2"/>
    <echo message="----------- module ${name} ------------"/> 
  </target>

</project>
=======================

To run it I go: build -buildfile test2.xml

I get the following in the console:

Buildfile: test2.xml

test1:

package:
----------- module test2 ------------

package:
----------- module test2 ------------

BUILD SUCCESSFUL

Total time: 1 seconds

========================

Bug: module test2 is displayed twice (it should display test1 test2).

dino


Mime
View raw message