You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Oleg Mayevskiy (JIRA)" <ji...@codehaus.org> on 2011/08/09 11:10:43 UTC

[jira] Created: (MRELEASE-700) release:prepare -Dmaven.test.skip=true should work

release:prepare -Dmaven.test.skip=true should work
--------------------------------------------------

                 Key: MRELEASE-700
                 URL: https://jira.codehaus.org/browse/MRELEASE-700
             Project: Maven 2.x Release Plugin
          Issue Type: Wish
          Components: prepare
    Affects Versions: 2.1
         Environment: maven 3.0.3
            Reporter: Oleg Mayevskiy
            Priority: Minor


currently if i want to skip tests during a prepare or perform phase, i must do the following:

mvn release:prepare arguments='-Dmaven.test.skip=true'...

It would be more intuitive, if mvn -Dmaven.test.skip=true would work. 
This is the default way, how tests are disabled in maven.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MRELEASE-700) release:prepare -Dmaven.test.skip=true should work

Posted by "Oleg Mayevskiy (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MRELEASE-700?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=275339#comment-275339 ] 

Oleg Mayevskiy commented on MRELEASE-700:
-----------------------------------------

:)
maybe generally in case of scm, but not for svn.
an unversioned file is also "a change"

just tested and added a some_file.txt

prepare fails now with error:
Cannot prepare the release because you have local modifications :
[some_file.txt:unknown]

> release:prepare -Dmaven.test.skip=true should work
> --------------------------------------------------
>
>                 Key: MRELEASE-700
>                 URL: https://jira.codehaus.org/browse/MRELEASE-700
>             Project: Maven 2.x Release Plugin
>          Issue Type: Wish
>          Components: prepare
>    Affects Versions: 2.1
>         Environment: maven 3.0.3
>            Reporter: Oleg Mayevskiy
>            Assignee: Mark Struberg
>            Priority: Minor
>
> currently if i want to skip tests during a prepare or perform phase, i must do the following:
> mvn release:prepare arguments='-Dmaven.test.skip=true'...
> It would be more intuitive, if mvn -Dmaven.test.skip=true would work. 
> This is the default way, how tests are disabled in maven.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Issue Comment Edited: (MRELEASE-700) release:prepare -Dmaven.test.skip=true should work

Posted by "Oleg Mayevskiy (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MRELEASE-700?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=275339#comment-275339 ] 

Oleg Mayevskiy edited comment on MRELEASE-700 at 8/9/11 5:10 AM:
-----------------------------------------------------------------

:)
maybe generally in case of scm, but not for svn.
an unversioned file is also "a change"

just tested and added a some_file.txt

prepare fails now with error:
Cannot prepare the release because you have local modifications :
[some_file.txt:unknown]

you must explicitly ignore it and commit to get it done

      was (Author: olem):
    :)
maybe generally in case of scm, but not for svn.
an unversioned file is also "a change"

just tested and added a some_file.txt

prepare fails now with error:
Cannot prepare the release because you have local modifications :
[some_file.txt:unknown]
  
> release:prepare -Dmaven.test.skip=true should work
> --------------------------------------------------
>
>                 Key: MRELEASE-700
>                 URL: https://jira.codehaus.org/browse/MRELEASE-700
>             Project: Maven 2.x Release Plugin
>          Issue Type: Wish
>          Components: prepare
>    Affects Versions: 2.1
>         Environment: maven 3.0.3
>            Reporter: Oleg Mayevskiy
>            Assignee: Mark Struberg
>            Priority: Minor
>
> currently if i want to skip tests during a prepare or perform phase, i must do the following:
> mvn release:prepare arguments='-Dmaven.test.skip=true'...
> It would be more intuitive, if mvn -Dmaven.test.skip=true would work. 
> This is the default way, how tests are disabled in maven.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MRELEASE-700) release:prepare -Dmaven.test.skip=true should work

Posted by "Oleg Mayevskiy (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MRELEASE-700?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=275337#comment-275337 ] 

