Maven 2.x Release Plugin

release:prepare fails when checking in modified POMs of a multi-modules project

Details

  • Type: Bug Bug
  • Status: Reopened Reopened
  • Priority: Critical Critical
  • Resolution: Unresolved
  • Affects Version/s: 2.0-beta-4
  • Fix Version/s: None
  • Component/s: scm
  • Labels:
    None
  • Environment:
    WinXP + Eclipse
  • Number of attachments :
    0

Description

Here is the project structure on the disk :

c:\javadev\prj\myproject\module1
c:\javadev\prj\myproject\module2
c:\javadev\prj\myproject\master

These 3 folders represent the 3 eclipse projects, each one containing a pom.xml.
The master project's pom is the parent of the modules.

When I execute the release:prepare goal, Everything works fine (it asks to me the tag name, the next dev version, ...) until I receive this error :

[INFO] Checking in modified POMs...
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] An error is occurred in the checkin process: C:\javadev\prj\myproject\module1\pom.xml was not contained in C:\javadev\prj\myproject\master

[INFO] ------------------------------------------------------------------------
[DEBUG] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: An error is occurred in the checkin process: C:\javadev\prj\myproject\module1\pom.xml was not contained in C:\javadev\prj\myproject\master
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:559)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:488)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:458)
....

The problem is that the project structure is the only one that can be used with eclipse.

Issue Links

Activity

Hide
Peter De Velder added a comment -

Same issue here :

[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] An error is occurred in the checkin process: /home/cpdv/wrk/FOCUS_CONTAINER/focus_logging/pom.xml was not contained in /home/cpdv/wrk/FOCUS_CONTAINER/admin_focus

[INFO] ------------------------------------------------------------------------
[DEBUG] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: An error is occurred in the checkin process: /home/cpdv/wrk/FOCUS_CONTAINER/focus_logging/pom.xml was not contained in /home/cpdv/wrk/FOCUS_CONTAINER/admin_focus
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:559)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:488)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:458)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:306)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:219)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:140)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.MojoExecutionException: An error is occurred in the checkin process: /home/cpdv/wrk/FOCUS_CONTAINER/focus_logging/pom.xml was not contained in /home/cpdv/wrk/FOCUS_CONTAINER/admin_focus
at org.apache.maven.plugins.release.PrepareReleaseMojo.execute(PrepareReleaseMojo.java:110)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:412)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534)
... 16 more
Caused by: org.apache.maven.plugins.release.ReleaseExecutionException: An error is occurred in the checkin process: /home/cpdv/wrk/FOCUS_CONTAINER/focus_logging/pom.xml was not contained in /home/cpdv/wrk/FOCUS_CONTAINER/admin_focus
at org.apache.maven.plugins.release.phase.ScmCommitPhase.execute(ScmCommitPhase.java:94)
at org.apache.maven.plugins.release.DefaultReleaseManager.prepare(DefaultReleaseManager.java:139)
at org.apache.maven.plugins.release.PrepareReleaseMojo.execute(PrepareReleaseMojo.java:106)
... 18 more
Caused by: org.apache.maven.scm.ScmException: /home/cpdv/wrk/FOCUS_CONTAINER/focus_logging/pom.xml was not contained in /home/cpdv/wrk/FOCUS_CONTAINER/admin_focus
at org.apache.maven.scm.provider.cvslib.AbstractCvsScmProvider.getRelativePath(AbstractCvsScmProvider.java:590)
at org.apache.maven.scm.provider.cvslib.AbstractCvsScmProvider.fixUpScmFileSetAbsoluteFilePath(AbstractCvsScmProvider.java:569)
at org.apache.maven.scm.provider.cvslib.AbstractCvsScmProvider.executeCommand(AbstractCvsScmProvider.java:430)
at org.apache.maven.scm.provider.cvslib.AbstractCvsScmProvider.login(AbstractCvsScmProvider.java:508)
at org.apache.maven.scm.provider.AbstractScmProvider.login(AbstractScmProvider.java:256)
at org.apache.maven.scm.provider.AbstractScmProvider.checkIn(AbstractScmProvider.java:192)
at org.apache.maven.plugins.release.phase.ScmCommitPhase.execute(ScmCommitPhase.java:90)
... 20 more
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6 seconds
[INFO] Finished at: Wed Jan 31 13:32:49 GMT 2007
[INFO] Final Memory: 5M/11M
[INFO] ------------------------------------------------------------------------

