rtc and multimodule maven projects - best practices
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
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
showing 5 of 10
show 5 more comments
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.
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.