It's all about the answers!

Ask a question

Maven SCM Plugin for RTC


0
4
David Lafreniere (4.8k7) | asked Jul 20 '10, 3:41 p.m.
FORUM MODERATOR / JAZZ DEVELOPER
edited Oct 06 '16, 10:24 a.m.
Please use this forum topic to discuss the ongoing development of the Maven SCM Plugin for RTC.

I would especially like to know how users intend to use the Maven SCM Plugin and especially the Maven Release plugin in the context of RTC.

What would really help is if you could provide a short description of what you feel each scm goal should do. (What would help even more if you could provide a sample Jazz SCM CLI line on exactly what you feel should be done).

Often difficulty occurs because we are bound to the Maven SCM Plugin framework, and the level of information supplied to us for each goal may be too little or to much in order to easily map it 1:1 to an RTC use case scenario. RTC SCM is great at being flexible for team (or even personal) use, but it also has many "things" that other traditional SCM systems do not.

Questions of discussion could be:

1. Should the checkin goal automatically create and "complete" a change set with the given message/comment every time the checkin goal is executed?. Should it also "deliver" this change set with every checkin goal? or should it just check in files to the existing change set?

2. The checkout goal allows an optional passed in ScmVersion Maven object. For example, the release-plugin calls this checkout goal in the release:perform goal and used this ScmVersion object to represent a "snapshot" which was created in the release:prepare goal. However Jazz RTC does not allow you to checkout (i.e. "load") a particular snapshot. Can we come up with an agreed upon action for this scenario?
2a. One option would be to temporarily create another repository workspace which is based on the given snapshot. This would allow the user to checkout the files properly. However one problem is that these SCM goals act against the workspace defined in the SCM URL (in the pom.xml), thus future goals such as (status or checkin) would be against the original repository workspace, and not the one we checked out of...

3. The "project structure" of Maven projects and RTC/Eclipse projects are different. Maven has the concept of "parent projects" in which entire child projects exist below a parent project, whereas in Eclipse/RTC each project generally exists at the same root level. At the surface this doesn't appear to be a problem, but some Maven users may not be able to do what they want with the Jazz SCM provider. In particular, Jazz SCM does not allow checking out a project underneath another checked out project (i.e. can't have a sandbox in a sandbox).
3a. Ex: During an initial test run of release:perform (after performing after a release:prepare), I saw that the supplied checkout directory was "<releaseProject>\target\checkout" (Which Jazz Scm cannot do).

Please see the following Wiki document for additional information.
https://jazz.net/wiki/bin/view/Main/BuildFAQ#Does_Jazz_Team_Build_support_Mav

104 answers



permanent link
Chris Graham (367814) | answered Feb 09 '12, 7:19 a.m.
I'm looking for some help here, on the certificate files, and the --smartcard options.

I've read though some of the testing doco.

And the other info I've been pointed too.

I'm still unclear on a few things.

If I use the --smartcard option, do I also need to use the --username option?

Ditto for the certificate option.

So, basically, what are the combinations of these options?

The doco states these options, but gives no examples on them, nor does it state what options need to be given along with the cert and card options.

The testing doco shows how to set up a cert server side, but not how (precisely) how to use it with the scm tool.

Can someone help?

Ta.

-Chris

permanent link
Ecker Sandor (46) | answered Feb 10 '12, 11:16 a.m.
Hi,

Yes, it would be nice! Please send me the sources.

Regards,
Sandor

Hi Sandor. We're working towards getting the source for the Jazz SCM provider contributed to Apache Maven project. Chris has the latest source, and has offered to help broker the source to Apache.

Chris, in the meantime, I'm fine with you sending Sandor the source, with any fixes you've applied.

permanent link
Eugen Eisler (6) | answered Feb 13 '12, 4:58 a.m.
Hi, I am college of Sandor and now I am trying maven release with jazz plugin.

And it would be very helpfull for us if we get the sources of the plugin.

I debuged maven release plugin and see that the "tag" command behavior of jazz plugin is different as expected by maven release plugin.

The ScmTagPhase.java of maven release plugin pass "basedirAlignedReleaseDescriptor.getScmSourceUrl()" as scmSourceUrl to scmRepositoryConfigurator.getConfiguredRepository(..) method. The last part (':' as separator used) of the url is already cut and the jazz plugin parses the cuted url and creates wrong repository object, therefore tag command is generated not correct.

