You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@gump.apache.org by Stefan Bodewig <bo...@apache.org> on 2010/09/06 06:03:03 UTC

skipTests vs maven.test.skip.exec

Hi,

some time back we had a discussion that skipTest was the preferred
property to use when we want to tell mvn not to run tests - well, it
doesn't work, at least not for Cocoon 2.2.x.

My theory is that those properties are interpreted by the surefire
plugin rather than mvn itself.  Unlike the version of mvn we cannot
influence the version of plugins used by a project, so whether skipTests
works or not depends on the project.

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@gump.apache.org
For additional commands, e-mail: general-help@gump.apache.org


Re: skipTests vs maven.test.skip.exec

Posted by Stefan Bodewig <bo...@apache.org>.
On 2010-09-06, Jörg Schaible wrote:

> Niall Pemberton wrote:

>> Yes, the "skipTests" and "maven.test.skip.exec=true" are the same -
>> the tests get compiled, but not executed.  The "maven.test.skip=true"
>> doesn't compile or execute the tests.

> And it will therefore not build attached tests.jars which may result
> depending artifacts to fail ...

Understood.

In the case where the tests don't compile this doesn't make any
difference for those dependening artifacts - but it will allow projects
that don't require the tests jar to build.

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@gump.apache.org
For additional commands, e-mail: general-help@gump.apache.org


Re: skipTests vs maven.test.skip.exec

Posted by Jörg Schaible <jo...@gmx.de>.
Niall Pemberton wrote:

> On Mon, Sep 6, 2010 at 12:16 PM, Stefan Bodewig <bo...@apache.org>
> wrote:
>> On 2010-09-06, Niall Pemberton wrote:
>>
>>> On Mon, Sep 6, 2010 at 5:03 AM, Stefan Bodewig <bo...@apache.org>
>>> wrote:
>>>> Hi,
>>
>>>> some time back we had a discussion that skipTest was the preferred
>>>> property to use when we want to tell mvn not to run tests - well, it
>>>> doesn't work, at least not for Cocoon 2.2.x.
>>
>>>> My theory is that those properties are interpreted by the surefire
>>>> plugin rather than mvn itself.
>>
>>> Yes, they are plugin parameters:
>>
>>> http://maven.apache.org/plugins/maven-surefire-plugin/test-mojo.html
>>
>> Thank you for the confirmation.
>>
>>> And from the docs the skipTests parameter was added in version 2.4 of
>>> the surefire plugin
>>
>>> [...] and cocoon is using version 2.3 of the surefire plugin (see
>>> pluginManagement section of the pom):
>>
>>> skipTests was introduced to replace the more verbose
>>> "maven.test.skip=true" - you could use that instead though.
>>
>> Is there a difference between maven.test.skip and maven.test.skip.exec
>> (which we use now)?  I see there is a skip property in addition to the
>> skipTests property - the former even avoids compilation of the tests, so
>> I gues this is the difference here as well.
> 
> Yes, the "skipTests" and "maven.test.skip.exec=true" are the same -
> the tests get compiled, but not executed.  The "maven.test.skip=true"
> doesn't compile or execute the tests.

And it will therefore not build attached tests.jars which may result 
depending artifacts to fail ...

- Jörg


---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@gump.apache.org
For additional commands, e-mail: general-help@gump.apache.org


Re: skipTests vs maven.test.skip.exec

Posted by Niall Pemberton <ni...@gmail.com>.
On Mon, Sep 6, 2010 at 12:16 PM, Stefan Bodewig <bo...@apache.org> wrote:
> On 2010-09-06, Niall Pemberton wrote:
>
>> On Mon, Sep 6, 2010 at 5:03 AM, Stefan Bodewig <bo...@apache.org> wrote:
>>> Hi,
>
>>> some time back we had a discussion that skipTest was the preferred
>>> property to use when we want to tell mvn not to run tests - well, it
>>> doesn't work, at least not for Cocoon 2.2.x.
>
>>> My theory is that those properties are interpreted by the surefire
>>> plugin rather than mvn itself.
>
>> Yes, they are plugin parameters:
>
>> http://maven.apache.org/plugins/maven-surefire-plugin/test-mojo.html
>
> Thank you for the confirmation.
>
>> And from the docs the skipTests parameter was added in version 2.4 of
>> the surefire plugin
>
>> [...] and cocoon is using version 2.3 of the surefire plugin (see
>> pluginManagement section of the pom):
>
>> skipTests was introduced to replace the more verbose
>> "maven.test.skip=true" - you could use that instead though.
>
> Is there a difference between maven.test.skip and maven.test.skip.exec
> (which we use now)?  I see there is a skip property in addition to the
> skipTests property - the former even avoids compilation of the tests, so
> I gues this is the difference here as well.

