You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "jeremy_soula-maven@yahoo.fr" <je...@yahoo.fr> on 2007/06/26 14:15:04 UTC

[Surefire]Compilation of unit tests even if skip=true

Hello,

When i configure surefire in the pom in order to skip the tests, 
compilation of unit tests are done.
But when i use the command line configuration (-Dmaven.test.skip=true), 
compilation of unit tests are not done.

Has someone the same behavior? Is it a bug (already known?)

thx for help

Jérémy SOULA

P.S: i use maven-2.0.7, jdk 1.4 et  windows XP. This is the 
configuration of the surefire plugin in the pom:
<plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.3</version>
                <configuration>
                    <skip>true</skip>
                </configuration>
            </plugin>
        </plugins>
    </build>


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


Re: [Surefire]Compilation of unit tests even if skip=true

Posted by Rémy Sanlaville <re...@gmail.com>.
Hello,

-Dmaven.test.skip=true will in addition not compile the tests vs
-Dtest=false will only skip execution.
cf.
http://www.nabble.com/mvn--Dtest%3Dfalse-%3D-mvn--Dmaven.test.skip%3Dfalse-tf3444280s177.html#a9611461

Rémy

Re: [Surefire]Compilation of unit tests even if skip=true

Posted by ml...@planwerk6.de.
Am Dienstag, 26. Juni 2007 14:15 schrieb jeremy_soula-maven@yahoo.fr:
> Hello,
>
> When i configure surefire in the pom in order to skip the tests,
> compilation of unit tests are done.
> But when i use the command line configuration (-Dmaven.test.skip=true),
> compilation of unit tests are not done.
>
> Has someone the same behavior? Is it a bug (already known?)

It's a feature. 

The maven-compiler-plugin respects the same environment varaible as surefire:
See:
http://maven.apache.org/plugins/maven-compiler-plugin/testCompile-mojo.html#skip

so if you pass it on command line both plugins respect it and skip the tests 
(compiling or running)

if you use pom.xml to configure your must configure both plugins.

kind regards,
Janning


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