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

--DD

-----Original Message-----
From: David McTavish [mailto:[EMAIL PROTECTED]] 
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>

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

Then call ant as follows:

ant -buildfile build.xml compile -Ddry.run=true

d.

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to