You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Graham Leggett (JIRA)" <ji...@codehaus.org> on 2007/04/20 19:01:46 UTC

[jira] Created: (SUREFIRE-319) true cannot be overridden using mvn -Dmaven.test.skip=false test

<skip>true</skip> cannot be overridden using mvn -Dmaven.test.skip=false test
-----------------------------------------------------------------------------

                 Key: SUREFIRE-319
                 URL: http://jira.codehaus.org/browse/SUREFIRE-319
             Project: Maven Surefire
          Issue Type: Bug
         Environment: java version "1.5.0_09"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_09-b01)
Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_09-b01, mixed mode)

            Reporter: Graham Leggett


If the pom file is configured to skip tests using <skip>true</skip>, and an attempt is made to override this on the command line using mvn -Dmaven.test.skip=false test, the attempt does not work (the test is still skipped).

In theory, the command line flag should override the pom setting.


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (SUREFIRE-319) true cannot be overridden using mvn -Dmaven.test.skip=false test

Posted by "Jan Palmquist (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/SUREFIRE-319?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_119307 ] 

Jan Palmquist commented on SUREFIRE-319:
----------------------------------------

Corresponding behavior is true for configuration <testFailureIgnore>false</testFailureIgnore> and -Dmaven.test.failure.ignore=true

Thanks for the workaround!

It seems like that the following also works:

<properties>
<maven.test.skip>true</maven.test.skip>
<maven.test.failure.ignore>true</maven.test.failure.ignore>
</properties>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skip>${maven.test.skip}</skip>
<testFailureIgnore>${maven.test.failure.ignore}</testFailureIgnore>
</configuration>
</plugin>

Hence, you can specify a different default value for you test behaviour and also override the values using the command line...

> <skip>true</skip> cannot be overridden using mvn -Dmaven.test.skip=false test
> -----------------------------------------------------------------------------
>
>                 Key: SUREFIRE-319
>                 URL: http://jira.codehaus.org/browse/SUREFIRE-319
>             Project: Maven Surefire
>          Issue Type: Bug
>         Environment: java version "1.5.0_09"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_09-b01)
> Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_09-b01, mixed mode)
>            Reporter: Graham Leggett
>             Fix For: 2.x
>
>
> If the pom file is configured to skip tests using <skip>true</skip>, and an attempt is made to override this on the command line using mvn -Dmaven.test.skip=false test, the attempt does not work (the test is still skipped).
> In theory, the command line flag should override the pom setting.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (SUREFIRE-319) true cannot be overridden using mvn -Dmaven.test.skip=false test

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/SUREFIRE-319?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brett Porter updated SUREFIRE-319:
----------------------------------

    Fix Version/s: 2.4

> <skip>true</skip> cannot be overridden using mvn -Dmaven.test.skip=false test
> -----------------------------------------------------------------------------
>
>                 Key: SUREFIRE-319
>                 URL: http://jira.codehaus.org/browse/SUREFIRE-319
>             Project: Maven Surefire
>          Issue Type: Bug
>         Environment: java version "1.5.0_09"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_09-b01)
> Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_09-b01, mixed mode)
>            Reporter: Graham Leggett
>             Fix For: 2.4
>
>
> If the pom file is configured to skip tests using <skip>true</skip>, and an attempt is made to override this on the command line using mvn -Dmaven.test.skip=false test, the attempt does not work (the test is still skipped).
> In theory, the command line flag should override the pom setting.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Closed: (SUREFIRE-319) true cannot be overridden using mvn -Dmaven.test.skip=false test

Posted by "Kristian Rosenvold (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/SUREFIRE-319?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kristian Rosenvold closed SUREFIRE-319.
---------------------------------------

       Resolution: Fixed
    Fix Version/s:     (was: Backlog)
                   2.7.2
         Assignee: Kristian Rosenvold

Fixed with a documentation update in r1061478.


WIll appear at http://maven.apache.org/plugins/maven-surefire-plugin/examples/skipping-test.html  once 2.7.2 is released, in the
mean time it can be seen here http://svn.apache.org/viewvc/maven/surefire/trunk/maven-surefire-plugin/src/site/apt/examples/skipping-test.apt.vm?view=markup


> <skip>true</skip> cannot be overridden using mvn -Dmaven.test.skip=false test
> -----------------------------------------------------------------------------
>
>                 Key: SUREFIRE-319
>                 URL: http://jira.codehaus.org/browse/SUREFIRE-319
>             Project: Maven Surefire
>          Issue Type: Bug
>          Components: Maven Surefire Plugin
>         Environment: java version "1.5.0_09"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_09-b01)
> Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_09-b01, mixed mode)
>            Reporter: Graham Leggett
>            Assignee: Kristian Rosenvold
>             Fix For: 2.7.2
>
>
> If the pom file is configured to skip tests using <skip>true</skip>, and an attempt is made to override this on the command line using mvn -Dmaven.test.skip=false test, the attempt does not work (the test is still skipped).
> In theory, the command line flag should override the pom setting.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (SUREFIRE-319) true cannot be overridden using mvn -Dmaven.test.skip=false test

Posted by "Kristian Rosenvold (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/SUREFIRE-319?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kristian Rosenvold updated SUREFIRE-319:
----------------------------------------

    Component/s: Maven Surefire Plugin

