maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brett Porter <brett.por...@gmail.com>
Subject Re: Stop build on preGoal failure
Date Tue, 18 Jan 2005 00:00:07 GMT
can't you have failonerror as a propery of ant:exec? Or is that not
the behaviour you needed?

What you'd need to do for the above is:

<j:if test="${output != ''}"><ant:fail>FOO!</ant:fail></j:if>


On Mon, 17 Jan 2005 15:51:07 -0800, baleineca <as@binary42.com> wrote:
> Am I doing anyting wrong? This didn't work.  Maven carries onto compile
> even when rc fails...
> 
> Here is what I am doing:
> 
>     <preGoal name="native:compile">
>         <!-- This is win32 only artifact -->
>         <j:if test="${osname == 'win32'}">
>             <!-- Run resource compiler -->
>             <ant:mkdir dir="target/native"/>
>             <ant:exec executable="rc" outputproperty="output">
>                 <arg line="/fo target/native/${pom.artifactId}.res
> native/${pom.artifactId}.rc"/>
>             </ant:exec>
>             <ant:fail if="${output != ''}"/> <-- Note: 2 single quotes
> != '' because rc returns nothing on success.
> 
> 
> Brett Porter wrote:
> 
> ><ant:fail /> ?
> >
> >
> >On Mon, 17 Jan 2005 15:42:58 -0800, baleineca <as@binary42.com> wrote:
> >
> >
> >>Hi,
> >>
> >>I would like to instruct maven to stop building if an ant:exec task
> >>fails inside a preGoal (<preGoal name="native:compile">).
> >>
> >>Any suggestion?
> >>
> >>Thanks!
> >>
> >>---------------------------------------------------------------------
> >>To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> >>For additional commands, e-mail: users-help@maven.apache.org
> >>
> >>
> >>
> >>
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> >For additional commands, e-mail: users-help@maven.apache.org
> >
> >
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Mime
View raw message