You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "C. Benson Manica" <cb...@gmail.com> on 2010/08/10 18:32:55 UTC

Skip tests on release

mvn -DskipTests=true -Dmaven.test.skip=true release:perform still insists on
running the unit tests.  Why?  They already ran on release:prepare, I
really, really, really get annoyed sitting through five minutes of unit
tests that I know pass because I just ran them.

-- 
C. Benson Manica
cbmanica@gmail.com

Re: Skip tests on release

Posted by "a.geo" <aq...@gmail.com>.
And again, ANT solution... :D

not just kidding...

you can use profiles

<profiles>
  <profile>
    <id>production</id>
    <properties>
      <maven.test.skip>true</maven.test.skip>
    </properties>
  </profile>
</profiles>

and then use mvn package -P production



2010/8/11 Tony Chemit <ch...@codelutin.com>

> Le Wed, 11 Aug 2010 08:33:06 -0400,
> "C. Benson Manica" <cb...@gmail.com> a écrit :
>
> > Thanks, this seems to be what I was looking for.
> Yeah, as it was written in the link I gave you...
>
> >
> > On Tue, Aug 10, 2010 at 1:35 PM, Larry Shatzer, Jr. <larrys@gmail.com
> >wrote:
> >
> > > I've seen it like this in a parent corporate pom:
> > >
> > > In the release plugin configuration:
> > >
> > >      <plugin>
> > >        <groupId>org.apache.maven.plugins</groupId>
> > >         <artifactId>maven-release-plugin</artifactId>
> > >        <configuration>
> > >          <preparationGoals>clean install</preparationGoals>
> > >          <goals>deploy -P release</goals>
> > >        </configuration>
> > >      </plugin>
> > >
> > > Then later on:
> > >
> > >    <profile>
> > >      <!-- Used only when invoking release:perform so as not to re-run
> > > tests as part of the deployment-->
> > >      <id>release</id>
> > >      <properties>
> > >        <skipTests>true</skipTests>
> > >      </properties>
> > >    </profile>
> > >
> > > On Tue, Aug 10, 2010 at 11:25 AM, C. Benson Manica <cbmanica@gmail.com
> >
> > > wrote:
> > > > I do pretty much always want to release with the tests done, but why
> do
> > > they
> > > > have to run twice for essentially the same process, i.e. prepare and
> > > > perform?  They take a long time, and are they really likely to fail
> > > between
> > > > prepare and perform?  I guess if I'm stuck, I'm stuck, but this seems
> > > > gratuitous.
> > > >
> > > > On Tue, Aug 10, 2010 at 12:40 PM, Tony Chemit <ch...@codelutin.com>
> > > wrote:
> > > >
> > > >> Le Tue, 10 Aug 2010 12:32:55 -0400,
> > > >> "C. Benson Manica" <cb...@gmail.com> a écrit :
> > > >>
> > > >> > mvn -DskipTests=true -Dmaven.test.skip=true release:perform still
> > > insists
> > > >> on
> > > >> > running the unit tests.  Why?  They already ran on
> release:prepare, I
> > > >> > really, really, really get annoyed sitting through five minutes of
> > > unit
> > > >> > tests that I know pass because I just ran them.
> > > >> >
> > > >>
> > > >> When doing a mvn release:perform, the plugin just launch another
> > > instance
> > > >> of maven with by default this command :
> > > >>
> > > >> mvn deploy site-deploy -DperformRelease
> > > >>
> > > >> So you will never be able to change this behaviour like you are
> trying
> > > to
> > > >> do.
> > > >>
> > > >> To make this possible you can use one of the release:perform
> parameter.
> > > >>
> > > >> Before shouting after maven, just try to understand it :) and have a
> > > look
> > > >> to the documentation.
> > > >>
> > > >> In your case, this the page [0]
> > > >>
> > > >> What your are doing seems not natural to me, one of my best-pratice
> is
> > > to
> > > >> ALWAYS release with tests done, otherwise, the generated ste (and
> the
> > > >> surefire report) will say : no tests passed, is it really what you
> want
> > > ?
> > > >>
> > > >> [0]
> > > http://maven.apache.org/plugins/maven-release-plugin/perform-mojo.html
> > > >>
> > > >>
> > > >> --
> > > >> Tony Chemit
> > > >> --------------------
> > > >> tél: +33 (0) 2 40 50 29 28
> > > >> email: chemit@codelutin.com
> > > >> http://www.codelutin.com
> > > >>
> > > >>
> ---------------------------------------------------------------------
> > > >> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > >> For additional commands, e-mail: users-help@maven.apache.org
> > > >>
> > > >>
> > > >
> > > >
> > > > --
> > > > C. Benson Manica
> > > > cbmanica@gmail.com
> > > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > For additional commands, e-mail: users-help@maven.apache.org
> > >
> > >
> >
> >
>
>
>
> --
> Tony Chemit
> --------------------
> tél: +33 (0) 2 40 50 29 28
> email: chemit@codelutin.com
> http://www.codelutin.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


