ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <>
Subject <ant> task result?
Date Thu, 20 Nov 2003 16:14:34 GMT
I have searched the archives and found a possible course of action, but 
I wanted to run it by everyone and see if there was a better way to do it.

I am re-vamping the nightly build for my project. The project itself 
uses ant, and I will be using ant for the nightly build as well. What 
I'd like to do is have a separate build script that will start a 
recorder, do a cvs checkout, compile, unit test, etc. ultimately ending 
up with a deployment to our test server.

I have something like this:

<target name="build" depends="start-recorder">
	<ant dir="${app-name} antfile="build.xml"
		inheritall="false" />

	<ant dir="${app-name} antfile="build.xml"
		inheritall="false" />

	<!-- Email the results -->
	<mail .... />

The thing is, I'd like to bail out if the compile fails, and still send 
the email. From a shell-script, I would just check the exit code of the 
task and jump to the mail task, but it looks like I can't do that here.

I found Antelope's <AntFetch> task, but that will require me to modify 
the build script for my application just so that the nightly build 
script can read properties from it (like, I'd set "compile.success" 
after the <javac> task in the build script, then check its value in the 
night build script).

Is this the best way to do this? What other options do I have? Should I 
consider just dropping ant and using straight shell scripts for the 
nightly build?

Thanks in advance for any advice.


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

View raw message