Oleg Mayevskiy commented on MRELEASE-700:
-----------------------------------------

:-)
if there are some locally changes, release:prepare won't work, because it checks for modifications first.

so the error would be something like:
Cannot prepare the release because you have local modifications

you must explicitly ignore something, if you really don't won't to commit it.

but ok, it is generally more secure to execute all tests again in perform phase.

> release:prepare -Dmaven.test.skip=true should work
> --------------------------------------------------
>
>                 Key: MRELEASE-700
>                 URL: https://jira.codehaus.org/browse/MRELEASE-700
>             Project: Maven 2.x Release Plugin
>          Issue Type: Wish
>          Components: prepare
>    Affects Versions: 2.1
>         Environment: maven 3.0.3
>            Reporter: Oleg Mayevskiy
>            Assignee: Mark Struberg
>            Priority: Minor
>
> currently if i want to skip tests during a prepare or perform phase, i must do the following:
> mvn release:prepare arguments='-Dmaven.test.skip=true'...
> It would be more intuitive, if mvn -Dmaven.test.skip=true would work. 
> This is the default way, how tests are disabled in maven.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MRELEASE-700) release:prepare -Dmaven.test.skip=true should work

Posted by "Mark Struberg (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MRELEASE-700?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=275338#comment-275338 ] 

Mark Struberg commented on MRELEASE-700:
----------------------------------------

> if there are some locally changes, release:prepare won't work, because it checks for modifications first.
only if this file is under SCM control!

> release:prepare -Dmaven.test.skip=true should work
> --------------------------------------------------
>
>                 Key: MRELEASE-700
>                 URL: https://jira.codehaus.org/browse/MRELEASE-700
>             Project: Maven 2.x Release Plugin
>          Issue Type: Wish
>          Components: prepare
>    Affects Versions: 2.1
>         Environment: maven 3.0.3
>            Reporter: Oleg Mayevskiy
>            Assignee: Mark Struberg
>            Priority: Minor
>
> currently if i want to skip tests during a prepare or perform phase, i must do the following:
> mvn release:prepare arguments='-Dmaven.test.skip=true'...
> It would be more intuitive, if mvn -Dmaven.test.skip=true would work. 
> This is the default way, how tests are disabled in maven.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Closed: (MRELEASE-700) release:prepare -Dmaven.test.skip=true should work

Posted by "Mark Struberg (JIRA)" <ji...@codehaus.org>.
     [ https://jira.codehaus.org/browse/MRELEASE-700?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mark Struberg closed MRELEASE-700.
----------------------------------

    Resolution: Won't Fix
      Assignee: Mark Struberg

Hi Oleg!

I had the same discussion already a long time ago. The rational behind this is that people tend to skip tests way too often. But you usually really should not skip tests when doing a release. 
So - there is a way (as you gladly found out) - but it requires to not go the default route. And this is imo a good thing which is a welcome side effect of the way the maven-release-manage works. 

> release:prepare -Dmaven.test.skip=true should work
> --------------------------------------------------
>
>                 Key: MRELEASE-700
>                 URL: https://jira.codehaus.org/browse/MRELEASE-700
>             Project: Maven 2.x Release Plugin
>          Issue Type: Wish
>          Components: prepare
>    Affects Versions: 2.1
>         Environment: maven 3.0.3
>            Reporter: Oleg Mayevskiy
>            Assignee: Mark Struberg
>            Priority: Minor
>
> currently if i want to skip tests during a prepare or perform phase, i must do the following:
> mvn release:prepare arguments='-Dmaven.test.skip=true'...
> It would be more intuitive, if mvn -Dmaven.test.skip=true would work. 
> This is the default way, how tests are disabled in maven.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MRELEASE-700) release:prepare -Dmaven.test.skip=true should work

Posted by "Oleg Mayevskiy (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MRELEASE-700?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=275332#comment-275332 ] 