-- 
Cesar De la Cruz Rojas
*
-----------------------------------------------------------------------------
*
Sennior Software Engineer
-----------------------------------------------------------------------------
Follow me in Facebook : http://www.facebook.com/aquiles.geo
Twitter http://twitter.com/ageo
Picture blog http://ageo.deviantart.com

Re: Skip tests on release

Posted by Tony Chemit <ch...@codelutin.com>.
Le Wed, 11 Aug 2010 08:33:06 -0400,
"C. Benson Manica" <cb...@gmail.com> a écrit :

> Thanks, this seems to be what I was looking for.
Yeah, as it was written in the link I gave you...

> 
> On Tue, Aug 10, 2010 at 1:35 PM, Larry Shatzer, Jr. <la...@gmail.com>wrote:
> 
> > I've seen it like this in a parent corporate pom:
> >
> > In the release plugin configuration:
> >
> >      <plugin>
> >        <groupId>org.apache.maven.plugins</groupId>
> >         <artifactId>maven-release-plugin</artifactId>
> >        <configuration>
> >          <preparationGoals>clean install</preparationGoals>
> >          <goals>deploy -P release</goals>
> >        </configuration>
> >      </plugin>
> >
> > Then later on:
> >
> >    <profile>
> >      <!-- Used only when invoking release:perform so as not to re-run
> > tests as part of the deployment-->
> >      <id>release</id>
> >      <properties>
> >        <skipTests>true</skipTests>
> >      </properties>
> >    </profile>
> >
> > On Tue, Aug 10, 2010 at 11:25 AM, C. Benson Manica <cb...@gmail.com>
> > wrote:
> > > I do pretty much always want to release with the tests done, but why do
> > they
> > > have to run twice for essentially the same process, i.e. prepare and
> > > perform?  They take a long time, and are they really likely to fail
> > between
> > > prepare and perform?  I guess if I'm stuck, I'm stuck, but this seems
> > > gratuitous.
> > >
> > > On Tue, Aug 10, 2010 at 12:40 PM, Tony Chemit <ch...@codelutin.com>
> > wrote:
> > >
> > >> Le Tue, 10 Aug 2010 12:32:55 -0400,
> > >> "C. Benson Manica" <cb...@gmail.com> a écrit :
> > >>
> > >> > mvn -DskipTests=true -Dmaven.test.skip=true release:perform still
> > insists
> > >> on
> > >> > running the unit tests.  Why?  They already ran on release:prepare, I
> > >> > really, really, really get annoyed sitting through five minutes of
> > unit
> > >> > tests that I know pass because I just ran them.
> > >> >
> > >>
> > >> When doing a mvn release:perform, the plugin just launch another
> > instance
> > >> of maven with by default this command :
> > >>
> > >> mvn deploy site-deploy -DperformRelease
> > >>
> > >> So you will never be able to change this behaviour like you are trying
> > to
> > >> do.
> > >>
> > >> To make this possible you can use one of the release:perform parameter.
> > >>
> > >> Before shouting after maven, just try to understand it :) and have a
> > look
> > >> to the documentation.
> > >>
> > >> In your case, this the page [0]
> > >>
> > >> What your are doing seems not natural to me, one of my best-pratice is
> > to
> > >> ALWAYS release with tests done, otherwise, the generated ste (and the
> > >> surefire report) will say : no tests passed, is it really what you want
> > ?
> > >>
> > >> [0]
> > http://maven.apache.org/plugins/maven-release-plugin/perform-mojo.html
> > >>
> > >>
> > >> --
> > >> Tony Chemit
> > >> --------------------
> > >> tél: +33 (0) 2 40 50 29 28
> > >> email: chemit@codelutin.com
> > >> http://www.codelutin.com
> > >>
> > >> ---------------------------------------------------------------------
> > >> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > >> For additional commands, e-mail: users-help@maven.apache.org
> > >>
> > >>
> > >
> > >
> > > --
> > > C. Benson Manica
> > > cbmanica@gmail.com
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
> 
> 



