Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Maven SCM Plugin for RTC

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

4

0 votes



104 answers

Permanent link
The core Maven team have voted, and the 1.7 SCM release has been accepted. This is the version that contains my Jazz provider.

It's documentation is now available at:

http://maven.apache.org/scm/maven-scm-providers/maven-scm-provider-jazz/index.html

It should be being staged now, and should be in central in a couple of days, if not already.

The next step, is to get the maven release plugin released. It should be 2.3. There are discussions now to get that underway soon.

-Chris

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

1 vote


Permanent link
The code necessary to support workItem (scm associate changeset) has been delivered to the apache SCM git repo and the release plugin SVN repo.

I have additional changes and updates and testing to make, but the basis of the code is now there, for those of you who can not wait for a formal release of the maven-release and maven-scm code. :)

-Chris

1 vote


Permanent link
The doc on using the Maven SCM Plugin has moved to:
https://jazz.net/wiki/bin/view/Main/UsingMavenScmPlugin

The FAQ entry now just links to that topic.

The zip containing the additions to make to your local Maven repository is available in the maven subdirectory of the Build System Toolkit for Windows and Linux (zip install) for M7a:
https://jazz.net/downloads/rational-team-concert/milestones/3.0M7a?p=allDownloads

0 votes


Permanent link
Thanks for developing this plugin it's really useful. I tried it on our build and after following the instructions on the wiki and making a few tweaks I got it working.

It's not clear from the wiki but plugin does work with RTC 2.

I had to add a version to the maven-scm-plugin, otherwise Maven wanted to run 1.5-SNAPSHOT

<plugin>

<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-scm-plugin</artifactId>
<version>1.3</version>


I then got an error when tagging:

[INFO] ------------------------------------------------------------------------

[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] org/apache/maven/scm/ScmTagParameters
org.apache.maven.scm.ScmTagParameters
[INFO] ------------------------------------------------------------------------
[INFO] Trace
java.lang.NoClassDefFoundError: org/apache/maven/scm/ScmTagParameters
at org.apache.maven.scm.provider.jazz.command.tag.JazzTagCommand.execute
TagCommand(JazzTagCommand.java:28)


Following these instructions at http://code-monkey-nuts.blogspot.com/2009/09/maven-release-plugin-with-git.html for the Git plugin I added a dependency on maven-scm-api version 1.3 to the maven-scm-plugin and maven-release-plugin configuration

		<dependency>

<groupId>org.apache.maven.scm</groupId>
<artifactId>maven-scm-api</artifactId>
<version>1.3</version>
</dependency>

The final plugin configuration:

<plugin>

<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-scm-plugin</artifactId>
<version>1.3</version>
<dependencies>
<dependency>
<groupId>org.apache.maven.scm</groupId>
<artifactId>maven-scm-provider-jazz</artifactId>
<version>1.3</version>
</dependency>
<dependency>
<groupId>org.apache.maven.scm</groupId>
<artifactId>maven-scm-api</artifactId>
<version>1.3</version>
</dependency>
</dependencies>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<dependencies>
<dependency>
<groupId>org.apache.maven.scm</groupId>
<artifactId>maven-scm-provider-jazz</artifactId>
<version>1.3</version>
</dependency>
<dependency>
<groupId>org.apache.maven.scm</groupId>
<artifactId>maven-scm-api</artifactId>
<version>1.3</version>
</dependency>
</dependencies>
</plugin>

0 votes


Permanent link
Thanks for developing this plugin it's really useful. I tried it on our build and after following the instructions on the wiki and making a few tweaks I got it working.


Hi Darrell, thank you for the feedback.

I have updated our Wiki documents to include the pom configuration details, as well as indicate that this Maven Scm Plugin works with RTC 2.x.

I am also glad to hear that you think this plugin is "really useful". Which "maven goals" from either the maven-scm-plugin or maven-release-plugin did you try? I hoping get as much feedback as possible related to the user experience. I'm curious to know if the currently implemented maven scm goals work as expected, or if there is anything preventing you from accomplishing your desired goal. (are there problems with the currently implemented goals? is there a much needed scm goal that is not yet implemented? etc.)

0 votes


Permanent link
Hi,

I am trying to set up an automatic build for a university lecture on software engineering. I have the server of RTC 2.0 set up and that has been running successfully throughout the last semester. Now I would like to add maven support and run sonar to show the students metrics and how their metrics improve over time using the sonar motion chart.

Maven is installed and runs on the client and the server

Sonar is intalled and runs.

I found the jazz-scm-plugin in the download of RTC 3.0M8 build system toolkit under https://jazz.net/downloads/rational-team-concert/milestones/3.0M8?p=allDownloads and installed that.

I have a pom set up. It looks as follows (only name and pw changed)


<project>
<modelVersion>4.0.0</modelVersion>
<groupId>de.htwg.sa</groupId>
<artifactId>de.htwg.sa.039.SudokuMetricsInterfaces</artifactId>
<version>1.0</version>

<scm>
<connection>scm:jazz:my.name;mypasswd@https://jazz.in.fhkn.de:9443/jazz:HTWG-Vorlesungen</connection>
<developerConnection>scm:jazz:my.name;mypasswd@https://jazz.in.fhkn.de:9443/jazz:HTWG-Vorlesungen</developerConnection>
</scm>

