rtc and multimodule maven projects - best practices
Angelo Corna (263●5●83●83)
| asked Nov 27 '13, 4:02 a.m.
retagged Dec 16 '13, 11:57 a.m. by David Lafreniere (4.8k●7)
We need to manage multimodule Maven project on RTC and searching some information on this topic we've found an interesting post (http://phkrief.wordpress.com/2010/09/24/when-maven-meets-rational-team-concert/) with some considerations regarding this issue and the suggestion here is to flatten the Maven structure.
I've found another post on jazz.net (https://jazz.net/forum/questions/35231/maven-multi-module-projects-in-eclipse) with this information
Some people recommend creating a flat Maven project structure, where the parent and child projects are at the same level in the file system, and the parent POM refers to the child projects using e.g. "../child". But that has some limitations, e.g. the Maven release plugin does not understand this flat structure.
What are the best practices and the attention points for this issue and more in general for the Maven projects management in RTC?
|
3 answers
Hello All.
I wrote the maven jazz scm provider. I work extensively with nested projects, eclipse and RTC. I'm still using RTC 3.0 as my working reference - that is what I developed and tested the plugin against. My advise is NOT to flatten the structure, and keep the functionality that allows you to keep the release plugin, which IMHO, is the killer app feature of maven. I've done some videos about this, I'll see if I can dig them up. Eclispe does not have any issues with nested structure, not since 3.5, which it understands the concepts of Linked Projects. RTC (at least V3), does not play as gracefully, but it does work. The odd thing about the Eclipse/RTC integration is that the RTC provider does not recognise the linked projects as being under source control. So you end up with the odd situation of making changes in one project, but can only check them in from the root project. As for sharing, or having eclipse automatically find the nested projects (to make them linked), yes, as of at least V3, that did not work, so that has to be done manually. Doable, but painful. Team Project Set Files (psf's) would have been good here, but they too are not supported under eclipse :-( At least not as of V3. I've found a V4 VM that should be all nicely set up, so I'll see how that goes once I've finished downloading it. I imported my proejcts from SVN, (in their fully nested structure), I disassociated the project from SVN, and then I shared the project into RTC. That is all that I needed to do. If you want more details, then I can provide them. -Chris Comments Chris, please, can you dig up the video? As this comes up repeatedly, I would also like to suggest to create an article around it.
Chris Graham
commented Nov 28 '13, 6:31 a.m.
Yes, that was something that I've always been meaning to do. The article and add some polish to the presentations. Let me find them.
Chris,
Chris Graham
commented Nov 29 '13, 7:54 p.m.
I've seen it done, and it's lazy bad practice, and as we are talking best practices here...
Chris Graham
commented Nov 29 '13, 8:25 p.m.
To further explain.
Chris Graham
commented Nov 29 '13, 8:37 p.m.
So the tag only basically refers to only that project. Making a tag across mutiple trunks (the svn equivalent of your multiple Components) makes no sense in maven terms and is not supported.
Chris Graham
commented Nov 29 '13, 8:43 p.m.
This is why I recommend only ever running the maven release plugin in a repository workspace that only ever contains one component; the one that you want to release.
Wendy Murphy
commented Mar 19 '14, 4:29 p.m.
Hi Chris,
Chris Graham
commented Mar 19 '14, 9:08 p.m.
Email me at ChrisGWarp@gmail.com
Wendy Murphy
commented Mar 21 '14, 8:50 a.m.
much appreciated email on the way.
showing 5 of 10
show 5 more comments
|
Ralph Schoon (63.6k●3●36●46)
| answered Nov 27 '13, 5:18 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
See: http://phkrief.wordpress.com/tag/maven/ and follow the advice to make it flat.
The problem with hierarchy is that RTC (as well as Eclipse) has problems with nested Eclipse projects. And Eclipse only shows and allows to edit Projects. RTC Follows the base Eclipse SCM paradigm and loads the folder as projects into RTC. If you have a hierarchy, RTC will find the top level .project file and load that folder. All contained Eclipse projects are ignored. To handle the hierarchy you would have to make SCM to ignore the top level project. This is doable during the share. Then you have to load the full structure with a special load (create project for the folder), but then you can not load the nested projects. You might be able to use load rules to load differently, but it is probably complex. Comments So, Angelo, it seems that my post is still up-to-date based on Ralph's answer.
Ralph, Philippe,
|
Hello,
Is this still up-to-date information?
Kind regards,
Pirolla.
|
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.