You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by "Rebhan, Gilbert" <Gi...@huk-coburg.de> on 2005/08/17 10:09:17 UTC

Solved, was BuildFailed if ReturnCode 1 ?!

 
Hi,

stupid me RTFM ;-), 
after a deeper look in the manual i've found 

<java classname="de. ..." failonerror="true">

Sorry

Gilbert

-----Original Message-----
From: Rebhan, Gilbert [mailto:Gilbert.Rebhan@huk-coburg.de] 
Sent: Wednesday, August 17, 2005 9:58 AM
To: user@ant.apache.org
Subject: BuildFailed if ReturnCode 1 ?!


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 ?! 


Gilbert

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


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