You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "Xavier S." <xa...@gmail.com> on 2012/01/10 13:15:23 UTC

How to run a maven goal when there is tests failures?

Hello,

I would like to know if there is a way to execute a goal when there is test
failures?

Since maven stops its execution (fail fast mode) after encountering a test
failure, is there any options to launch a goal between that test failure
and he stop of maven?

Regards,
Xavier.

Re: How to run a maven goal when there is tests failures?

Posted by "Xavier S." <xa...@gmail.com>.
I'm not sure it will work since when there is test failures the test phase
is not executed completely and stops on the failing goal within that phase.

Regards,

Xavier

2012/1/11 Yuvaraj Vanarase <yu...@synechron.com>

> -          One has to write custom goal and attach to the test phase of
> maven build life cycle. Goal checks if test failure and do the action.
>
> http://maven.apache.org/guides/plugin/guide-java-plugin-development.html
>
>
>
>
>
> Regards,
>
> Yuvaraj
>
>
>
>
>
> -----Original Message-----
> From: Xavier S. [mailto:xavier.seignard@gmail.com]
> Sent: Tuesday, January 10, 2012 5:45 PM
> To: Maven Users List
> Subject: How to run a maven goal when there is tests failures?
>
>
>
> Hello,
>
>
>
> I would like to know if there is a way to execute a goal when there is test
>
> failures?
>
>
>
> Since maven stops its execution (fail fast mode) after encountering a test
>
> failure, is there any options to launch a goal between that test failure
>
> and he stop of maven?
>
>
>
> Regards,
>
> Xavier.
>

RE: How to run a maven goal when there is tests failures?

Posted by Yuvaraj Vanarase <yu...@synechron.com>.
-          One has to write custom goal and attach to the test phase of maven build life cycle. Goal checks if test failure and do the action.

http://maven.apache.org/guides/plugin/guide-java-plugin-development.html





Regards,

Yuvaraj





-----Original Message-----
From: Xavier S. [mailto:xavier.seignard@gmail.com]
Sent: Tuesday, January 10, 2012 5:45 PM
To: Maven Users List
Subject: How to run a maven goal when there is tests failures?



Hello,



I would like to know if there is a way to execute a goal when there is test

failures?



Since maven stops its execution (fail fast mode) after encountering a test

failure, is there any options to launch a goal between that test failure

and he stop of maven?



Regards,

Xavier.

Re: How to run a maven goal when there is tests failures?

Posted by Martin Höller <ma...@xss.co.at>.
On Tuesday 10 January 2012 Xavier S. wrote:
> Hello,
>
> I would like to know if there is a way to execute a goal when there is
> test failures?

Use mvn -DskipTests.

You can also try mvn -Dmaven.test.skip=true, which is a bit longer and not 
only skips test execution but also skips test compilation.

hth,
- martin

Re: How to run a maven goal when there is tests failures?

Posted by Stephen Connolly <st...@gmail.com>.
you'd need to do something like failsafe, where the execution is
separated from the checking and failing the build.... might even get
what you want using just failsafe

On 10 January 2012 13:05, Xavier S. <xa...@gmail.com> wrote:
> Hello,
>
> I would like to know if there is a way to execute a goal when there is test
> failures?
>
> Since maven stops its execution (fail fast mode) after encountering a test
> failure, is there any options to launch a goal between that test failure
> and he stop of maven?
>
> Regards,
> Xavier.

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


Re: How to run a maven goal when there is tests failures?

Posted by Jeff MAURY <je...@jeffmaury.com>.
You can configure the maven surefire plugin to ignore errors (not the
default). Look at the Maven Surefire plugin documentation.

Regards
Jeff MAURY

---------- Forwarded message ----------
From: Xavier S. <xa...@gmail.com>
Date: Tue, Jan 10, 2012 at 2:05 PM
Subject: How to run a maven goal when there is tests failures?
To: Maven Users List <us...@maven.apache.org>


Hello,

I would like to know if there is a way to execute a goal when there is test
failures?

Since maven stops its execution (fail fast mode) after encountering a test
failure, is there any options to launch a goal between that test failure
and he stop of maven?

Regards,
Xavier.