Please give us teh sources and we would test out the current version of jazz plugin in our env. and also provide suggestion how to avoid\fix the ploblem.

Regards,

Eugen

permanent link
Chris Graham (367814) | answered Feb 21 '12, 1:00 a.m.
Hi All.

When using the release plugin to deliver our projects, we now have:

- Automatic snapshot creation. The snapshot is of the form: ${artifactId}-${version}.
- Automatic workspace creation, based on the snapshot. The workspace is of the form: ${artifactId}-${version}
If we have a flow target defined (Stream or other Workspace), we also have:
- Automatic delivery of the workspace (the one created from the snapshot - ${artifactId}-${version} - not the current workspace in use )
- Automatic snapshot promotion.

Here is a snippet of a properly nested, single component in a workspace, multi module project.

This is the output at the end of the release:prepare goal.

-Chris


[INFO] Checking in modified POMs...
[INFO] Executing: cmd.exe /X /C "scm status --username Deb --password ***** --wide"
[INFO] Working directory: C:\CALMData\Workspaces\RTC\Deb\GPDB
[INFO] Executing: cmd.exe /X /C "scm checkin --username Deb --password ***** C:\CALMData\Workspaces\RTC\Deb\GPDB\pom.xml C:\CALMData\Workspaces\RTC\Deb\GPDB\GPDBResources\pom.xml C
:\CALMData\Workspaces\RTC\Deb\GPDB\GPDBWeb\pom.xml C:\CALMData\Workspaces\RTC\Deb\GPDB\GPDBEAR\pom.xml"
[INFO] Working directory: C:\CALMData\Workspaces\RTC\Deb\GPDB
[INFO] Tagging release with the label GPDB-1.0.10...
[INFO] Executing: cmd.exe /X /C "scm status --username Deb --password ***** --wide"
[INFO] Working directory: C:\CALMData\Workspaces\RTC\Deb\GPDB
[INFO] Executing: cmd.exe /X /C "scm create snapshot --repository-uri https://rtc:9444/jazz --username Deb --password ***** --name GPDB-1.0.10 --description "[maven-release-plugin]
copy for tag GPDB-1.0.10" GPDBWorkspace"
[INFO] Working directory: C:\CALMData\Workspaces\RTC\Deb\GPDB
[INFO] Executing: cmd.exe /X /C "scm create workspace --repository-uri https://rtc:9444/jazz --username Deb --password ***** GPDB-1.0.10 --snapshot GPDB-1.0.10"
[INFO] Working directory: C:\CALMData\Workspaces\RTC\Deb\GPDB
[INFO] Executing: cmd.exe /X /C "scm deliver --repository-uri https://rtc:9444/jazz --username Deb --password ***** --source GPDB-1.0.10 --target GPDBStream"
[INFO] Working directory: C:\CALMData\Workspaces\RTC\Deb\GPDB
[INFO] Executing: cmd.exe /X /C "scm snapshot promote --repository-uri https://rtc:9444/jazz --username Deb --password ***** GPDBStream GPDB-1.0.10"
[INFO] Working directory: C:\CALMData\Workspaces\RTC\Deb\GPDB
[INFO] Transforming 'GPDB - J2EE Multi Module Project'...
[INFO] Transforming 'GPDB - Resources Project'...
[INFO] Transforming 'GPDB - WAR Project'...
[INFO] Updating GPDBResources to 1.0.11-SNAPSHOT
[INFO] Transforming 'GPDB - EAR Project'...
[INFO] Updating GPDBWeb to 1.0.11-SNAPSHOT
[INFO] Not removing release POMs
[INFO] Checking in modified POMs...
[INFO] Executing: cmd.exe /X /C "scm status --username Deb --password ***** --wide"
[INFO] Working directory: C:\CALMData\Workspaces\RTC\Deb\GPDB
[INFO] Executing: cmd.exe /X /C "scm checkin --username Deb --password ***** C:\CALMData\Workspaces\RTC\Deb\GPDB\pom.xml C:\CALMData\Workspaces\RTC\Deb\GPDB\GPDBResources\pom.xml C
:\CALMData\Workspaces\RTC\Deb\GPDB\GPDBWeb\pom.xml C:\CALMData\Workspaces\RTC\Deb\GPDB\GPDBEAR\pom.xml"
[INFO] Working directory: C:\CALMData\Workspaces\RTC\Deb\GPDB
[INFO] Release preparation complete.
[INFO] [release:perform {execution: default-cli}]
CheckoutProjectFromScm.execute:
[INFO] Checking out the project to perform the release ...
[INFO] Executing: cmd.exe /X /C "scm load --repository-uri https://rtc:9444/jazz --username Deb --password ***** --force --dir C:\tmp\maven GPDB-1.0.10"
[INFO] Working directory: C:\tmp\maven
[INFO] Invoking perform goals in directory C:\tmp\maven\GPDB
[INFO] Executing goals 'deploy'...
[INFO] [INFO] Scanning for projects...
[INFO] [INFO] Reactor build order:
[INFO] [INFO] GPDB - J2EE Multi Module Project
[INFO] [INFO] GPDB - Resources Project
[INFO] [INFO] GPDB - WAR Project
[INFO] [INFO] GPDB - EAR Project
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] Building GPDB - J2EE Multi Module Project
[INFO] [INFO] task-segment: [deploy]
[INFO] [INFO] ------------------------------------------------------------------------

