Maven SCM Plugin for RTC
David Lafreniere (4.8k●7)
| 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
We are having a problem running SCM.exe
User has an encrypted password file. Seems SCM cannot read the file. We are calling scm from the build definition and cannot have the password just typed into the command. Suggestions? |
Hi Robin, your question is off topic for the current thread, which is about the Maven SCM plugin. I suggest you post it as a new top-level topic in the Using RTC forum, and I or someone else will follow up.
|
Hi Robin, your question is off topic for the current thread, which is about the Maven SCM plugin. I suggest you post it as a new top-level topic in the Using RTC forum, and I or someone else will follow up. My apologies. I will use the RTC thread. |
Ok, good, you've got it working on a single module.
With hard coded userid/password. :-) A few questions: 1. What is your project structure on disk? Nested or flattened? 2. Are you using the relativePath bits for the parent? 3. You only should have the SCM section in the root pom. Have you also specified it in the child poms? If so, remove it; they are not supported. 4. When you re-introduce the child poms, it still fails with the same error? -Chris If I remove the child projects from the modules tag in the parent pom, than it works fine.
|
Hi Nick.
No I don't belive it is an issue. Until the user id and password were hard coded, and the error persisted (still waiting on confirmation on that one), I was thinking that it was a parsing error. Just a guess on my part. When I'm back at work, I'll see if I can get a multi module project working the same way, and see what I come up with. The error is manifesting itself here in the release:prepare stage. That always worked for me. The error was at the release:perform stage. The correct tag/snapshot was not being checked out. This is caused by the scm plugin not accepting the tag/branch details of the passed in parameters of the checkout command (which appears to have been written specifically for the release plugin). The work around here, was to manual edit the release.properties file. Change the URL's in it to point to the tag not the trunk/working workspace. -Chris > Chris, you mentioned having to tweak the actual Maven release plugin to properly handle an scm url transformation. |
Hi Sandor,
I'm using RTC 3.0 (RTC-I20101112-1731) from the about page of the RTC Eclipse tool. When I see the version of scm, I see:
Hi. Hi. I'm using 3.0. Hi, Alright. We have success! |
A few more:
5. Why the usage of the global settings? Why not the usual ~/.m2/settings.xml? I forbid modifications to the global settings.xml in <maven_home>/conf/settings.xml. That is part of the distribution, and if you modify this file, then you need to replicate it across *ALL* installations of maven. I have the following installations of maven on all of my machines: 2.0.9, 2.0.11, 2.2.1, 3.0-beta-1, 3.0-beta-2, 3.0-beta-3, 3.0, 3.0.1, 3.0.2 and 3.0.3. Please don't use the global one. Use ~/settings.xml instead - that is what it's for. Additionally, I do not know if that is passed on through to the maven that is spawned by the release process. 6. Where are your jazzUser, jazzPassword and jazzWorkspace (really, really bad idea that one) coming from? From the command line via -D... or as properties defined in the settings.xml file? If it is via the -D... it will not be passed onto the spawned instance of maven used by the release process. To pass parameters in via -D, you need to use the -Darguments value, ie:
This is how I use the release process under Hudson. The Hudson build not, $BUILD_NUMBER is otherwise not passed through to the "mvn deploy" called by the release plugin. -Chris Ok, good, you've got it working on a single module. If I remove the child projects from the modules tag in the parent pom, than it works fine.
|
1. The structure is the following:
sh-4.1$ pwd /cygdrive/d/CG/src/cg-cm sh-4.1$ ls -ltr total 0 drwx------+ 1 Administrators Domain Users 0 Jan 12 08:37 cg-cm-passwords drwx------+ 1 Administrators Domain Users 0 Jan 12 08:47 cg-cm-Base drwx------+ 1 Administrators Domain Users 0 Jan 31 08:51 cg-cm-superpom drwx------+ 1 Administrators Domain Users 0 Jan 31 08:51 cg-cm-cfg drwx------+ 1 Administrators Domain Users 0 Jan 31 09:49 cg-cm-root sh-4.1$ so it is flatterned I think. I was in the cg-cm-root dir when I started mvn release:prepare. 2. Yes, relativePath tag is there in the <parent> sections of the child modules. 3. Only one <scm> section is there in the root pom. 4. Yes, when I reintroduce tham it fails again. Ok, good, you've got it working on a single module. |
5. I'm using the global settings because we have a problem with our Nexus server. This is just a WA to use the companies proxy instaed nexus.
6. The properties are coming from the command line. If I try it like this:
Than I get errors more early. And the scmurl is not filled out, and none of the scm commands work. A few more: Ok, good, you've got it working on a single module. If I remove the child projects from the modules tag in the parent pom, than it works fine.
|
Hi Sandor,
Re 1. Yes, that is flattened. :-( Allegedly, the release plugin has been 'fixed' to allow for this case. There have also been reports that is has not always worked. Personally, I don't trust it. So, at least for the purposes of testing, can you create a nested version? (as another component, if need be), where the root *is* the root. I'm assuming that root dir only has a pom.xml in it, that contains the scm and the modules clauses in it. Re 4. Ok, reintroducing the passed in variables and the problem re-occurs. :-) That is really looking like the issue then, and the -Darguments is meant to address that. Re 5. Anything in the global settings is available in the user's settings. And I noticed that the release process generates it's own and uses that instead. Just wanting to avoid issues. Re 6. I don't think that your post was completed. It ends in "more early, and" ... ????? :-) -Chris |
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.