-- 
"Legacy code" often differs from its suggested alternative by actually
working and scaling.
 - Bjarne Stroustrup

http://www.jeffmaury.com
http://riadiscuss.jeffmaury.com
http://www.twitter.com/jeffmaury

Re: How to run a maven goal when there is tests failures?

Posted by Guillaume Polet <gu...@gmail.com>.
Although I did see your answer, I did not understand how failsafe was 
resolving the problem, I do now.

Cheers,
Guillaume

Le 10/01/2012 19:19, Stephen Connolly a écrit :
> given that nobody else bothered to read the original question, it does not
> surprise me that nobody bothered to read my original answer of using
> failsafe ;-)
>
> - Stephen
>
> ---
> Sent from my Android phone, so random spelling mistakes, random nonsense
> words and other nonsense are a direct result of using swype to type on the
> screen
> On 10 Jan 2012 18:16, "Stephen Connolly"<st...@gmail.com>
> wrote:
>
>> use failsafe.
>>
>> parse the failsafe results yourself... if they show a test failure, do
>> your special thing then let failsafe verify stop the build
>>
>> - Stephen
>>
>> ---
>> Sent from my Android phone, so random spelling mistakes, random nonsense
>> words and other nonsense are a direct result of using swype to type on the
>> screen
>> On 10 Jan 2012 16:58, "Xavier S."<xa...@gmail.com>  wrote:
>>
>>> Thanks Guillaume!
>>> That's exactly what I want to do.
>>>
>>> So people, any idea?
>>>
>>> Regards,
>>>
>>> Xavier
>>>
>>> 2012/1/10 Guillaume Polet<gu...@gmail.com>
>>>
>>>> Tell me if I am wrong Xavier, but I think that what he would like to do
>>> is
>>>> perform something special when the tests fail, not just skip them or not
>>>> fail the build. My guess would be that he is expecting some kind of "on
>>>> failure"/"on tests failure" phase where he could attach other maven
>>> plugins
>>>> to perform alternate behaviour.
>>>>
>>>> Unfortunately I have no idea on how this could be done. Probably using
>>> Ant
>>>> or by writing your own plugin, but I find both solutions quite poor.
>>> Maybe
>>>> Maven is not the tool to be used to perform this. Although you can do a
>>> lot
>>>> of things with Maven, sometimes bending its original objectives too far
>>>> away is just cumbersome and counter-productive /(not sure this english,
>>>> btw).
>>>>
>>>> /Cheers,
>>>> Guillaume
>>>> Le 10/01/2012 17:22, Jeff MAURY a écrit :
>>>>
>>>>   what about
>>> http://maven.apache.org/**plugins/maven-surefire-plugin/**test-mojo.html#
>>>>> **testFailureIgnore<
>>> http://maven.apache.org/plugins/maven-surefire-plugin/test-mojo.html#testFailureIgnore
>>>>> Jeff MAURY
>>>>>
>>>>> On Tue, Jan 10, 2012 at 4:55 PM, Xavier S.<xavier.seignard@gmail.com
>>>> **
>>>>> wrote:
>>>>>
>>>>>   Thanks for all your answers, but I think I should re explain my need.
>>>>>> I don't want to skip the tests. The default fail fast mode of maven
>>> suits
>>>>>> me (section 6.1.8
>>>>>>
>>>>>> http://www.sonatype.com/books/**mvnref-book/reference/running-**
>>>>>> sect-options.html<
>>> http://www.sonatype.com/books/mvnref-book/reference/running-sect-options.html
>>>>>> ).
>>>>>>
>>>>>> I just want to run my custom mojo just after my tests failures and
>>> just
>>>>>> before the end of the maven execution (if there is build failures,
>>> maven
>>>>>> do
>>>>>> not even finishes the current test phase).
>>>>>>
>>>>>> Regards,
>>>>>>
>>>>>> Xavier
>>>>>>
>>>>>>
>>>>>


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


Re: How to run a maven goal when there is tests failures?

Posted by Stephen Connolly <st...@gmail.com>.
you may have to override the default phases, disable surefire (as you
cannot unbind from lifecycle), and change the includes pattern for failsafe
to the surefire one.

if you do the above, should have no side effects other than your intended
as they both use the same back end