permanent link
Timo Paananen (6) | answered Feb 21 '12, 5:40 a.m.
Hi Chrisgwarp!


Is there anyway we could obtain snapshot release from a jazz-scm-provider?

thanks in advance.

permanent link
Chris Graham (367814) | answered Feb 26 '12, 8:22 p.m.
Hi All.

I need some help with possible internationalisation.

Can someone - who does not use English as the default - please run a "scm status" in one of their sandboxes, and send me the results?

Ta.

permanent link
Chris Graham (367814) | answered Mar 18 '12, 8:55 p.m.
Hi All.

Just a quick follow up on the above issues that Sandor and Egen had.

They were using a multi-module project to produce a single jar.

In a flattened structure.

Thus, they run into the well known, and still-not-fixed, release plugin issues with flattened, not nested, structures.

That aside, they they should have done, was to have released their parent poms as a separate project, which is normal maven practice (it encourages reuse).

Then, their jar project would simply have been the normal single module maven project, which would have worked perfectly with the existing 1.3 plugin, as I've documented clearly above.

-Chris

permanent link
Chris Graham (367814) | answered Apr 17 '12, 8:47 p.m.
@Chris: thanks for the work you are doing...a solution is really needed here.


Thanks!

I'm hoping to have the patch ready, along with some video documentation (ie a real demo/example) by the end of this week.

Then I will create a SCM issue in the Maven Jira, and then attach the patch to that issue. Then, what I've done will be publicly viewable by all.

Is there a way we can vote on the changes necessary for the Maven-SCM-Plugin?


The only voting that needs to take place, is amongst the Maven community when it comes time to release the 1.7 SCM code. Of which, I'm hoping that the Jazz patch is one of them. :-)

We are currently trying to get the release-build running using the "hacky" script-solution from post #4 but this is not a nice way especially since I havent found a way to delete the repository-workspace that is created during the process.


There are a few issues here, all of which I believe have work items associated with them. :-)
- We can not load directly from a snapshot. We can only do it from a workspace, created from a snapshot. Hence, currently, you're stuck with the plethora of left over repository workspaces.
- We can not delete (anything) from the SCM CLI. So you'll need to manually delete the workspaces using the Eclipse client.

It would be nice to see a release of your version in the near future.


:-) I'm hoping to get it done soon.

Thanks for the post,

-Chris

permanent link
Chris Graham (367814) | answered Apr 18 '12, 8:54 a.m.
Hi All.

I'm basically done.

For those of you who would like to preview and comment on the documentation, please see:

http://www.warpspeed.com.au/JazzMavenDoco.zip

It contains a PDF capture of the 4 html pages that are generated by the "mvn site" command.

Please let me know what you think.

I hope to have the patch released by the end of tomorrow.

-Chris

permanent link
Chris Graham (367814) | answered Apr 21 '12, 11:27 p.m.
The Maven SCM Provider Jazz module has been finished.

It's issue:

http://jira.codehaus.org/browse/SCM-670

was created, and

http://jira.codehaus.org/browse/MRELEASE-747

was updated to reflect the correct dependencies.

The patch, and it's images necessary for the site generation are all attached to the SCM-670 issue.

You are now able to download the patch and build it yourself.

As there are several other issues (unrelated to the Jazz ones) that are also going to be rolled into the release of SCM 1.7,
and that may be happening in the next week or so.

Feedback, comments welcome.
If you have issues, then please raise them Jira:

http://jira.codehaus.org/browse/SCM

Enjoy!

-Chris

Your answer


Register or to post 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.