RE: Pass build failure message to the calling script
Martin Gainty <[email protected]>
| Newsgroups | gmane.comp.jakarta.ant.user |
|---|---|
| Message-ID | <[email protected]> |
build.xml:
<target name="caller">
<!-- pass all properties and pass all references from current environment to callee -->
<ant inheritAll="true" inheritrefs="true" antfile="subbuild.xml" target="callee" output="output.html">
</ant>
</target>
make sure callee target of ant file subbuild.xml writes all its output to output.html
https://ant.apache.org/manual/Tasks/ant.html
Martin
______________________________________________
> From: [email protected]
> To: [email protected]
> Subject: Pass build failure message to the calling script
> Date: Tue, 24 Mar 2015 23:31:00 +0100
>
> Hello,
>
> I call Ant (execute a build) from a .bat script (under Windows). If the build fails, I'd like not only to detect that it failed (this is possible via ERRORLEVEL) but also get the failure message (at least its first line if the message contains multiple lines).
>
> Is it possible without parsing the output of Ant? If yes, how?
>
> Thank you!
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>