ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Diane Holt <hol...@yahoo.com>
Subject Re: ant task dir=
Date Wed, 05 Sep 2001 18:46:37 GMT
--- "Tait, Allen" <atait@IDEXX.com> wrote:
> 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).

That's because on Windows, it's ant.bat, not ant. If you really want to
exec ant instead of doing an <ant>, you can specify the value for
"executable" as a property (eg., ${antcmd}), then set that property
according to the OS (various ways to do that). 

> 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.

This should work. What error do you get? What happens if you point "dir"
to dir="${basedir}/content"? (You shouldn't have to, but if even that
doesn't work, then it could help you figure out why just giving the subdir
name doesn't either.) BTW: If the file you're <ant>'ing to is called
build.xml, you don't need to specify "antfile" -- only if it's something
other than that (just FYI).

Diane

=====
(holtdl@yahoo.com)



__________________________________________________
Do You Yahoo!?
Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger
http://im.yahoo.com

Mime
View raw message