- Stephen

---
Sent from my Android phone, so random spelling mistakes, random nonsense
words and other nonsense are a direct result of using swype to type on the
screen
On 11 Jan 2012 07:32, "Xavier S." <xa...@gmail.com> wrote:

> :)
> Sorry, I missed your answer in the noise! I'll give it a try and let you
> know. (I hope it won't have side effects using failsafe rather than
> surefire).
>
> Regards,
>
> Xavier
>
> 2012/1/10 Stephen Connolly <st...@gmail.com>
>
> > given that nobody else bothered to read the original question, it does
> not
> > surprise me that nobody bothered to read my original answer of using
> > failsafe ;-)
> >
> > - Stephen
> >
> > ---
> > Sent from my Android phone, so random spelling mistakes, random nonsense
> > words and other nonsense are a direct result of using swype to type on
> the
> > screen
> > On 10 Jan 2012 18:16, "Stephen Connolly" <
> stephen.alan.connolly@gmail.com>
> > wrote:
> >
> > > use failsafe.
> > >
> > > parse the failsafe results yourself... if they show a test failure, do
> > > your special thing then let failsafe verify stop the build
> > >
> > > - Stephen
> > >
> > > ---
> > > Sent from my Android phone, so random spelling mistakes, random
> nonsense
> > > words and other nonsense are a direct result of using swype to type on
> > the
> > > screen
> > > On 10 Jan 2012 16:58, "Xavier S." <xa...@gmail.com> wrote:
> > >
> > >> Thanks Guillaume!
> > >> That's exactly what I want to do.
> > >>
> > >> So people, any idea?
> > >>
> > >> Regards,
> > >>
> > >> Xavier
> > >>
> > >> 2012/1/10 Guillaume Polet <gu...@gmail.com>
> > >>
> > >> > Tell me if I am wrong Xavier, but I think that what he would like to
> > do
> > >> is
> > >> > perform something special when the tests fail, not just skip them or
> > not
> > >> > fail the build. My guess would be that he is expecting some kind of
> > "on
> > >> > failure"/"on tests failure" phase where he could attach other maven
> > >> plugins
> > >> > to perform alternate behaviour.
> > >> >
> > >> > Unfortunately I have no idea on how this could be done. Probably
> using
> > >> Ant
> > >> > or by writing your own plugin, but I find both solutions quite poor.
> > >> Maybe
> > >> > Maven is not the tool to be used to perform this. Although you can
> do
> > a
> > >> lot
> > >> > of things with Maven, sometimes bending its original objectives too
> > far
> > >> > away is just cumbersome and counter-productive /(not sure this
> > english,
> > >> > btw).
> > >> >
> > >> > /Cheers,
> > >> > Guillaume
> > >> > Le 10/01/2012 17:22, Jeff MAURY a écrit :
> > >> >
> > >> >  what about
> > >> >>
> > >>
> >
> http://maven.apache.org/**plugins/maven-surefire-plugin/**test-mojo.html#
> > >> >> **testFailureIgnore<
> > >>
> >
> http://maven.apache.org/plugins/maven-surefire-plugin/test-mojo.html#testFailureIgnore
> > >> >
> > >> >>
> > >> >> Jeff MAURY
> > >> >>
> > >> >> On Tue, Jan 10, 2012 at 4:55 PM, Xavier S.<
> xavier.seignard@gmail.com
> > >> >**
> > >> >> wrote:
> > >> >>
> > >> >>  Thanks for all your answers, but I think I should re explain my
> > need.
> > >> >>>
> > >> >>> I don't want to skip the tests. The default fail fast mode of
> maven
> > >> suits
> > >> >>> me (section 6.1.8
> > >> >>>
> > >> >>> http://www.sonatype.com/books/**mvnref-book/reference/running-**
> > >> >>> sect-options.html<
> > >>
> >
> http://www.sonatype.com/books/mvnref-book/reference/running-sect-options.html
> > >> >
> > >> >>> ).
> > >> >>>
> > >> >>> I just want to run my custom mojo just after my tests failures and
> > >> just
> > >> >>> before the end of the maven execution (if there is build failures,
> > >> maven
> > >> >>> do
> > >> >>> not even finishes the current test phase).
> > >> >>>
> > >> >>> Regards,
> > >> >>>
> > >> >>> Xavier
> > >> >>>
> > >> >>>
> > >> >>
> > >> >>
> > >> >
> > >>
> > >
> >
>