-- 
Tony Chemit
--------------------
tél: +33 (0) 2 40 50 29 28
email: chemit@codelutin.com  
http://www.codelutin.com 

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


Re: Skip tests on release

Posted by "C. Benson Manica" <cb...@gmail.com>.
Thanks, this seems to be what I was looking for.

On Tue, Aug 10, 2010 at 1:35 PM, Larry Shatzer, Jr. <la...@gmail.com>wrote:

> I've seen it like this in a parent corporate pom:
>
> In the release plugin configuration:
>
>      <plugin>
>        <groupId>org.apache.maven.plugins</groupId>
>         <artifactId>maven-release-plugin</artifactId>
>        <configuration>
>          <preparationGoals>clean install</preparationGoals>
>          <goals>deploy -P release</goals>
>        </configuration>
>      </plugin>
>
> Then later on:
>
>    <profile>
>      <!-- Used only when invoking release:perform so as not to re-run
> tests as part of the deployment-->
>      <id>release</id>
>      <properties>
>        <skipTests>true</skipTests>
>      </properties>
>    </profile>
>
> On Tue, Aug 10, 2010 at 11:25 AM, C. Benson Manica <cb...@gmail.com>
> wrote:
> > I do pretty much always want to release with the tests done, but why do
> they
> > have to run twice for essentially the same process, i.e. prepare and
> > perform?  They take a long time, and are they really likely to fail
> between
> > prepare and perform?  I guess if I'm stuck, I'm stuck, but this seems
> > gratuitous.
> >
> > On Tue, Aug 10, 2010 at 12:40 PM, Tony Chemit <ch...@codelutin.com>
> wrote:
> >
> >> Le Tue, 10 Aug 2010 12:32:55 -0400,
> >> "C. Benson Manica" <cb...@gmail.com> a écrit :
> >>
> >> > mvn -DskipTests=true -Dmaven.test.skip=true release:perform still
> insists
> >> on
> >> > running the unit tests.  Why?  They already ran on release:prepare, I
> >> > really, really, really get annoyed sitting through five minutes of
> unit
> >> > tests that I know pass because I just ran them.
> >> >
> >>
> >> When doing a mvn release:perform, the plugin just launch another
> instance
> >> of maven with by default this command :
> >>
> >> mvn deploy site-deploy -DperformRelease
> >>
> >> So you will never be able to change this behaviour like you are trying
> to
> >> do.
> >>
> >> To make this possible you can use one of the release:perform parameter.
> >>
> >> Before shouting after maven, just try to understand it :) and have a
> look
> >> to the documentation.
> >>
> >> In your case, this the page [0]
> >>
> >> What your are doing seems not natural to me, one of my best-pratice is
> to
> >> ALWAYS release with tests done, otherwise, the generated ste (and the
> >> surefire report) will say : no tests passed, is it really what you want
> ?
> >>
> >> [0]
> http://maven.apache.org/plugins/maven-release-plugin/perform-mojo.html
> >>
> >>
> >> --
> >> Tony Chemit
> >> --------------------
> >> tél: +33 (0) 2 40 50 29 28
> >> email: chemit@codelutin.com
> >> http://www.codelutin.com
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> >> For additional commands, e-mail: users-help@maven.apache.org
> >>
> >>
> >
> >
> > --
> > C. Benson Manica
> > cbmanica@gmail.com
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


-- 
C. Benson Manica
cbmanica@gmail.com