Yes, the "skipTests" and "maven.test.skip.exec=true" are the same -
the tests get compiled, but not executed.  The "maven.test.skip=true"
doesn't compile or execute the tests.

Niall

> As much as I would have loved consistency it seems we are best off with
> using skipTests when possible and fall back to maven.test.skip.exec.
>
> Coming to think of it, skip and maven.test.skip may help for builds like
> james-jsieve which requires JUnit 3.8 to compile because they still have
> one of those AllTests classes invoking swingui.TestRunner we used to
> write in 2000.
>
> Stefan
>

---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@gump.apache.org
For additional commands, e-mail: general-help@gump.apache.org


Re: skipTests vs maven.test.skip.exec

Posted by Stefan Bodewig <bo...@apache.org>.
On 2010-09-06, Niall Pemberton wrote:

> On Mon, Sep 6, 2010 at 5:03 AM, Stefan Bodewig <bo...@apache.org> wrote:
>> Hi,

>> some time back we had a discussion that skipTest was the preferred
>> property to use when we want to tell mvn not to run tests - well, it
>> doesn't work, at least not for Cocoon 2.2.x.

>> My theory is that those properties are interpreted by the surefire
>> plugin rather than mvn itself.

> Yes, they are plugin parameters:

> http://maven.apache.org/plugins/maven-surefire-plugin/test-mojo.html

Thank you for the confirmation.

> And from the docs the skipTests parameter was added in version 2.4 of
> the surefire plugin

> [...] and cocoon is using version 2.3 of the surefire plugin (see
> pluginManagement section of the pom):

> skipTests was introduced to replace the more verbose
> "maven.test.skip=true" - you could use that instead though.

Is there a difference between maven.test.skip and maven.test.skip.exec
(which we use now)?  I see there is a skip property in addition to the
skipTests property - the former even avoids compilation of the tests, so
I gues this is the difference here as well.

As much as I would have loved consistency it seems we are best off with
using skipTests when possible and fall back to maven.test.skip.exec.

Coming to think of it, skip and maven.test.skip may help for builds like
james-jsieve which requires JUnit 3.8 to compile because they still have
one of those AllTests classes invoking swingui.TestRunner we used to
write in 2000.

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@gump.apache.org
For additional commands, e-mail: general-help@gump.apache.org


Re: skipTests vs maven.test.skip.exec

Posted by Niall Pemberton <ni...@gmail.com>.
On Mon, Sep 6, 2010 at 5:03 AM, Stefan Bodewig <bo...@apache.org> wrote:
> Hi,
>
> some time back we had a discussion that skipTest was the preferred
> property to use when we want to tell mvn not to run tests - well, it
> doesn't work, at least not for Cocoon 2.2.x.
>
> My theory is that those properties are interpreted by the surefire
> plugin rather than mvn itself.

Yes, they are plugin parameters:

http://maven.apache.org/plugins/maven-surefire-plugin/test-mojo.html

And from the docs the skipTests parameter was added in version 2.4 of
the surefire plugin

>  Unlike the version of mvn we cannot
> influence the version of plugins used by a project, so whether skipTests
> works or not depends on the project.

Yes and cocoon is using version 2.3 of the surefire plugin (see
pluginManagement section of the pom):

http://svn.apache.org/repos/asf/cocoon/trunk/parent/pom.xml

skipTests was introduced to replace the more verbose
"maven.test.skip=true" - you could use that instead though.

Niall

> Stefan
>

---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@gump.apache.org
For additional commands, e-mail: general-help@gump.apache.org