Re: How to run a maven goal when there is tests failures?

Posted by "Xavier S." <xa...@gmail.com>.
:)
Sorry, I missed your answer in the noise! I'll give it a try and let you
know. (I hope it won't have side effects using failsafe rather than
surefire).

Regards,

Xavier

2012/1/10 Stephen Connolly <st...@gmail.com>

> given that nobody else bothered to read the original question, it does not
> surprise me that nobody bothered to read my original answer of using
> failsafe ;-)
>
> - Stephen
>
> ---
> Sent from my Android phone, so random spelling mistakes, random nonsense
> words and other nonsense are a direct result of using swype to type on the
> screen
> On 10 Jan 2012 18:16, "Stephen Connolly" <st...@gmail.com>
> wrote:
>
> > use failsafe.
> >
> > parse the failsafe results yourself... if they show a test failure, do
> > your special thing then let failsafe verify stop the build
> >
> > - Stephen
> >
> > ---
> > Sent from my Android phone, so random spelling mistakes, random nonsense
> > words and other nonsense are a direct result of using swype to type on
> the
> > screen
> > On 10 Jan 2012 16:58, "Xavier S." <xa...@gmail.com> wrote:
> >
> >> Thanks Guillaume!
> >> That's exactly what I want to do.
> >>
> >> So people, any idea?
> >>
> >> Regards,
> >>
> >> Xavier
> >>
> >> 2012/1/10 Guillaume Polet <gu...@gmail.com>
> >>
> >> > Tell me if I am wrong Xavier, but I think that what he would like to
> do
> >> is
> >> > perform something special when the tests fail, not just skip them or
> not
> >> > fail the build. My guess would be that he is expecting some kind of
> "on
> >> > failure"/"on tests failure" phase where he could attach other maven
> >> plugins
> >> > to perform alternate behaviour.
> >> >
> >> > Unfortunately I have no idea on how this could be done. Probably using
> >> Ant
> >> > or by writing your own plugin, but I find both solutions quite poor.
> >> Maybe
> >> > Maven is not the tool to be used to perform this. Although you can do
> a
> >> lot
> >> > of things with Maven, sometimes bending its original objectives too
> far
> >> > away is just cumbersome and counter-productive /(not sure this
> english,
> >> > btw).
> >> >
> >> > /Cheers,
> >> > Guillaume
> >> > Le 10/01/2012 17:22, Jeff MAURY a écrit :
> >> >
> >> >  what about
> >> >>
> >>
> http://maven.apache.org/**plugins/maven-surefire-plugin/**test-mojo.html#
> >> >> **testFailureIgnore<
> >>
> http://maven.apache.org/plugins/maven-surefire-plugin/test-mojo.html#testFailureIgnore
> >> >
> >> >>
> >> >> Jeff MAURY
> >> >>
> >> >> On Tue, Jan 10, 2012 at 4:55 PM, Xavier S.<xavier.seignard@gmail.com
> >> >**
> >> >> wrote:
> >> >>
> >> >>  Thanks for all your answers, but I think I should re explain my
> need.
> >> >>>
> >> >>> I don't want to skip the tests. The default fail fast mode of maven
> >> suits
> >> >>> me (section 6.1.8
> >> >>>
> >> >>> http://www.sonatype.com/books/**mvnref-book/reference/running-**
> >> >>> sect-options.html<
> >>
> http://www.sonatype.com/books/mvnref-book/reference/running-sect-options.html
> >> >
> >> >>> ).
> >> >>>
> >> >>> I just want to run my custom mojo just after my tests failures and
> >> just
> >> >>> before the end of the maven execution (if there is build failures,
> >> maven
> >> >>> do
> >> >>> not even finishes the current test phase).
> >> >>>
> >> >>> Regards,
> >> >>>
> >> >>> Xavier
> >> >>>
> >> >>>
> >> >>
> >> >>
> >> >
> >>
> >
>

