ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominique Devienne <>
Subject RE: Ant script "dry-run" testing
Date Wed, 04 Dec 2002 21:06:45 GMT
Hardly the same as 'make -n', but true nonetheless I guess.

I do think a simplified dry-run mode of Ant would be good though, tracing
which targets and tasks would be executed, using with attributes, with
proper properties resolution. Wouldn't tell you which files are out-of-date
in <javac>, or which files should be copied in <copy>, just mentioning the
tasks that would run, with the attributes they would take (kind of like the
'instance' of build.xml corresponding to the 'class' build.xml with the
properties expanded).

I'm not holding my breath for this feature though, since I won't do it
myself, and it's not trivial to develop. The little development I do in Ant
is outside of the Ant code base, since getting code in is difficult (due to
the high standards, and philosophy differences).


-----Original Message-----
From: David McTavish [] 
Sent: Wednesday, December 04, 2002 2:46 PM
To: 'Ant Users List'
Subject: RE: Ant script "dry-run" testing

You COULD change the way you run all of your ant scripts such that a regular
target calls the actual target that does the work as follows:

<target name="compile">
    <echo message="Compiling ${project}"/>
    <antcall target="compile.impl"/>

    <target name="compile.impl" unless="${}">
        <javac .../>

Then call ant as follows:

ant -buildfile build.xml compile


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

View raw message