ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominique Devienne <DDevie...@lgc.com>
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).

--DD

-----Original Message-----
From: David McTavish [mailto:dmctavish@SANDVINE.com] 
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:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message