Re: How to run a maven goal when there is tests failures?

Posted by Stephen Connolly <st...@gmail.com>.
given that nobody else bothered to read the original question, it does not
surprise me that nobody bothered to read my original answer of using
failsafe ;-)

- Stephen

---
Sent from my Android phone, so random spelling mistakes, random nonsense
words and other nonsense are a direct result of using swype to type on the
screen
On 10 Jan 2012 18:16, "Stephen Connolly" <st...@gmail.com>
wrote:

> use failsafe.
>
> parse the failsafe results yourself... if they show a test failure, do
> your special thing then let failsafe verify stop the build
>
> - Stephen
>
> ---
> Sent from my Android phone, so random spelling mistakes, random nonsense
> words and other nonsense are a direct result of using swype to type on the
> screen
> On 10 Jan 2012 16:58, "Xavier S." <xa...@gmail.com> wrote:
>
>> Thanks Guillaume!
>> That's exactly what I want to do.
>>
>> So people, any idea?
>>
>> Regards,
>>
>> Xavier
>>
>> 2012/1/10 Guillaume Polet <gu...@gmail.com>
>>
>> > Tell me if I am wrong Xavier, but I think that what he would like to do
>> is
>> > perform something special when the tests fail, not just skip them or not
>> > fail the build. My guess would be that he is expecting some kind of "on
>> > failure"/"on tests failure" phase where he could attach other maven
>> plugins
>> > to perform alternate behaviour.
>> >
>> > Unfortunately I have no idea on how this could be done. Probably using
>> Ant
>> > or by writing your own plugin, but I find both solutions quite poor.
>> Maybe
>> > Maven is not the tool to be used to perform this. Although you can do a
>> lot
>> > of things with Maven, sometimes bending its original objectives too far
>> > away is just cumbersome and counter-productive /(not sure this english,
>> > btw).
>> >
>> > /Cheers,
>> > Guillaume
>> > Le 10/01/2012 17:22, Jeff MAURY a écrit :
>> >
>> >  what about
>> >>
>> http://maven.apache.org/**plugins/maven-surefire-plugin/**test-mojo.html#
>> >> **testFailureIgnore<
>> http://maven.apache.org/plugins/maven-surefire-plugin/test-mojo.html#testFailureIgnore
>> >
>> >>
>> >> Jeff MAURY
>> >>
>> >> On Tue, Jan 10, 2012 at 4:55 PM, Xavier S.<xavier.seignard@gmail.com
>> >**
>> >> wrote:
>> >>
>> >>  Thanks for all your answers, but I think I should re explain my need.
>> >>>
>> >>> I don't want to skip the tests. The default fail fast mode of maven
>> suits
>> >>> me (section 6.1.8
>> >>>
>> >>> http://www.sonatype.com/books/**mvnref-book/reference/running-**
>> >>> sect-options.html<
>> http://www.sonatype.com/books/mvnref-book/reference/running-sect-options.html
>> >
>> >>> ).
>> >>>
>> >>> I just want to run my custom mojo just after my tests failures and
>> just
>> >>> before the end of the maven execution (if there is build failures,
>> maven
>> >>> do
>> >>> not even finishes the current test phase).
>> >>>
>> >>> Regards,
>> >>>
>> >>> Xavier
>> >>>
>> >>>
>> >>
>> >>
>> >
>>
>

Re: How to run a maven goal when there is tests failures?

Posted by Stephen Connolly <st...@gmail.com>.
use failsafe.

parse the failsafe results yourself... if they show a test failure, do your
special thing then let failsafe verify stop the build

- Stephen

---
Sent from my Android phone, so random spelling mistakes, random nonsense
words and other nonsense are a direct result of using swype to type on the
screen
On 10 Jan 2012 16:58, "Xavier S." <xa...@gmail.com> wrote:

