You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Eric Miles (JIRA)" <ji...@codehaus.org> on 2010/01/20 15:03:55 UTC
[jira] Created: (MRELEASE-516) release:prepare should support a
nested/flat hybrid SCM structure
release:prepare should support a nested/flat hybrid SCM structure
-----------------------------------------------------------------
Key: MRELEASE-516
URL: http://jira.codehaus.org/browse/MRELEASE-516
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: maven-release-issue.zip, 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] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[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 /Users/emiles/Projects/release-workspace/release-parent/target/checkout
[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] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[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: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (MRELEASE-516) release:prepare should support a
nested/flat hybrid SCM structure
Posted by "Jeff Jensen (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MRELEASE-516?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=246456#action_246456 ]
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: http://jira.codehaus.org/browse/MRELEASE-516
> 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: maven-release-issue.zip, 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] ------------------------------------------------------------------------
> [ERROR] BUILD FAILURE
> [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 /Users/emiles/Projects/release-workspace/release-parent/target/checkout
> [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] ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [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: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Issue Comment Edited: (MRELEASE-516) release:prepare should
support a nested/flat hybrid SCM structure
Posted by "Erik Magnusson (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MRELEASE-516?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=215080#action_215080 ]
Erik Magnusson edited comment on MRELEASE-516 at 3/24/10 1:30 AM:
------------------------------------------------------------------
I would like to add that it would be desirable if this could also support the case where the modules do not have the aggregator pom as their parent, i.e. the following scenario:
{code}
release-workspace\
|
|--release-parent
| |+pom.xml (modules: ../release-module1, ../release-module2)
|
|--release-module1
| |+pom.xml (parent: corporate root pom)
|
|--release-module2
|+pom.xml (parent: some other parent)
{code}
We would like to have this set up in order to support a collective release consisting of a dynamic set of modules (the list of modules in the aggregator pom is dynamically generated from a dialog where you can choose which modules to release at a particular time).
The release cycle for these modules may or may not coincide at any point in time, it depends entirely on which features should be pushed to production, and we want this flexible workflow. (And we certainly do not want to release every module independently since it can be up to 30-40 modules and releases can be as frequent as every week.)
Also, it would be ideal if any SCM structure could be supported (since SCM information is readily available in each module's pom anyway), e.g. the modules above might look like this in the repo:
{code}
repo-root\
|
|--release-parent\trunk
| |+pom.xml (modules: ../release-module1, ../release-module2)
|
|--subdirectory1\
| |
| |----release-module1\trunk
| |+pom.xml (parent: corporate root pom)
|
|--release-module2\trunk
|+pom.xml (parent: some other parent)
{code}
was (Author: erimag):
I would like to add that it would be desirable if this could also support the case where the modules do not have the aggregator pom as their parent, i.e. the following scenario:
{code}
release-workspace\
|
|--release-parent
| |+pom.xml (modules: ../release-module1, ../release-module2)
|
|--release-module1
| |+pom.xml (parent: corporate root pom)
|
|--release-module2
|+pom.xml (parent: some other parent)
{code}
We would like to have this set up in order to support a collective release consisting of a dynamic set of modules (the list of modules in the aggregator pom is dynamically generated from a dialog where you can choose which modules to release at a particular time).
The release cycle for these modules may or may not coincide at any point in time, it depends entirely on which features should be pushed to production, and we want this flexible workflow. (And we certainly do not want to release every module independently since it can be up to 30-40 modules and releases can be as frequent as every week.)
Also, it would be ideal if any SCM structure could be supported (since SCM information is readily available in each module's pom anyway), e.g. the modules above might look like this in the repo:
{code}
repo-root\
|
|--release-parent\trunk
| |+pom.xml (modules: ../release-module1, ../release-module2)
|
|--subdirectory1\
| |
| |----release-module1\trunk
| |+pom.xml (parent: corporate root pom)
|
|--release-module2\trunk
|+pom.xml (parent: some other parent)
{code}
> release:prepare should support a nested/flat hybrid SCM structure
> -----------------------------------------------------------------
>
> Key: MRELEASE-516
> URL: http://jira.codehaus.org/browse/MRELEASE-516
> 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: maven-release-issue.zip, 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] ------------------------------------------------------------------------
> [ERROR] BUILD FAILURE
> [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 /Users/emiles/Projects/release-workspace/release-parent/target/checkout
> [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] ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [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: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Updated: (MRELEASE-516) release:prepare should support a
nested/flat hybrid SCM structure
Posted by "Mathias Arens (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MRELEASE-516?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mathias Arens updated MRELEASE-516:
-----------------------------------
Attachment: MRELEASE-516-flat-project-structure-support.txt
Hello,
I have a project with a flat structure as described in the first comment. I was a little disappointed that flat structures are not supported.
I tried to fix the problem and in my environment Maven 2.2.1 / Release Plugin 2.2-SNAPSHOT / CVS it works. I attached a patch file. Unfortunately my eclipse formatter formatted the source files so it is difficult to see where the code changes are.
Here is a short description of what I had to change:
{code:title=ScmTagPhase.java(SVN-Version 922071)|borderStyle=solid}
[...]
TagScmResult result = new TagScmResult(null, null, null, true); // modified
try
{
// TODO: want includes/excludes?
String tagName = releaseDescriptor.getScmReleaseLabel();
ScmTagParameters scmTagParameters =
new ScmTagParameters( releaseDescriptor.getScmCommentPrefix() + " copy for tag " + tagName );
scmTagParameters.setRemoteTagging( releaseDescriptor.isRemoteTagging() );
scmTagParameters.setScmRevision( releaseDescriptor.getScmReleasedPomRevision() );
if ( getLogger().isDebugEnabled() )
{
getLogger().debug(
"ScmTagPhase :: scmTagParameters remotingTag " + releaseDescriptor.isRemoteTagging() );
getLogger().debug(
"ScmTagPhase :: scmTagParameters scmRevision " + releaseDescriptor.getScmReleasedPomRevision() );
}
// new code
if (releaseDescriptor.isCommitByProject()) {
Iterator reactorProjectsIter = reactorProjects.iterator();
while (reactorProjectsIter.hasNext() && result.isSuccess()) {
MavenProject mavenProject = (MavenProject) reactorProjectsIter.next();
ScmFileSet fileSet = new ScmFileSet( mavenProject.getBasedir() );
result = provider.tag( repository, fileSet, tagName, scmTagParameters );
}
} else {
// end - new code
ScmFileSet fileSet = new ScmFileSet( new File( basedirAlignedReleaseDescriptor.getWorkingDirectory() ) );
result = provider.tag( repository, fileSet, tagName, scmTagParameters );
}
}
catch ( ScmException e )
{
throw new ReleaseExecutionException( "An error is occurred in the tag process: " + e.getMessage(), e );
}
if ( result == null || !result.isSuccess() )
{
throw new ReleaseScmCommandException( "Unable to tag SCM", result );
}
[...]
{code}
Basically I iterate over the maven projects and tag each maven project instead of the root project only if the commitByProject flag is set to true.
With this change the release:prepare phase already worked. I could run the prepare goal with this statement (I included some personal profiles):
{code}
mvn org.apache.maven.plugins:maven-release-plugin:2.2-SNAPSHOT:prepare -DautoVersionSubmodules=true -Darguments="-P NOTESTS,PRODUCTION" -DcommitByProject=true -Dusername=xxxx -Dpassword=xxxx
{code}
To make the release:perform goal work I had to update the
{code:title=CheckoutProjectFromScm.java(SVN-Version 903713)|borderStyle=solid}
[...]
checkoutDirectory.mkdirs();
CheckOutScmResult scmResult = new CheckOutScmResult(null, null, null, true); // modified
// new code
if (releaseDescriptor.isCommitByProject()) {
// flat project structure
String rootProjectBaseDir = ReleaseUtil.getCommonBasedir(reactorProjects);
Iterator reactorProjectsIter = reactorProjects.iterator();
while (reactorProjectsIter.hasNext() && scmResult.isSuccess()) {
MavenProject mavenProject = (MavenProject) reactorProjectsIter.next();
File mavenCheckoutProjectDirectory;
String mavenProjectBaseDir = mavenProject.getBasedir().getAbsolutePath();
if (mavenProjectBaseDir.length() > rootProjectBaseDir.length()) {
String relativeProjectDir = mavenProjectBaseDir.substring(rootProjectBaseDir
.length() + 1);
mavenCheckoutProjectDirectory = new File(checkoutDirectory, relativeProjectDir);
} else {
mavenCheckoutProjectDirectory = checkoutDirectory;
}
try {
repository = scmRepositoryConfigurator.getConfiguredRepository(mavenProject.getScm().getConnection(), releaseDescriptor,
releaseEnvironment.getSettings());
provider = scmRepositoryConfigurator.getRepositoryProvider(repository);
} catch (ScmRepositoryException e) {
result.setResultCode(ReleaseResult.ERROR);
logError(result, e.getMessage());
throw new ReleaseScmRepositoryException(e.getMessage(), e.getValidationMessages());
} catch (NoSuchScmProviderException e) {
result.setResultCode(ReleaseResult.ERROR);
logError(result, e.getMessage());
throw new ReleaseExecutionException("Unable to configure SCM repository: "
+ e.getMessage(), e);
}
try {
scmResult = provider.checkOut(repository, new ScmFileSet(
mavenCheckoutProjectDirectory), new ScmTag(releaseDescriptor
.getScmReleaseLabel()));
} catch (ScmException e) {
result.setResultCode(ReleaseResult.ERROR);
logError(result, e.getMessage());
throw new ReleaseExecutionException(
"An error is occurred in the checkout process: " + e.getMessage(), e);
}
}
} else {
// end - new code
try {
repository = scmRepositoryConfigurator.getConfiguredRepository(releaseDescriptor,
releaseEnvironment.getSettings());
provider = scmRepositoryConfigurator.getRepositoryProvider(repository);
} catch (ScmRepositoryException e) {
result.setResultCode(ReleaseResult.ERROR);
logError(result, e.getMessage());
throw new ReleaseScmRepositoryException(e.getMessage(), e.getValidationMessages());
} catch (NoSuchScmProviderException e) {
result.setResultCode(ReleaseResult.ERROR);
logError(result, e.getMessage());
throw new ReleaseExecutionException("Unable to configure SCM repository: "
+ e.getMessage(), e);
}
// standard project structure
try {
scmResult = provider.checkOut(repository, new ScmFileSet(checkoutDirectory),
new ScmTag(releaseDescriptor.getScmReleaseLabel()));
} catch (ScmException e) {
result.setResultCode(ReleaseResult.ERROR);
logError(result, e.getMessage());
throw new ReleaseExecutionException(
"An error is occurred in the checkout process: " + e.getMessage(), e);
}
}
String scmRelativePathProjectDirectory = scmResult.getRelativePathProjectDirectory();
if (StringUtils.isEmpty(scmRelativePathProjectDirectory)) {
String basedir = ReleaseUtil.getCommonBasedir(reactorProjects);
String rootProjectBasedir = rootProject.getBasedir().getAbsolutePath();
if (rootProjectBasedir.length() > basedir.length()) {
scmRelativePathProjectDirectory = rootProjectBasedir
.substring(basedir.length() + 1);
}
}
{code}
Here again I had to iterate over the maven projects to check them out to the target/checkout directory. There might be a smarter implementation though because I have a little code duplication in the if/else statement.
Basically with these two changes I could support the flat project structure. The third but last minor modification was in the PerformReleaseMojo. I had to copy the commitByProject attribute from the PrepareReleaseMojo to the PerformReleaseMojo but these changes are all contained in the patch file.
With this command line command I could perform a release:
{code}
mvn org.apache.maven.plugins:maven-release-plugin:2.2-SNAPSHOT:perform -DreleaseProfiles="NOTESTS,PRODUCTION" -DcommitByProject=true -Dgoals="clean install"
{code}
It would be great if somebody with an svn flat project structure could test the code.
> release:prepare should support a nested/flat hybrid SCM structure
> -----------------------------------------------------------------
>
> Key: MRELEASE-516
> URL: http://jira.codehaus.org/browse/MRELEASE-516
> 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: maven-release-issue.zip, 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] ------------------------------------------------------------------------
> [ERROR] BUILD FAILURE
> [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 /Users/emiles/Projects/release-workspace/release-parent/target/checkout
> [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] ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [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: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Updated: (MRELEASE-516) release:prepare should support a
nested/flat hybrid SCM structure
Posted by "Mathias Arens (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MRELEASE-516?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mathias Arens updated MRELEASE-516:
-----------------------------------
Attachment: MRELEASE-516-flat-project-structure-support-2.txt
Hello,
here is a patch build on top of revision 1041768 that also supports branching on flat project strutures. The patch is only a alpha version for flat project struture support but I branched and released with it several times already.
An important precondition to branching and releasing is that each project has it's own scm tag. But I think this must be the case for flat project structures anyway.
I added the 'commitByProject' attribute to commands like 'branch' and 'perform'. It's the indicator for a flat project struture. You could argue that you can retrieve this information by analysing the poms and I think that's possible but as said already this patch is only be a first version for an enhancement.
An update of the simulate() routines is missing as well.
> release:prepare should support a nested/flat hybrid SCM structure
> -----------------------------------------------------------------
>
> Key: MRELEASE-516
> URL: http://jira.codehaus.org/browse/MRELEASE-516
> 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: maven-release-issue.zip, 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] ------------------------------------------------------------------------
> [ERROR] BUILD FAILURE
> [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 /Users/emiles/Projects/release-workspace/release-parent/target/checkout
> [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] ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [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: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (MRELEASE-516) release:prepare should support a
nested/flat hybrid SCM structure
Posted by "Subir S (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MRELEASE-516?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=207710#action_207710 ]
Subir S commented on MRELEASE-516:
----------------------------------
Also the scm-tag of the parent pom is only available in the release.properties.
Modules get mostly the scm-tag as HEAD. This may not work with all VCS. I have synergy and we also intend to use this flat structure due to maintanence complexities.
I tried with -Dproject.scm.c.o.m\:module_child.tag=module_child-<tagVersion> but that is not respected by release:prepare.
All the submodules have SCM elements declared separately in their POMs.
> release:prepare should support a nested/flat hybrid SCM structure
> -----------------------------------------------------------------
>
> Key: MRELEASE-516
> URL: http://jira.codehaus.org/browse/MRELEASE-516
> 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: maven-release-issue.zip, 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] ------------------------------------------------------------------------
> [ERROR] BUILD FAILURE
> [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 /Users/emiles/Projects/release-workspace/release-parent/target/checkout
> [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] ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [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: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] (MRELEASE-516) release:prepare should support a nested/flat
hybrid SCM structure
Posted by "Hannes Kogler (JIRA)" <ji...@codehaus.org>.
[ https://jira.codehaus.org/browse/MRELEASE-516?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=311838#comment-311838 ]
Hannes Kogler edited comment on MRELEASE-516 at 10/19/12 7:07 AM:
------------------------------------------------------------------
thx for the support. I know this goal but that's unfortunately just one step of many this release plugin does or "should do".
obviously there's really until now no other way except releasing every single project for your own. really exhausting...
_UPDATE - new tryout:_
even if you define in your Jenkins *job configuration "../testproject/pom.xml" instead of just "pom.xml"* for execution or your release:prepare goal the SCM error occurs. But that also happens if the "testproject" IS definitely the first added module so it acts like the root one. => that means he just *should have used the exactly SAME pom* to execute like he does without problems for the "pom.xml" and just fails to resolve the relative path!
I cannot imagine that this is such a great deal to fix?!
was (Author: ntshko):
thx for the support. I know this goal but that's unfortunately just one step of many this release plugin does or "should do".
obviously there's really until now no other way except releasing every single project for your own. really exhausting...
> release:prepare should support a nested/flat hybrid SCM structure
> -----------------------------------------------------------------
>
> Key: MRELEASE-516
> URL: https://jira.codehaus.org/browse/MRELEASE-516
> 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: maven-release-issue.zip, 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] ------------------------------------------------------------------------
> [ERROR] BUILD FAILURE
> [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 /Users/emiles/Projects/release-workspace/release-parent/target/checkout
> [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] ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [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, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] (MRELEASE-516) release:prepare should support a nested/flat
hybrid SCM structure
Posted by "Robert Scholte (JIRA)" <ji...@codehaus.org>.
[ https://jira.codehaus.org/browse/MRELEASE-516?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=311801#comment-311801 ]
Robert Scholte commented on MRELEASE-516:
-----------------------------------------
@Hannes: http://maven.apache.org/plugins/maven-release-plugin/update-versions-mojo.html
> release:prepare should support a nested/flat hybrid SCM structure
> -----------------------------------------------------------------
>
> Key: MRELEASE-516
> URL: https://jira.codehaus.org/browse/MRELEASE-516
> 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: maven-release-issue.zip, 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] ------------------------------------------------------------------------
> [ERROR] BUILD FAILURE
> [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 /Users/emiles/Projects/release-workspace/release-parent/target/checkout
> [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] ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [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, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (MRELEASE-516) release:prepare should support a
nested/flat hybrid SCM structure
Posted by "Martin Ritchie (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MRELEASE-516?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=258199#action_258199 ]
Martin Ritchie commented on MRELEASE-516:
-----------------------------------------
Has anyone worked on getting release::perform to work?
I have ported the attached patches to trunk but had to make some changes:
- Only one SCM Tag is supported which makes tagging multi-modules tricky (Here I just made the code ignore the set value for the reactor tag and tag the sub-modules based on the artifactId and the specified release version.
- The same had to be done when re-writing the pom.xml for the branch.
All the changes were wrapped with the commitByProject boolean. I shall try and get an updated patch attached here, but would like to get the release:perform working too.
> release:prepare should support a nested/flat hybrid SCM structure
> -----------------------------------------------------------------
>
> Key: MRELEASE-516
> URL: http://jira.codehaus.org/browse/MRELEASE-516
> 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: maven-release-issue.zip, 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] ------------------------------------------------------------------------
> [ERROR] BUILD FAILURE
> [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 /Users/emiles/Projects/release-workspace/release-parent/target/checkout
> [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] ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [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: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] (MRELEASE-516) release:prepare should support a nested/flat
hybrid SCM structure
Posted by "Hannes Kogler (JIRA)" <ji...@codehaus.org>.
[ https://jira.codehaus.org/browse/MRELEASE-516?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=311838#comment-311838 ]
Hannes Kogler commented on MRELEASE-516:
----------------------------------------
thx for the support. I know this goal but that's unfortunately just one step of many this release plugin does or "should do".
obviously there's really until now no other way except releasing every single project for your own. really exhausting...
> release:prepare should support a nested/flat hybrid SCM structure
> -----------------------------------------------------------------
>
> Key: MRELEASE-516
> URL: https://jira.codehaus.org/browse/MRELEASE-516
> 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: maven-release-issue.zip, 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] ------------------------------------------------------------------------
> [ERROR] BUILD FAILURE
> [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 /Users/emiles/Projects/release-workspace/release-parent/target/checkout
> [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] ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [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, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (MRELEASE-516) release:prepare should support a
nested/flat hybrid SCM structure
Posted by "Erik Magnusson (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MRELEASE-516?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=215080#action_215080 ]
Erik Magnusson commented on MRELEASE-516:
-----------------------------------------
I would like to add that it would be desirable if this could also support the case where the modules do not have the aggregator pom as their parent, i.e. the following scenario:
{code}
release-workspace\
|
|--release-parent
| |+pom.xml (modules: ../release-module1, ../release-module2)
|
|--release-module1
| |+pom.xml (parent: corporate root pom)
|
|--release-module2
|+pom.xml (parent: some other parent)
{code}
We would like to have this set up in order to support a collective release consisting of a dynamic set of modules (the list of modules in the aggregator pom is dynamically generated from a dialog where you can choose which modules to release at a particular time).
The release cycle for these modules may or may not coincide at any point in time, it depends entirely on which features should be pushed to production, and we want this flexible workflow. (And we certainly do not want to release every module independently since it can be up to 30-40 modules and releases can be as frequent as every week.)
Also, it would be ideal if any SCM structure could be supported (since SCM information is readily available in each module's pom anyway), e.g. the modules above might look like this in the repo:
{code}
repo-root\
|
|--release-parent\trunk
| |+pom.xml (modules: ../release-module1, ../release-module2)
|
|--subdirectory1\
| |
| |----release-module1\trunk
| |+pom.xml (parent: corporate root pom)
|
|--release-module2\trunk
|+pom.xml (parent: some other parent)
{code}
> release:prepare should support a nested/flat hybrid SCM structure
> -----------------------------------------------------------------
>
> Key: MRELEASE-516
> URL: http://jira.codehaus.org/browse/MRELEASE-516
> 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: maven-release-issue.zip, 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] ------------------------------------------------------------------------
> [ERROR] BUILD FAILURE
> [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 /Users/emiles/Projects/release-workspace/release-parent/target/checkout
> [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] ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [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: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] (MRELEASE-516) release:prepare should support a nested/flat
hybrid SCM structure
Posted by "Hannes Kogler (JIRA)" <ji...@codehaus.org>.
[ https://jira.codehaus.org/browse/MRELEASE-516?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=311800#comment-311800 ]
Hannes Kogler commented on MRELEASE-516:
----------------------------------------
as a workaround during this is fixed, is there any possibility to deactivate automated tagging when doing a release?!
> release:prepare should support a nested/flat hybrid SCM structure
> -----------------------------------------------------------------
>
> Key: MRELEASE-516
> URL: https://jira.codehaus.org/browse/MRELEASE-516
> 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: maven-release-issue.zip, 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] ------------------------------------------------------------------------
> [ERROR] BUILD FAILURE
> [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 /Users/emiles/Projects/release-workspace/release-parent/target/checkout
> [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] ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [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, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira