ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Loughran <stev...@iseran.com>
Subject Re: exit code
Date Tue, 15 Apr 2003 21:27:36 GMT
Donal Quinlan wrote:
> I want to avoid using <exec> because of all the os issues it will cause.
> However I successfully grafted the resultproperty code from 
> ExecTask.java and put it into a custom java task (which was a copy of 
> Java.java). This worked like a dream.
> 
>    <taskdef name="resultjava"
>             classname="com.savvion.tools.ant.taskdefs.ResultJava"/>
> ....
>      <resultjava classname="com.installshield.isje.ISJE" fork="true" 
> failonerror="false"
>            resultproperty="exitcode"
>            dir="${mp50.dir}" jvm="${mp50.jvm}">
> ....
> 
>      <condition property="good.installer.build">
>        <or>
>          <equals arg1="${exitcode}" arg2="0" />
>          <equals arg1="${exitcode}" arg2="-1" />
>        </or>
>      </condition>
>      <fail unless="${good.installer.build}"
>            message="More than just warnings occurred when building 
> MultiPlatform installer, exitcode = ${exitcode}"/>
> 
> This was so simple to add, I think it should be made part of the normal 
> <java> task. I would be willing to do it (because it's simple :-)  )

Post it as a bugzilla patch, along with test and the doc changes then :)

-steve


Mime
View raw message