ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Antoine Levy-Lambert" <>
Subject Re: Ant help..
Date Tue, 02 Sep 2003 11:03:57 GMT

----- Original Message -----
From: <>
To: <>
Sent: Tuesday, September 02, 2003 12:56 PM
Subject: Ant help..

> I have two ant build files in a single directory namely build.xml and
mybuild.xml. If I have a target with the same name ( let's say they >are for
slightly different purpose ), how can I differentiate which target should be
executed. what command ??

 >And the strange thing for me is little more than this

 >I have a target called "compile1" in mybuild.xml. When I am executing "ant
compile1", it somehow processing build.xml though it do >not have compile1
target in it.

When you do not use ant -f [filename], ant assumes you want to use build.xml
When you do ant compile1, ant will execute the root part of build.xml, until
it realizes that the target compile1 does not exist in the file build.xml.

ant never looks spontaneously at several build files in a directory. Some
tasks allow to use other build files ( <ant/>, <subant/>, <import/> ) but
then you know (or should know) what you are doing.

> So how can I execute compile1 target in mybuild.xml if the 2 files are in
the same directory ??

ant -f mybuild.xml compile1

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message