ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brown, Sheldon" <SBr...@Tilion.com>
Subject RE: ant task dir=
Date Wed, 05 Sep 2001 18:31:27 GMT
Both problems can be easily solved.

For problem one add ANT to your PATH on the PC:
set PATH=%PATH%;c:\jakarta-ant\bin

For problem two, reference the build.xml relative the current working
directory:


<ant dir="content" antfile="content/build.xml">


If I'm wrong, there does exist an os attribute to exec that if you specify
os="Windows 2000" it will only run there. (a uname -a in the Unix world).
Try to avoid this as it will mean code duplication.

Good luck,

Sheldon
-----Original Message-----
From: Tait, Allen [mailto:atait@IDEXX.com]
Sent: Wednesday, September 05, 2001 1:59 PM
To: 'ant-user@jakarta.apache.org'
Subject: ant task dir=


I am modifying our build.xml files to work in both the Unix and Windows
environments.  They were written originally for Unix.  We are executing a
few subprojects within the main build.xml.  This has been accomplished with:

<exec dir="content" executable="ant"/>

This is called from the parent directory of "content".  However, this
command doesn't seem to work in Windows (it can't find ant).  It does work
in Unix.  I have tried using the following to replace this command:

<ant dir="content" antfile="build.xml"/>

Now this works fine in Windows but not in Unix.  The main build.xml is one
level above "content" in the directory hierarchy.  I am guessing that when
using the ant task the working directory does not get switched to "content"
but it does get switched to "content" when using exec.  Is this the case?
Is there a workaround?  I could specify the OS for the exec but this is not
an option for the ant task.

Thanks

Mime
View raw message