> <skip>true</skip> cannot be overridden using mvn -Dmaven.test.skip=false test
> -----------------------------------------------------------------------------
>
>                 Key: SUREFIRE-319
>                 URL: http://jira.codehaus.org/browse/SUREFIRE-319
>             Project: Maven Surefire
>          Issue Type: Bug
>          Components: Maven Surefire Plugin
>         Environment: java version "1.5.0_09"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_09-b01)
> Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_09-b01, mixed mode)
>            Reporter: Graham Leggett
>             Fix For: Backlog
>
>
> If the pom file is configured to skip tests using <skip>true</skip>, and an attempt is made to override this on the command line using mvn -Dmaven.test.skip=false test, the attempt does not work (the test is still skipped).
> In theory, the command line flag should override the pom setting.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (SUREFIRE-319) true cannot be overridden using mvn -Dmaven.test.skip=false test

Posted by "Jia Lu (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/SUREFIRE-319?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_123340 ] 

Jia Lu  commented on SUREFIRE-319:
----------------------------------

We expereience same issue. It would be very useful if the "skip" values in pom.xml can be overridden in command line. 
e.g pom.xml
<configuration>
       <skip>true</skip>
</configuration>

Developers can simply build without junit test by just using "mvn install" . And "mvn install -Dmaven.test.skip=true" will build and run JUnit tests.



> <skip>true</skip> cannot be overridden using mvn -Dmaven.test.skip=false test
> -----------------------------------------------------------------------------
>
>                 Key: SUREFIRE-319
>                 URL: http://jira.codehaus.org/browse/SUREFIRE-319
>             Project: Maven Surefire
>          Issue Type: Bug
>         Environment: java version "1.5.0_09"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_09-b01)
> Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_09-b01, mixed mode)
>            Reporter: Graham Leggett
>             Fix For: 2.x
>
>
> If the pom file is configured to skip tests using <skip>true</skip>, and an attempt is made to override this on the command line using mvn -Dmaven.test.skip=false test, the attempt does not work (the test is still skipped).
> In theory, the command line flag should override the pom setting.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (SUREFIRE-319) true cannot be overridden using mvn -Dmaven.test.skip=false test

Posted by "Dan Tran (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/SUREFIRE-319?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=190143#action_190143 ] 

Dan Tran commented on SUREFIRE-319:
-----------------------------------

mvn -DskipTests=false should work

> <skip>true</skip> cannot be overridden using mvn -Dmaven.test.skip=false test
> -----------------------------------------------------------------------------
>
>                 Key: SUREFIRE-319
>                 URL: http://jira.codehaus.org/browse/SUREFIRE-319
>             Project: Maven Surefire
>          Issue Type: Bug
>         Environment: java version "1.5.0_09"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_09-b01)
> Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_09-b01, mixed mode)
>            Reporter: Graham Leggett
>             Fix For: 2.x
>
>
> If the pom file is configured to skip tests using <skip>true</skip>, and an attempt is made to override this on the command line using mvn -Dmaven.test.skip=false test, the attempt does not work (the test is still skipped).
> In theory, the command line flag should override the pom setting.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (SUREFIRE-319) true cannot be overridden using mvn -Dmaven.test.skip=false test

Posted by "Mike McVey (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/SUREFIRE-319?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_107102 ] 

Mike McVey commented on SUREFIRE-319:
-------------------------------------

maven.test.skip is a setting from maven 1. You can do something like the following in your pom.xml and then override it in command line with mvn goal -Dvar.name=value

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <skip>${test.skip}</skip>
        </configuration>
      </plugin>
...

  <properties>
        <test.skip>true</test.skip>
  </properties>


> <skip>true</skip> cannot be overridden using mvn -Dmaven.test.skip=false test
> -----------------------------------------------------------------------------
>
>                 Key: SUREFIRE-319
>                 URL: http://jira.codehaus.org/browse/SUREFIRE-319
>             Project: Maven Surefire
>          Issue Type: Bug
>         Environment: java version "1.5.0_09"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_09-b01)
> Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_09-b01, mixed mode)
>            Reporter: Graham Leggett
>             Fix For: 2.4
>
>
> If the pom file is configured to skip tests using <skip>true</skip>, and an attempt is made to override this on the command line using mvn -Dmaven.test.skip=false test, the attempt does not work (the test is still skipped).
> In theory, the command line flag should override the pom setting.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Issue Comment Edited: (SUREFIRE-319) true cannot be overridden using mvn -Dmaven.test.skip=false test

Posted by "Jia Lu (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/SUREFIRE-319?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_123340 ] 

jialu edited comment on SUREFIRE-319 at 2/11/08 6:26 PM:
-----------------------------------------------------------

We expereience same issue. It would be very useful if the "skip" values in pom.xml can be overridden in command line. 
e.g pom.xml
<configuration>
       <skip>true</skip>
</configuration>

Developers can simply build without junit test by just using "mvn install" . And "mvn install -Dmaven.test.skip=false" will build and run JUnit tests.



      was (Author: jialu):
    We expereience same issue. It would be very useful if the "skip" values in pom.xml can be overridden in command line. 
e.g pom.xml
<configuration>
       <skip>true</skip>
</configuration>

Developers can simply build without junit test by just using "mvn install" . And "mvn install -Dmaven.test.skip=true" will build and run JUnit tests.


  
> <skip>true</skip> cannot be overridden using mvn -Dmaven.test.skip=false test
> -----------------------------------------------------------------------------
>
>                 Key: SUREFIRE-319
>                 URL: http://jira.codehaus.org/browse/SUREFIRE-319
>             Project: Maven Surefire
>          Issue Type: Bug
>         Environment: java version "1.5.0_09"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_09-b01)
> Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_09-b01, mixed mode)
>            Reporter: Graham Leggett
>             Fix For: 2.x
>
>
> If the pom file is configured to skip tests using <skip>true</skip>, and an attempt is made to override this on the command line using mvn -Dmaven.test.skip=false test, the attempt does not work (the test is still skipped).
> In theory, the command line flag should override the pom setting.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira