views:

61

answers:

4

I am using Maven to automate a project that is being developed in RAD 7.5. I've installed m2eclipse in RAD 7.5 , updated ( manually ) maven dependencies , and it builds Maven way within RAD. My main question : what is the best practice using m2eclipse with RAD? Should we keep both ( RAD and maven ) settings in the project workspace or remove all RAD settings and stick with Maven only?

Also , I am wondering about m2eclipse dependency management feature. I was hoping that it will update pom.xml with the new dependency when I add it to the classpath and vise versa ( in case we are keeping both configurations ). Is this a correct assumption? this doesn't seem to happen. Maybe I need to give it another try....

Any suggestions are very much appreciated!

+1  A: 

My main question : what is the best practice using m2eclipse with RAD? Should we keep both (RAD and maven) settings in the project workspace or remove all RAD settings and stick with Maven only?

I don't work with RAD so I'm not sure my answer will be totally accurate but when working with Eclipse, m2eclipse takes care of the .classpath and the .project files and everything is derived from the pom.xml, not the other way around. I don't think it's different with RAD.

[...] I was hoping that it will update pom.xml with the new dependency when I add it to the classpath and vise versa (in case we are keeping both configurations). Is this a correct assumption?

I don't think so, m2eclipse won't translate a random dependency (that may not be available in any repo) into a maven artifact and add the coordinates to the pom.xml. Edit the pom.xml or use the wizard to add a dependency. As I said above, it works the other way around, things are derived from a pom.xml.

Pascal Thivent
Pascal , thanks so much for the response! I understand that we shouldn't keep .settings/, .classpath, .project under source control then but rather ignore the generated files at checkin , right?It seems like we need to ask all developers to install m2eclipse at their IDE , add all RAD generated settings to svn:ignore property so it won't get committed , and regenerate it every time based on updated pom.xml .
@user390060: Yes, this is how I use m2eclipse.
Pascal Thivent
A: 

As there seem to be many open issues with m2eclipse (at least 0.10+) and RAD 7.5, I'm thinking of going the manual way in RAD with the eclipse:rad goal:

http://maven.apache.org/plugins/maven-eclipse-plugin/rad-mojo.html

mglauche
You might not want to use the rad mojo, since it's a RAD 6 tool. The eclipse:eclipse goal should work since maven-eclipse-plugin:2.5
Mike Cornell
A: 

Please to go to http://www.ibm.com/developerworks/wikis/display/rad/Articles See section Java EE, article "Java EE development using Rational Application Developer 7.5.5 and Maven".

This is a best-practices paper published by Rational Application Developer development team.

Be aware that the comment from Pascal might have performance implications during publishing to WebSphere Application Server or WebSphere Portal Server.

The developerWorks forum for Rational Application Developer contains also quite a number of posts.

The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM.

Michael Grosse
A: 

The article "Java EE development using Rational Application Developer 7.5.5 and Maven" (http://www.ibm.com/developerworks/wikis/display/rad/Articles) is OK but the site is wrong.

Since RAD 7.5.5 is based on Eclipse 3.4.2 you need to point here: http://m2eclipse.sonatype.org/sites/m2e-e34/

Gene De Lisa