Re: Skip tests on release

Posted by "Larry Shatzer, Jr." <la...@gmail.com>.
I've seen it like this in a parent corporate pom:

In the release plugin configuration:

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-release-plugin</artifactId>
        <configuration>
          <preparationGoals>clean install</preparationGoals>
          <goals>deploy -P release</goals>
        </configuration>
      </plugin>

Then later on:

    <profile>
      <!-- Used only when invoking release:perform so as not to re-run
tests as part of the deployment-->
      <id>release</id>
      <properties>
        <skipTests>true</skipTests>
      </properties>
    </profile>

On Tue, Aug 10, 2010 at 11:25 AM, C. Benson Manica <cb...@gmail.com> wrote:
> I do pretty much always want to release with the tests done, but why do they
> have to run twice for essentially the same process, i.e. prepare and
> perform?  They take a long time, and are they really likely to fail between
> prepare and perform?  I guess if I'm stuck, I'm stuck, but this seems
> gratuitous.
>
> On Tue, Aug 10, 2010 at 12:40 PM, Tony Chemit <ch...@codelutin.com> wrote:
>
>> Le Tue, 10 Aug 2010 12:32:55 -0400,
>> "C. Benson Manica" <cb...@gmail.com> a écrit :
>>
>> > mvn -DskipTests=true -Dmaven.test.skip=true release:perform still insists
>> on
>> > running the unit tests.  Why?  They already ran on release:prepare, I
>> > really, really, really get annoyed sitting through five minutes of unit
>> > tests that I know pass because I just ran them.
>> >
>>
>> When doing a mvn release:perform, the plugin just launch another instance
>> of maven with by default this command :
>>
>> mvn deploy site-deploy -DperformRelease
>>
>> So you will never be able to change this behaviour like you are trying to
>> do.
>>
>> To make this possible you can use one of the release:perform parameter.
>>
>> Before shouting after maven, just try to understand it :) and have a look
>> to the documentation.
>>
>> In your case, this the page [0]
>>
>> What your are doing seems not natural to me, one of my best-pratice is to
>> ALWAYS release with tests done, otherwise, the generated ste (and the
>> surefire report) will say : no tests passed, is it really what you want ?
>>
>> [0] http://maven.apache.org/plugins/maven-release-plugin/perform-mojo.html
>>
>>
>> --
>> Tony Chemit
>> --------------------
>> tél: +33 (0) 2 40 50 29 28
>> email: chemit@codelutin.com
>> http://www.codelutin.com
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>
>
> --
> C. Benson Manica
> cbmanica@gmail.com
>

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


Re: Skip tests on release

Posted by Tony Chemit <ch...@codelutin.com>.
Le Tue, 10 Aug 2010 13:25:41 -0400,
"C. Benson Manica" <cb...@gmail.com> a écrit :

> I do pretty much always want to release with the tests done, but why do they
> have to run twice for essentially the same process, i.e. prepare and
> perform?  They take a long time, and are they really likely to fail between
> prepare and perform?  I guess if I'm stuck, I'm stuck, but this seems
> gratuitous.

perform goal is here to check if you can do a release.

perform really do the release.

Perharps in your case there is no impact from prepare to perform, but for us it is not the case, we really need to pass it in release stage too.

for information, when a release stage, you can see that tests are done twice : one for the deploy and one for the site-deploy (in fact for the surefire report).

I know sometime it can be a pain (and long...) but I don't think there is another to do it.

If there is anoter way, perharps maven guys can tell you more ? 

Sorry not to have a wonderfull solution for you.