> Thanks Guillaume!
> That's exactly what I want to do.
>
> So people, any idea?
>
> Regards,
>
> Xavier
>
> 2012/1/10 Guillaume Polet <gu...@gmail.com>
>
> > Tell me if I am wrong Xavier, but I think that what he would like to do
> is
> > perform something special when the tests fail, not just skip them or not
> > fail the build. My guess would be that he is expecting some kind of "on
> > failure"/"on tests failure" phase where he could attach other maven
> plugins
> > to perform alternate behaviour.
> >
> > Unfortunately I have no idea on how this could be done. Probably using
> Ant
> > or by writing your own plugin, but I find both solutions quite poor.
> Maybe
> > Maven is not the tool to be used to perform this. Although you can do a
> lot
> > of things with Maven, sometimes bending its original objectives too far
> > away is just cumbersome and counter-productive /(not sure this english,
> > btw).
> >
> > /Cheers,
> > Guillaume
> > Le 10/01/2012 17:22, Jeff MAURY a écrit :
> >
> >  what about
> >>
> http://maven.apache.org/**plugins/maven-surefire-plugin/**test-mojo.html#
> >> **testFailureIgnore<
> http://maven.apache.org/plugins/maven-surefire-plugin/test-mojo.html#testFailureIgnore
> >
> >>
> >> Jeff MAURY
> >>
> >> On Tue, Jan 10, 2012 at 4:55 PM, Xavier S.<xa...@gmail.com>**
> >> wrote:
> >>
> >>  Thanks for all your answers, but I think I should re explain my need.
> >>>
> >>> I don't want to skip the tests. The default fail fast mode of maven
> suits
> >>> me (section 6.1.8
> >>>
> >>> http://www.sonatype.com/books/**mvnref-book/reference/running-**
> >>> sect-options.html<
> http://www.sonatype.com/books/mvnref-book/reference/running-sect-options.html
> >
> >>> ).
> >>>
> >>> I just want to run my custom mojo just after my tests failures and just
> >>> before the end of the maven execution (if there is build failures,
> maven
> >>> do
> >>> not even finishes the current test phase).
> >>>
> >>> Regards,
> >>>
> >>> Xavier
> >>>
> >>>
> >>
> >>
> >
>

Re: How to run a maven goal when there is tests failures?

Posted by "Xavier S." <xa...@gmail.com>.
Thanks Guillaume!
That's exactly what I want to do.

So people, any idea?

Regards,

Xavier

2012/1/10 Guillaume Polet <gu...@gmail.com>

> Tell me if I am wrong Xavier, but I think that what he would like to do is
> perform something special when the tests fail, not just skip them or not
> fail the build. My guess would be that he is expecting some kind of "on
> failure"/"on tests failure" phase where he could attach other maven plugins
> to perform alternate behaviour.
>
> Unfortunately I have no idea on how this could be done. Probably using Ant
> or by writing your own plugin, but I find both solutions quite poor. Maybe
> Maven is not the tool to be used to perform this. Although you can do a lot
> of things with Maven, sometimes bending its original objectives too far
> away is just cumbersome and counter-productive /(not sure this english,
> btw).
>
> /Cheers,
> Guillaume
> Le 10/01/2012 17:22, Jeff MAURY a écrit :
>
>  what about
>> http://maven.apache.org/**plugins/maven-surefire-plugin/**test-mojo.html#
>> **testFailureIgnore<http://maven.apache.org/plugins/maven-surefire-plugin/test-mojo.html#testFailureIgnore>
>>
>> Jeff MAURY
>>
>> On Tue, Jan 10, 2012 at 4:55 PM, Xavier S.<xa...@gmail.com>**
>> wrote:
>>
>>  Thanks for all your answers, but I think I should re explain my need.
>>>
>>> I don't want to skip the tests. The default fail fast mode of maven suits
>>> me (section 6.1.8
>>>
>>> http://www.sonatype.com/books/**mvnref-book/reference/running-**
>>> sect-options.html<http://www.sonatype.com/books/mvnref-book/reference/running-sect-options.html>
>>> ).
>>>
>>> I just want to run my custom mojo just after my tests failures and just
>>> before the end of the maven execution (if there is build failures, maven
>>> do
>>> not even finishes the current test phase).
>>>
>>> Regards,
>>>
>>> Xavier
>>>
>>>
>>
>>
>

Re: How to run a maven goal when there is tests failures?