<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-scm-plugin</artifactId>
<version>1.3</version>
<dependencies>
<dependency>
<groupId>org.apache.maven.scm</groupId>
<artifactId>maven-scm-provider-jazz</artifactId>
<version>1.3</version>
</dependency>
<dependency>
<groupId>org.apache.maven.scm</groupId>
<artifactId>maven-scm-api</artifactId>
<version>1.3</version>
</dependency>
</dependencies>
<configuration>
<connectionType>developerConnection</connectionType>
</configuration>
</plugin>
</plugins>

</build>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.5</version>
<type>jar</type>
<scope>test</scope>
<optional>true</optional>
</dependency>
</dependencies>
</project>


And I have a Build Engine defined in the RTC and running on the server. The Build Engine finds the requests all rigth.

And I have a Build Definition. It holds the parameters
Project location: C:\workspace\de.htwg.sa.039.SudokuMetricsInterfaces
Goals: scm:checkout clean install sonar:sonar
Maven home ...
and Java home ...

When I request the build, I get the following message in the log file of the build:

2010-09-12 17:40:33 wird ausgefhrt auf Host: Jazz
2010-09-12 17:40:33 Soll der Build stattfinden?
2010-09-12 17:40:33 Ja: Immer vom Benutzer eingeleitete Anforderung builden
2010-09-12 17:40:33 Buildteilnehmer "com.ibm.team.build.maven" wird aufgerufen
Scanning for projects...
Searching repository for plugin with prefix: 'scm'.
------------------------------------------------------------------------
Building Unnamed - de.htwg.sa:de.htwg.sa.039.SudokuMetricsInterfaces:jar:1.0
task-segment: (aggregator-style)
------------------------------------------------------------------------

------------------------------------------------------------------------
BUILD ERROR
------------------------------------------------------------------------
Cannot run checkout command :

Embedded error: Can't load the scm provider.
You need to define a connectionUrl parameter
------------------------------------------------------------------------
For more information, run Maven with the -e switch
------------------------------------------------------------------------
Total time: 3 seconds
Finished at: Sun Sep 12 17:40:37 CEST 2010
Final Memory: 9M/17M
------------------------------------------------------------------------
Der Build ist fehlgeschlagen. Der Exitwert war 1.

Apparently I do not understand how to set the connectionUrl parameter. What am I missing.
After quite some time of working on this I feel I am sooo close to getting this to run. I would very much appreciate your help.

Regards, Marko

0 votes


Permanent link
Hi Marko,

Strangely enough, it looks like your connectionURL parameter is in fact correct. My first thought was that you did not have the pom.xml already in the "project location" (i.e C:\workspace\de.htwg.sa.039.SudokuMetricsInterfaces). I know if you were to try the goal "scm:checkout" and the pom.xml doesn't already exist in the "project location" then you would get the same error of "Embedded error: Can't load the scm provider. You need to define a connectionUrl parameter.". I tried a "scm:checkout" goal where the pom.xml doesn't exist in the "project location" and got that error, and then I tried again by putting a pom.xml in that folder and it was able to do the Jazz SCM checkout goal. As a test, can you try putting just the pom.xml in "C:\workspace\de.htwg.sa.039.SudokuMetricsInterfaces" and try running "mvn scm:checkout" from command line (from that directory).

Also, can I get clarification on a few things?
1. Your pom.xml was in "C:\workspace\de.htwg.sa.039.SudokuMetricsInterfaces" and not in the HTWG-Vorlesungen repository workspace.
2. Your "end goal" is to simply copy all projects/files/folders that is in the HTWG-Vorlesungen repository workspace to "C:\workspace\de.htwg.sa.039.SudokuMetricsInterfaces" and then run the maven goal of "clean install sonar:sonar" against that directory.

If #3 is accurate, you might be able to accomplish the same thing by adding the "Jazz Source Control Pre-build Configuration Element" to your Maven Build Definition. To do this, open the build definition editor, and at the top left beside the words "Build Definition" click on the down arrow and select "Edit Configuration". In the "Pre-build" tab, check off "Jazz Source Control" and click "OK". Now in the "Jazz Source Control" tab of the build definition editor, click "Select..." in the "Build Workspace" section and select the "HTWG-Vorlesungen" repository workspace. For the load directory, put the same folder as the "project location" in the "Maven" tab of the build definition editor (i.e C:\workspace\de.htwg.sa.039.SudokuMetricsInterfaces). You might also want to check "delete directory before loading" and un-check "build only if there are changes accepted". In the "Maven" tab of the build definition editor, keep all the same information except change the Goals field to "clean install sonar:sonar".

0 votes


Permanent link
Hello David,

thank you for your explanations. With the recommendations you gave at the bottom of your message I finally got the build to run. You sure made it hard to find that configuration for pre-build. But it works now. Thank you.

Regards, Marko

0 votes


Permanent link
Hello David,

thank you for your explanations. With the recommendations you gave at the bottom of your message I finally got the build to run. You sure made it hard to find that configuration for pre-build. But it works now. Thank you.

Regards, Marko


This is great :)

0 votes


Permanent link
Thanks for developing this plugin it's really useful. I tried it on our build and after following the instructions on the wiki and making a few tweaks I got it working.

cosmetics

0 votes

1–15 items
page 1of 11 pages

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,938
× 1,202
× 45

Question asked: Jul 20 '10, 3:41 p.m.

Question was seen: 102,724 times

Last updated: Oct 06 '16, 10:24 a.m.

Confirmation Cancel Confirm