Oleg Mayevskiy commented on MRELEASE-700:
-----------------------------------------

It would be more intuitive, if mvn 
mvn -Dmaven.test.skip=true release:prepare 
instead of
mvn -Darguments='-Dmaven.test.skip=true' release:prepare
would work.

sorry some way i cannot change the description

> release:prepare -Dmaven.test.skip=true should work
> --------------------------------------------------
>
>                 Key: MRELEASE-700
>                 URL: https://jira.codehaus.org/browse/MRELEASE-700
>             Project: Maven 2.x Release Plugin
>          Issue Type: Wish
>          Components: prepare
>    Affects Versions: 2.1
>         Environment: maven 3.0.3
>            Reporter: Oleg Mayevskiy
>            Priority: Minor
>
> currently if i want to skip tests during a prepare or perform phase, i must do the following:
> mvn release:prepare arguments='-Dmaven.test.skip=true'...
> It would be more intuitive, if mvn -Dmaven.test.skip=true would work. 
> This is the default way, how tests are disabled in maven.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MRELEASE-700) release:prepare -Dmaven.test.skip=true should work

Posted by "Oleg Mayevskiy (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MRELEASE-700?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=275334#comment-275334 ] 

Oleg Mayevskiy commented on MRELEASE-700:
-----------------------------------------

yes, tests should be executed before a release is done.
 
in my case i allready did it and knew that all tests are ok.
but i changed some scm:svn options, and wanted just test, what the release plugin will do with this options.
executing all tests again in such a situation does not really make sence.
in my case i need about 30 min to execute all the tests!

the other issue is:
tests are executed during prepare and perform phase, why?
i make sence for me to execute it only during the prepare phase.
that is why i turn them out during the perform phase

with best regards

Oleg Mayevskiy

> release:prepare -Dmaven.test.skip=true should work
> --------------------------------------------------
>
>                 Key: MRELEASE-700
>                 URL: https://jira.codehaus.org/browse/MRELEASE-700
>             Project: Maven 2.x Release Plugin
>          Issue Type: Wish
>          Components: prepare
>    Affects Versions: 2.1
>         Environment: maven 3.0.3
>            Reporter: Oleg Mayevskiy
>            Assignee: Mark Struberg
>            Priority: Minor
>
> currently if i want to skip tests during a prepare or perform phase, i must do the following:
> mvn release:prepare arguments='-Dmaven.test.skip=true'...
> It would be more intuitive, if mvn -Dmaven.test.skip=true would work. 
> This is the default way, how tests are disabled in maven.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MRELEASE-700) release:prepare -Dmaven.test.skip=true should work

Posted by "Mark Struberg (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MRELEASE-700?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=275335#comment-275335 ] 

Mark Struberg commented on MRELEASE-700:
----------------------------------------

heh another long time goodie ;)

The reason why tests are both executed in prepare and perform are:

* in release:prepare to not create a tag if a test is broken

* in release:perform to make sure that the build still runs file on a clean checkout (remember: mvn release:perform will checkout to ./target/checkout/ and runs all the build there).

I had it a few times that my build did only work because I had something locally which was not checked in. Classic candidates are modified build.properties from an integrated antrun, etc


> release:prepare -Dmaven.test.skip=true should work
> --------------------------------------------------
>
>                 Key: MRELEASE-700
>                 URL: https://jira.codehaus.org/browse/MRELEASE-700
>             Project: Maven 2.x Release Plugin
>          Issue Type: Wish
>          Components: prepare
>    Affects Versions: 2.1
>         Environment: maven 3.0.3
>            Reporter: Oleg Mayevskiy
>            Assignee: Mark Struberg
>            Priority: Minor
>
> currently if i want to skip tests during a prepare or perform phase, i must do the following:
> mvn release:prepare arguments='-Dmaven.test.skip=true'...
> It would be more intuitive, if mvn -Dmaven.test.skip=true would work. 
> This is the default way, how tests are disabled in maven.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira