Any clear step by step example of how to use the maven-release-plugin with the Jazz SCM provider?
![]()
I have been trying to evaluate the value of maven release plugin along with the Jazz SCM provider. As post
mvn -B -Dresume=false -DworkingDirectory=/directory release:prepare release:perform
hangs and nor does it alter the working directory. Jazz indicates the working directory is defined as the location I have executed maven.
|
7 answers
![]()
[INFO] Executing: cmd.exe /X /C "scm deliver --repository-uri https://us-nj-darn
one.comverse.com:9443/ccm --username darnone --password ***** --source "darnone
- Maven Nested Release Stream Workspace" --target "Maven Nested Release Stream"
--overwrite-uncommitted"
[INFO] Working directory: C:\workspaces\maven_release_nested_workspace\parent
[ERROR] Error: Process Reports:
Name: Deliver
Operation Reports:
Name: Source Control Operation
Name: Deliver
Participant Reports:Another question is how do I specify specifically the version I want to have set instead of the default incremental counter?
Name: Require Work Items and Comments
A work item must be associated with the change set.
At least one of the associated work items must be assigned to you.
At least one of the associated work items must specify that the work is
planned for the current iteration.
Problem running 'deliver':
'Deliver' failed. Preconditions have not been met: A work item must be associate
d with the change set.
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] parent ............................................. FAILURE [01:21 min]
[INFO] module1 ............................................ SKIPPED
[INFO] module2 ............................................ SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:22 min
[INFO] Finished at: 2015-01-07T11:49:55-05:00
[INFO] Final Memory: 10M/246M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.5
.1:prepare (default-cli) on project parent: Unable to commit files
[ERROR] Provider message:
[ERROR] Error code for Jazz SCM deliver command - 17
[ERROR] Command output:
[ERROR] Process Reports:
[ERROR] Name: Deliver
|
![]()
Below is the output regarding the need for a work item. Even though I pass -DworkingDirectory=/tmp/maven the output indicates the working directory is my current eclipse workspace. Deliver fails because of process rules we use and how would I specify the specific version instead of he default.
[INFO] Executing: cmd.exe /X /C "scm deliver --repository-uri https://us-nj-darn
one.comverse.com:9443/ccm --username darnone --password ***** --source "darnone
- Maven Nested Release Stream Workspace" --target "Maven Nested Release Stream"
--overwrite-uncommitted"
[INFO] Working directory: C:\workspaces\maven_release_nested_workspace\parent
[ERROR] Error: Process Reports:
Name: Deliver
Operation Reports:
Name: Source Control Operation
Name: Deliver
Participant Reports:Another question is how do I specify specifically the version I want to have set instead of the default incremental counter?
Name: Require Work Items and Comments
A work item must be associated with the change set.
At least one of the associated work items must be assigned to you.
At least one of the associated work items must specify that the work is
planned for the current iteration.
Problem running 'deliver':
'Deliver' failed. Preconditions have not been met: A work item must be associate
d with the change set.
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] parent ............................................. FAILURE [01:21 min]
[INFO] module1 ............................................ SKIPPED
[INFO] module2 ............................................ SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:22 min
[INFO] Finished at: 2015-01-07T11:49:55-05:00
[INFO] Final Memory: 10M/246M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.5
.1:prepare (default-cli) on project parent: Unable to commit files
[ERROR] Provider message:
[ERROR] Error code for Jazz SCM deliver command - 17
[ERROR] Command output:
[ERROR] Process Reports:
[ERROR] Name: Deliver
|
![]()
The SCM provider doesn't currently allow a work item to be specified. That sounds like a good enhancement, though, since it's pretty common to have that prerequisite configured. For now, you'll probably need to override that process configuration for the user running the release (i.e. you) in the team area that owns the stream, to remove that precondition during the release.
Comments I have cleaned up my example and have the prepare step working. I temporarily changed the process to remove the restriction. It seems strange that the provide doe snot support attaching a work item since work items are central, a release would be something interesting to track, that there is a Track Build Item,etc. Should I create the enhancement - there are few others I have though of like providing filters on Jenkins jobs in the Hudson/Jenkins Build Definition.
The perform is failing becuase we do not deploy from our poms - we don't use distributionManagent. Instead we use an ArtifactorPro plugin that provided added benefits like publishing the build of materials to Artifactory which then requests approval of 3rd party dependencies in BlackDuck Code Center.
It is the perform step that uses the temporary directory - clarification on that in the documentation would be helpful and I stand by the original subject of this post that there should be a full example somewhere with a basic scenario for how this works. Is it possible for outsiders to publish on Jazz.net?
Yes, please go ahead and create the enhancement for allowing a work item to be specified / created. Regarding publishing on jazz.net, the wiki is restricted to developers, but it's possible to publish an article in the jazz.net/library. Could track this in a work item too, with review by someone on the Build team. The distributionManagement section of the pom (or settings.xml) is fundamental to the maven release process. release:perform checks out the previous tag (ie what was created in the release:prepare phase) and then spawns a "mvn deploy" on it. This is the standard maven release process and is documented everywhere (there is nothing jazz specific about it, is the point that I'm trying to make here). The current snapshot version of both the release plugin and the scm providers now provides the ability to supply a WI to allow the deliver command to work. |
![]()
Doe the provider support flat projects? I am trying this now on a flat version of the sample project and I keep getting the error below. I start off with:
<scm>
<url>https://us-nj-darnone.comverse.com:9443/ccm:darnone - Maven Release Flat Stream Workspace</url>
<connection>scm:jazz:https://us-nj-darnone.comverse.com:9443/ccm:darnone - Maven Release Flat Stream Workspace</connection>
<developerConnection>scm:jazz:https://us-nj-darnone.comverse.com:9443/ccm:darnone - Maven Release Flat Stream Workspace</developerConnection>
</scm>
and after I run release:prepare I get the below error and the local pom has
<scm>
<url>https://us-nj-darnone.comverse.com:9443/ccm:parent-0.0.1/ccm:darnone - Maven Release Flat Stream Workspace</url>
<connection>scm:jazz:https://us-nj-darnone.comverse.com:9443/ccm:parent-0.0.1/ccm:darnone - Maven Release Flat Stream Workspace</connection>
<developerConnection>scm:jazz:https://us-nj-darnone.comverse.com:9443/ccm:parent-0.0.1/ccm:darnone - Maven Release Flat Stream Workspace</developerConnection>
</scm
Error
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.5
.1:prepare (default-cli) on project parent: Jazz Url "https://us-nj-darnone.comv
erse.com" is not a valid URL. The Jazz Url syntax is scm:jazz:[username[;passwor
d]@]http[s]://server_name[:port]/contextRoot:repositoryWorkspace -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureExc
eption
Comments The error here is about the URL, not specifically about the project layout, but I believe the driving release plugin (not our extension to it) may make assumptions about the URL structure based on the project layout. The pom scm URLs are modified by the prepare process. The issue is the project structure is flat and something is getting confused. The solution provided at https://jazz.net/forum/questions/156938/maven-scm-plugin-bug-with-flat-structure
worked but to me this sounds like a bug.
See below Don't flatten it. ever.
Sorry, artifactId, not the name.
|
![]()
In response to PMR 12232,7TD,000
https://jazz.net/forum/questions/35231/maven-multi-module-projects-in-eclipse
I tried the suggestion in the first link. Modifying release.properties completedPhase to scm-tag and rerunning the command with -Dresume=true works but the unanswered question of having to change this manually is unanswered int he post. Is this a bug or an enhancement? Nick Edgar's reply in the second link was 05/03/2010 so the answer might be dated. The maven-release-plugin has supported flat structures since version 2.5. Perhaps the implementation for RTC has not caught up? Comments One thing to mention here is release:prepare when operating on a nested project creates a repository workpsace with the artifact-version format (parent-0.0.3) whereas with a flat project it doesn't do so So, here you're saying that it works correctly, when nested.
|
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.