preGoal - how to stop the build ??

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

preGoal - how to stop the build ??

Mark D. Hansen
I have this:

<preGoal name="java:compile">
  <attainGoal name="goal1"/>
  <attainGoal name="goal2"/>
</preGoal>

If goal1 fails, the processing continues to try to run "goal2".  How do I make it stop if goal1 fails?  Acually, I'd like the whole build to stop if any part of the preGoal fails.  How do I do that?

Thanks!

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: preGoal - how to stop the build ??

Brett Porter
What do you mean by "fails"? It certainly should stop dead if you hit
<ant:fail/> or an exception.

- Brett

On 5/5/05, Mark D. Hansen <[hidden email]> wrote:

> I have this:
>
> <preGoal name="java:compile">
>   <attainGoal name="goal1"/>
>   <attainGoal name="goal2"/>
> </preGoal>
>
> If goal1 fails, the processing continues to try to run "goal2".  How do I make it stop if goal1 fails?  Acually, I'd like the whole build to stop if any part of the preGoal fails.  How do I do that?
>
> Thanks!
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

RE: preGoal - how to stop the build ??

Mark D. Hansen
In reply to this post by Mark D. Hansen
goal1, goal2, are ant <java ...> tasks.  I guess the java is failing in a way that does not throw an exception.  Sorry for the stupid question!

> -----Original Message-----
> From: Brett Porter [mailto:[hidden email]]
> Sent: Thursday, May 05, 2005 9:56 AM
> To: Maven Users List
> Subject: Re: preGoal - how to stop the build ??
>
>
> What do you mean by "fails"? It certainly should stop dead if you hit
> <ant:fail/> or an exception.
>
> - Brett
>
> On 5/5/05, Mark D. Hansen <[hidden email]> wrote:
> > I have this:
> >
> > <preGoal name="java:compile">
> >   <attainGoal name="goal1"/>
> >   <attainGoal name="goal2"/>
> > </preGoal>
> >
> > If goal1 fails, the processing continues to try to run
> "goal2".  How do I make it stop if goal1 fails?  Acually, I'd
> like the whole build to stop if any part of the preGoal
> fails.  How do I do that?
> >
> > Thanks!
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [hidden email]
> > For additional commands, e-mail: [hidden email]
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: preGoal - how to stop the build ??

Jamie Bisotti
If the Ant task isn't failing, you can't expect Maven to fail.  Look
at the <java> tasks 'failonerror' attribute.  You may need to modify
your Java app to get this working.

On 5/5/05, Mark D. Hansen <[hidden email]> wrote:

> goal1, goal2, are ant <java ...> tasks.  I guess the java is failing in a way that does not throw an exception.  Sorry for the stupid question!
>
> > -----Original Message-----
> > From: Brett Porter [mailto:[hidden email]]
> > Sent: Thursday, May 05, 2005 9:56 AM
> > To: Maven Users List
> > Subject: Re: preGoal - how to stop the build ??
> >
> >
> > What do you mean by "fails"? It certainly should stop dead if you hit
> > <ant:fail/> or an exception.
> >
> > - Brett
> >
> > On 5/5/05, Mark D. Hansen <[hidden email]> wrote:
> > > I have this:
> > >
> > > <preGoal name="java:compile">
> > >   <attainGoal name="goal1"/>
> > >   <attainGoal name="goal2"/>
> > > </preGoal>
> > >
> > > If goal1 fails, the processing continues to try to run
> > "goal2".  How do I make it stop if goal1 fails?  Acually, I'd
> > like the whole build to stop if any part of the preGoal
> > fails.  How do I do that?
> > >
> > > Thanks!
> > >
> > >
> > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [hidden email]
> > > For additional commands, e-mail: [hidden email]
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [hidden email]
> > For additional commands, e-mail: [hidden email]
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>


--
Jamie Bisotti
Software Engineer
Lexmark International, Inc.

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]