Show
Peter De Velder added a comment - Same issue here : [INFO] ------------------------------------------------------------------------ [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] An error is occurred in the checkin process: /home/cpdv/wrk/FOCUS_CONTAINER/focus_logging/pom.xml was not contained in /home/cpdv/wrk/FOCUS_CONTAINER/admin_focus [INFO] ------------------------------------------------------------------------ [DEBUG] Trace org.apache.maven.lifecycle.LifecycleExecutionException: An error is occurred in the checkin process: /home/cpdv/wrk/FOCUS_CONTAINER/focus_logging/pom.xml was not contained in /home/cpdv/wrk/FOCUS_CONTAINER/admin_focus at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:559) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:488) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:458) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:306) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:219) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:140) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115) at org.apache.maven.cli.MavenCli.main(MavenCli.java:256) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) at org.codehaus.classworlds.Launcher.main(Launcher.java:375) Caused by: org.apache.maven.plugin.MojoExecutionException: An error is occurred in the checkin process: /home/cpdv/wrk/FOCUS_CONTAINER/focus_logging/pom.xml was not contained in /home/cpdv/wrk/FOCUS_CONTAINER/admin_focus at org.apache.maven.plugins.release.PrepareReleaseMojo.execute(PrepareReleaseMojo.java:110) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:412) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534) ... 16 more Caused by: org.apache.maven.plugins.release.ReleaseExecutionException: An error is occurred in the checkin process: /home/cpdv/wrk/FOCUS_CONTAINER/focus_logging/pom.xml was not contained in /home/cpdv/wrk/FOCUS_CONTAINER/admin_focus at org.apache.maven.plugins.release.phase.ScmCommitPhase.execute(ScmCommitPhase.java:94) at org.apache.maven.plugins.release.DefaultReleaseManager.prepare(DefaultReleaseManager.java:139) at org.apache.maven.plugins.release.PrepareReleaseMojo.execute(PrepareReleaseMojo.java:106) ... 18 more Caused by: org.apache.maven.scm.ScmException: /home/cpdv/wrk/FOCUS_CONTAINER/focus_logging/pom.xml was not contained in /home/cpdv/wrk/FOCUS_CONTAINER/admin_focus at org.apache.maven.scm.provider.cvslib.AbstractCvsScmProvider.getRelativePath(AbstractCvsScmProvider.java:590) at org.apache.maven.scm.provider.cvslib.AbstractCvsScmProvider.fixUpScmFileSetAbsoluteFilePath(AbstractCvsScmProvider.java:569) at org.apache.maven.scm.provider.cvslib.AbstractCvsScmProvider.executeCommand(AbstractCvsScmProvider.java:430) at org.apache.maven.scm.provider.cvslib.AbstractCvsScmProvider.login(AbstractCvsScmProvider.java:508) at org.apache.maven.scm.provider.AbstractScmProvider.login(AbstractScmProvider.java:256) at org.apache.maven.scm.provider.AbstractScmProvider.checkIn(AbstractScmProvider.java:192) at org.apache.maven.plugins.release.phase.ScmCommitPhase.execute(ScmCommitPhase.java:90) ... 20 more [INFO] ------------------------------------------------------------------------ [INFO] Total time: 6 seconds [INFO] Finished at: Wed Jan 31 13:32:49 GMT 2007 [INFO] Final Memory: 5M/11M [INFO] ------------------------------------------------------------------------
Hide
Thomas Heinzelmann added a comment -

Same issue for us...
We have a lot of parallel eclipse projects, the master referencing all the others. We try to convince management that we should use Maven, but since the Release-Plugin obviously isn't able to handle other than trivial eclipse-Projects (that is, parallel multi-module projects), we would have to manually change about 100 POMs per release.... which isnt't a good argument for management

And there is another point: release:prepare tells
[INFO] Full run would be tagging D:\Work\Maven-Test\cvs-test\ebtest\eb build\build with label: 'EBTEST_V1_00_00,
which implies for me that only the master module would be tagged.
But what about the other parallel projects? We would need to be able to specify, what exactly should be tagged
(not only the folders where the root POMs of the projects are (e.g. eb build\build, ebbase\build), but also the parent folder (eb build, ebbase)...

Show
Thomas Heinzelmann added a comment - Same issue for us... We have a lot of parallel eclipse projects, the master referencing all the others. We try to convince management that we should use Maven, but since the Release-Plugin obviously isn't able to handle other than trivial eclipse-Projects (that is, parallel multi-module projects), we would have to manually change about 100 POMs per release.... which isnt't a good argument for management And there is another point: release:prepare tells [INFO] Full run would be tagging D:\Work\Maven-Test\cvs-test\ebtest\eb build\build with label: 'EBTEST_V1_00_00, which implies for me that only the master module would be tagged. But what about the other parallel projects? We would need to be able to specify, what exactly should be tagged (not only the folders where the root POMs of the projects are (e.g. eb build\build, ebbase\build), but also the parent folder (eb build, ebbase)...
Hide
ol added a comment -

I think this issue is linked to MRELEASE-261.
It's not a duplicate of MRELEASE-6.

I 'm still facing errors when trying to release a parent project that have some modules in another folder :

\parent
\moduleA
\moduleB

Show
ol added a comment - I think this issue is linked to MRELEASE-261. It's not a duplicate of MRELEASE-6. I 'm still facing errors when trying to release a parent project that have some modules in another folder : \parent \moduleA \moduleB
Hide
Mark Struberg added a comment -

I heavily use multi module projects and do not face any problems.
So let's start with getting info about your environment situation.

.) Do you release all your projects at once from the parent module?

.) do you have a pom (build pom) in c:\javadev\prj\myproject\ ?

.) Do you invoke
$> mvn release:prepare
on the commandline or run the goal from inside eclipse?

.) which version of maven and the release-plugin do u use?

.) do your poms contain a correct <relativePath> in the parent section?

Show
Mark Struberg added a comment - I heavily use multi module projects and do not face any problems. So let's start with getting info about your environment situation. .) Do you release all your projects at once from the parent module? .) do you have a pom (build pom) in c:\javadev\prj\myproject\ ? .) Do you invoke $> mvn release:prepare on the commandline or run the goal from inside eclipse? .) which version of maven and the release-plugin do u use? .) do your poms contain a correct <relativePath> in the parent section?

People

Vote (12)
Watch (13)

Dates

  • Created:
    Updated: