maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeff Jensen (JIRA)" <>
Subject [jira] Commented: (MRELEASE-516) release:prepare should support a nested/flat hybrid SCM structure
Date Sat, 04 Dec 2010 23:16:03 GMT


Jeff Jensen commented on MRELEASE-516:

I have found a workaround to make release:prepare work with a flat structure.  release:perform
still does not though.

In using Subversion/svn, if the module directories are all sister directories with the parent,
and the .svn dir exists in the directory that has the module directories (this means doing
a checkout of the entire structure as one, not each module individually), release:prepare
will work.

release:perform fails because it does not install the built artifact, therefore the subsequent
module build fails on dependency not found.  The work around is to manually run "mvn deploy"
in each module's checkout dir in (parent)/target/checkout dir.

> release:prepare should support a nested/flat hybrid SCM structure
> -----------------------------------------------------------------
>                 Key: MRELEASE-516
>                 URL:
>             Project: Maven 2.x Release Plugin
>          Issue Type: Improvement
>          Components: perform, prepare
>    Affects Versions: 2.0-beta-9
>         Environment: OS X 10.5.8, Windows XP Prof, JDK 1.5.0_12, SVN, GIT, CVS
>            Reporter: Eric Miles
>         Attachments:, MRELEASE-516-flat-project-structure-support-2.txt,
MRELEASE-516-flat-project-structure-support.txt, odd-tags.png
> This issue is related to MRELEASE-261 in that release prepare is having some difficulty
in dealing with certain SCM structures during the prepare goal.  Our project structure is
flat as you would see in a typical IDE setup:
> {noformat}
> release-workspace\
>         |
>         |--release-parent
>         |    |+pom.xml (modules: ../release-module1, ../release-module2)
>         |
>         |--release-module1
>         |    |+pom.xml (parent: ../release-parent)
>         |
>         |--release-module2
>              |+pom.xml (parent: ../release-parent)
> {noformat}
> Our SCM (svn) structure is as follows:
> {noformat}
> svnroot
> |
> +--release-parent/trunk/pom.xml
> +--release-parent/tags/release-parent-1.0.9/pom.xml
> |
> +--release-module1/trunk/pom.xml
> +--release-module1/tags/release-module1-1.0.9/pom.xml
> |
> +--release-module1/trunk/pom.xml
> +--release-module2/tags/release-module2-1.0.9/pom.xml
> {noformat}
> If we execute release:prepare with no configuration to the release plugin, we get the
following error:
> {noformat}
> [INFO] [INFO] ------------------------------------------------------------------------
> [INFO] Checking in modified POMs...
> [INFO] Executing: /bin/sh -c cd /Users/emiles/Projects/release-workspace/release-parent
&& svn --non-interactive commit --file /var/folders/fH/fHNZYBGdFd0bMMIPiloA2U+++TI/-Tmp-/maven-scm-1253932520.commit
--targets /var/folders/fH/fHNZYBGdFd0bMMIPiloA2U+++TI/-Tmp-/maven-scm-4376558781490229966-targets
> [INFO] Working directory: /Users/emiles/Projects/release-workspace/release-parent
> [INFO] ------------------------------------------------------------------------
> [INFO] ------------------------------------------------------------------------
> [INFO] Unable to commit files
> Provider message:
> The svn command failed.
> Command output:
> svn: '/Users/emiles/Projects/release-workspace' is not a working copy
> {noformat}
> If we use the 2.0-beta-10-SNAPSHOT with flat project support and provide the -DcommitByProject=true
JVM parameter, we do not get any errors, however tagging does not happen as expected.  Rather
than having tags for each of the projects, some odd tagging happened at the parent level where
an entire structure was created (with branches, tags and trunk under the tag folder).  I'm
attaching a screen shot for reference.
> Ignoring the fact that the prepare only somewhat worked, when I attempted to perform
the release, I get an error:
> {noformat}
> emiles-macbook:release-parent emiles$ mvn release:perform -DcommitByProject=true
> [INFO] Scanning for projects...
> [INFO] Reactor build order: 
> [INFO]   Unnamed - com.captechventures:release-parent:pom:0.0.3-SNAPSHOT
> [INFO]   Unnamed - com.captechventures:release-module1:jar:0.0.3-SNAPSHOT
> [INFO]   Unnamed - com.captechventures:release-module2:jar:0.0.3-SNAPSHOT
> [INFO] ------------------------------------------------------------------------
> [INFO] Building Unnamed - com.captechventures:release-parent:pom:0.0.3-SNAPSHOT
> [INFO]    task-segment: [release:perform] (aggregator-style)
> [INFO] ------------------------------------------------------------------------
> [INFO] [release:perform {execution: default-cli}]
> [INFO] Checking out the project to perform the release ...
> [INFO] Executing: /bin/sh -c cd /Users/emiles/Projects/release-workspace/release-parent/target
&& svn --non-interactive checkout http://localhost/dev/release-parent/tags/release-parent-0.0.2
> [INFO] Working directory: /Users/emiles/Projects/release-workspace/release-parent/target
> [INFO] Executing goals 'deploy'...
> [WARNING] Base directory is a file. Using base directory as POM location.
> [WARNING] Maven will be executed in interactive mode, but no input stream has been configured
for this MavenInvoker instance.
> [INFO] ------------------------------------------------------------------------
> [INFO] ------------------------------------------------------------------------
> [INFO] Error executing Maven.
> Working directory "/Users/emiles/Projects/release-workspace/release-parent/target/checkout/Users/emiles/Projects/release-workspace/release-parent"
does not exist!
> [INFO] ------------------------------------------------------------------------
> [INFO] For more information, run Maven with the -e switch
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 5 seconds
> [INFO] Finished at: Mon Jan 04 12:22:31 EST 2010
> [INFO] Final Memory: 11M/20M
> [INFO] ------------------------------------------------------------------------
> {noformat}
> Although this isn't the flat model as identifed in MRELEASE-261, I feel this flat structure
should be supported as all the relevant SCM metadata is included in each POM so the plugin
should have no difficulty determining where to check stuff into SCM.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:


View raw message