ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sadaf_Choudhry" <>
Subject RE: Split build file
Date Wed, 01 Sep 2004 17:19:22 GMT
I am using ant 1.5.3..
Is there something in 1.5.3 that would allow me to do something

I use the <ant> task myself as of now.. But if I could just somehow
include a sub-build.xml file into my main build.xml files, it would be
simply awesome..

Any way I could do this in ant 1.5.3??


-----Original Message-----
From: Vadim Kazakov [] 
Sent: Wednesday, September 01, 2004 8:34 PM
To: Ant Users List
Subject: RE: Split build file

That's interesting I didn't know about this task. I just use the <ant>
task to access other files.

-----Original Message-----
From: Bill Rich []
Sent: August 31, 2004 6:36 PM
To: 'Ant Users List'
Subject: RE: Split build file

You can import files to add targets to the available set. I have several
Ant files that I have used to organize my targets because they just got
to much for one file. In my files I do the following:

 <import file="${env.LEVTOOLSDIR}/L10NProcess/L10NProcess.xml"/>

 <import file="${env.LEVTOOLSDIR}/L10NProcess/L10NProcess-macros.xml"/>
 <import file="${env.LEVTOOLSDIR}/L10NProcess/L10NProcess-tasks.xml"/>

 <import file="${env.LEVTOOLSDIR}/L10NProcess/L10NProcess-p4tasks.xml"/>

I only copy l10nproj.xml into the directory where the project files are
stored and run it from there. When I run ant on the l10nproj.xml file
all of the targets in all the files that are imported are available as
though they were in the l10nproj.xml file. Of course you must be careful
to have unique names for all the targets so there is no confusion as to
which one you are referring to.

There is no automatic "jumping" into an imported file but you should be
able to figure out a target that will do what you want. You might check
out <for> in antContrib if you want to loop through a bunch of test
cases. Or perhaps, just using depends on a master target will also work.


-----Original Message-----
From: Gera, Prateek []
Sent: Tuesday, August 31, 2004 4:58 PM
To: Ant Users List
Subject: Split build file

 Is it possible to split a build project into multiple files, one main
build file and the rest smaller that do only a part of the full build
The smaller build files may not be executed independently. 

This will help be freeze my main build file and create smaller xml's to
execute any new tests as and when required.
Only minor changes would be required to main build file.

Something like this -
< project name="buidandtest" default="def"  basedir-"."> ...
  <include file="test1.xml"/>
  <include file="test2.xml"/>

Upon encountering <include> the execution would jump to test1.xml or
test2.xml I have considered using <ant> command in main file but my
smaller build file needs to call back targets in the main file and then
it will get too complicated.


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

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

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

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

View raw message