ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Loughran <ste...@apache.org>
Subject Re: BuildFailed if ReturnCode 1 ?!
Date Wed, 17 Aug 2005 10:07:49 GMT
Rebhan, Gilbert wrote:
> Hi,
> 
> i've written a java class that is called in my buildscript.
> That class requieres 3 args.
> 
> In the code of my class i've written :
> 
> if (args.length < 3) {
>             System.out.println("***Error *** .... ");
>         System.exit(1);
> 
> In a little testscript i've tried with =
> 
> <target name="parseLogs">
> <java classname="de. ...">
> 	<!-- arg [0-->
> 	<arg value="c:/backup_cclogs" />
> 	<classpath>
> 	<pathelement location="C:/ant_extralibs/myant.jar" />
> 	</classpath>
> </java>
> </target>
> 	
> <target name="default" depends="parseLogs">
> <echo message="parseCCLogs successful"></echo>
> </target>
> 
> I expected to get a BuildFailed as args[1] and args[2] are missing, 
> but i got my ***Error*** ... message and a 
> 
> Build Successful combined with an
> 
> [java] org.eclipse.ant.internal.ui.antsupport.AntSecurityException
> ...
> 
> How to ensure a BuildFailed if the required args[] for my class
> are not properly set ?! 

set failonerror=true to have non-zero return codes mapped to build errors

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message