Posted by Guillaume Polet <gu...@gmail.com>.
Tell me if I am wrong Xavier, but I think that what he would like to do 
is perform something special when the tests fail, not just skip them or 
not fail the build. My guess would be that he is expecting some kind of 
"on failure"/"on tests failure" phase where he could attach other maven 
plugins to perform alternate behaviour.

Unfortunately I have no idea on how this could be done. Probably using 
Ant or by writing your own plugin, but I find both solutions quite poor. 
Maybe Maven is not the tool to be used to perform this. Although you can 
do a lot of things with Maven, sometimes bending its original objectives 
too far away is just cumbersome and counter-productive /(not sure this 
english, btw).

/Cheers,
Guillaume
Le 10/01/2012 17:22, Jeff MAURY a écrit :
> what about
> http://maven.apache.org/plugins/maven-surefire-plugin/test-mojo.html#testFailureIgnore
>
> Jeff MAURY
>
> On Tue, Jan 10, 2012 at 4:55 PM, Xavier S.<xa...@gmail.com>wrote:
>
>> Thanks for all your answers, but I think I should re explain my need.
>>
>> I don't want to skip the tests. The default fail fast mode of maven suits
>> me (section 6.1.8
>>
>> http://www.sonatype.com/books/mvnref-book/reference/running-sect-options.html
>> ).
>>
>> I just want to run my custom mojo just after my tests failures and just
>> before the end of the maven execution (if there is build failures, maven do
>> not even finishes the current test phase).
>>
>> Regards,
>>
>> Xavier
>>
>
>


Re: How to run a maven goal when there is tests failures?

Posted by Jeff MAURY <je...@jeffmaury.com>.
what about
http://maven.apache.org/plugins/maven-surefire-plugin/test-mojo.html#testFailureIgnore

Jeff MAURY

On Tue, Jan 10, 2012 at 4:55 PM, Xavier S. <xa...@gmail.com>wrote:

> Thanks for all your answers, but I think I should re explain my need.
>
> I don't want to skip the tests. The default fail fast mode of maven suits
> me (section 6.1.8
>
> http://www.sonatype.com/books/mvnref-book/reference/running-sect-options.html
> ).
>
> I just want to run my custom mojo just after my tests failures and just
> before the end of the maven execution (if there is build failures, maven do
> not even finishes the current test phase).
>
> Regards,
>
> Xavier
>



-- 
"Legacy code" often differs from its suggested alternative by actually
working and scaling.
 - Bjarne Stroustrup

http://www.jeffmaury.com
http://riadiscuss.jeffmaury.com
http://www.twitter.com/jeffmaury

Re: How to run a maven goal when there is tests failures?

Posted by "Xavier S." <xa...@gmail.com>.
Thanks for all your answers, but I think I should re explain my need.

I don't want to skip the tests. The default fail fast mode of maven suits
me (section 6.1.8
http://www.sonatype.com/books/mvnref-book/reference/running-sect-options.html
).

I just want to run my custom mojo just after my tests failures and just
before the end of the maven execution (if there is build failures, maven do
not even finishes the current test phase).

Regards,

Xavier

Re: How to run a maven goal when there is tests failures?

Posted by Benjamin Dreux <dr...@uqam.ca>.
You can just skip the test.
To do so you have multiple solution.
Comment out all you test which could be long and error prone.
Remove them from you testSuite, which dependly hardly on your plateform.

And pass a special command to maven
http://maven.apache.org/general.html#skip-test
Or you can make some special profile for that.

Le 10 janvier 2012 08:05, Xavier S. <xa...@gmail.com> a écrit :
> Hello,
>
> I would like to know if there is a way to execute a goal when there is test
> failures?
>
> Since maven stops its execution (fail fast mode) after encountering a test
> failure, is there any options to launch a goal between that test failure
> and he stop of maven?
>
> Regards,
> Xavier.



-- 
Benjamin Dreux
Analyste-Programmeur
Chaire de logiciel libre-Finance Social et solidaire
UQAM
Montréal

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


How to run a maven goal when there is tests failures?

Posted by "Xavier S." <xa...@gmail.com>.
Hello,

I would like to know if there is a way to execute a goal when there is test
failures?

Since maven stops its execution (fail fast mode) after encountering a test
failure, is there any options to launch a goal between that test failure
and he stop of maven?

Regards,
Xavier.