> 
> On Tue, Aug 10, 2010 at 12:40 PM, Tony Chemit <ch...@codelutin.com> wrote:
> 
> > Le Tue, 10 Aug 2010 12:32:55 -0400,
> > "C. Benson Manica" <cb...@gmail.com> a écrit :
> >
> > > mvn -DskipTests=true -Dmaven.test.skip=true release:perform still insists
> > on
> > > running the unit tests.  Why?  They already ran on release:prepare, I
> > > really, really, really get annoyed sitting through five minutes of unit
> > > tests that I know pass because I just ran them.
> > >
> >
> > When doing a mvn release:perform, the plugin just launch another instance
> > of maven with by default this command :
> >
> > mvn deploy site-deploy -DperformRelease
> >
> > So you will never be able to change this behaviour like you are trying to
> > do.
> >
> > To make this possible you can use one of the release:perform parameter.
> >
> > Before shouting after maven, just try to understand it :) and have a look
> > to the documentation.
> >
> > In your case, this the page [0]
> >
> > What your are doing seems not natural to me, one of my best-pratice is to
> > ALWAYS release with tests done, otherwise, the generated ste (and the
> > surefire report) will say : no tests passed, is it really what you want ?
> >
> > [0] http://maven.apache.org/plugins/maven-release-plugin/perform-mojo.html
> >
> >
> > --
> > Tony Chemit
> > --------------------
> > tél: +33 (0) 2 40 50 29 28
> > email: chemit@codelutin.com
> > http://www.codelutin.com
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
> 
> 



-- 
Tony Chemit
--------------------
tél: +33 (0) 2 40 50 29 28
email: chemit@codelutin.com  
http://www.codelutin.com 

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


Re: Skip tests on release

Posted by "C. Benson Manica" <cb...@gmail.com>.
I do pretty much always want to release with the tests done, but why do they
have to run twice for essentially the same process, i.e. prepare and
perform?  They take a long time, and are they really likely to fail between
prepare and perform?  I guess if I'm stuck, I'm stuck, but this seems
gratuitous.

On Tue, Aug 10, 2010 at 12:40 PM, Tony Chemit <ch...@codelutin.com> wrote:

> Le Tue, 10 Aug 2010 12:32:55 -0400,
> "C. Benson Manica" <cb...@gmail.com> a écrit :
>
> > mvn -DskipTests=true -Dmaven.test.skip=true release:perform still insists
> on
> > running the unit tests.  Why?  They already ran on release:prepare, I
> > really, really, really get annoyed sitting through five minutes of unit
> > tests that I know pass because I just ran them.
> >
>
> When doing a mvn release:perform, the plugin just launch another instance
> of maven with by default this command :
>
> mvn deploy site-deploy -DperformRelease
>
> So you will never be able to change this behaviour like you are trying to
> do.
>
> To make this possible you can use one of the release:perform parameter.
>
> Before shouting after maven, just try to understand it :) and have a look
> to the documentation.
>
> In your case, this the page [0]
>
> What your are doing seems not natural to me, one of my best-pratice is to
> ALWAYS release with tests done, otherwise, the generated ste (and the
> surefire report) will say : no tests passed, is it really what you want ?
>
> [0] http://maven.apache.org/plugins/maven-release-plugin/perform-mojo.html
>
>
> --
> Tony Chemit
> --------------------
> tél: +33 (0) 2 40 50 29 28
> email: chemit@codelutin.com
> http://www.codelutin.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


-- 
C. Benson Manica
cbmanica@gmail.com

Re: Skip tests on release

Posted by Tony Chemit <ch...@codelutin.com>.
Le Tue, 10 Aug 2010 12:32:55 -0400,
"C. Benson Manica" <cb...@gmail.com> a écrit :

> mvn -DskipTests=true -Dmaven.test.skip=true release:perform still insists on
> running the unit tests.  Why?  They already ran on release:prepare, I
> really, really, really get annoyed sitting through five minutes of unit
> tests that I know pass because I just ran them.
> 

When doing a mvn release:perform, the plugin just launch another instance of maven with by default this command : 

mvn deploy site-deploy -DperformRelease

So you will never be able to change this behaviour like you are trying to do.

To make this possible you can use one of the release:perform parameter.

Before shouting after maven, just try to understand it :) and have a look to the documentation.

In your case, this the page [0]

What your are doing seems not natural to me, one of my best-pratice is to ALWAYS release with tests done, otherwise, the generated ste (and the surefire report) will say : no tests passed, is it really what you want ?

[0] http://maven.apache.org/plugins/maven-release-plugin/perform-mojo.html


-- 
Tony Chemit
--------------------
tél: +33 (0) 2 40 50 29 28
email: chemit@codelutin.com  
http://www.codelutin.com 

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