ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lev Zak <lev....@schema.com>
Subject <ant> task does not run the build.xml with new basedir correctly
Date Wed, 06 Feb 2002 20:45:58 GMT
Hi,
I use Ant 1.4.1 under Windows 2000.
I have two identical build.xml files exist in the different path d:\dir_1
and d:\dir_2
The build.xml is the following:

<?xml version="1.0"?>
<project basedir="." default="init" name="proj1">
    <property name="configDir" value="${basedir}/config"/>
    <target name="release">
        <property name="releasedir"     value="d:/dir_2"/>
	<ant antfile="build.xml" dir="${releasedir}" target="init"/>
    </target>
    <target name="init">
            <echo>
                basedir    = ${basedir}
                configDir  = ${configDir}
            </echo>
    </target>
</project>

When I run "ant" under d:\dir_1 , I receive the following:

D:\dir_1>ant
Buildfile: build.xml

init:
     [echo]
                basedir    = D:\dir_1
                configDir  = D:\dir_1/config


BUILD SUCCESSFUL

Total time: 1 second
D:\dir_1>

It is correct.
When I run "ant release" under d:\dir_1 , I receive the following:

D:\dir_1>ant release
Buildfile: build.xml

release:

init:
     [echo]
                basedir    = D:\dir_2
                configDir  = D:\dir_1/config


BUILD SUCCESSFUL

Total time: 1 second
D:\dir_1>

I expect to receive the following:

                configDir    = D:\dir_2/config

instead of the following:

                configDir    = D:\dir_1/config

because a "basedir" changed to "d:\dir_2" 
What I missed?
Lev.

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


Mime
View raw message