mvn eclipse:eclipse does some cool things

13 05 2007

Not having tried this much before I wasn’t certain what it did exactly, but once you have fully populated pom’s in you project, a quick mvn will sync all the .settings, .project and .classpath files that eclipse uses suitable for use in eclipse. The really great bits are, 1) it knows about transitive deps and adds those where necessary 2) it know about source code and if you do a mvn -DdownloadSources=true eclipse:eclipse it will download the sources, wire in the javadoc etc. It also knows about projects in the same package, referencing those directly.

Potentially, if we adopted the layout structure that the plugin builds, we wouldn’t need to have any .classpath, .project or .settings files in SVN, as all developers would to would be a quick mvn -DdownloadSources=true eclipse:eclipse to generate all the eclipse specific files from the pom.xml’s.

This would be a huge benefit reducing the work syncing the eclipse settings and allow those who want to use Idea or another supported IDE to do the equivalent.

About these ads

Actions

Information

3 responses

14 05 2007
Matthew Buckett

Have you tried the running mvn -DdownloadSources=true eclipse:clean eclipse:eclipse over an entire checkout and if so does it work?

14 05 2007
Ian Boston

mmm that sounds dangerous, like it might delete all the .classpath and .project files.

But I have done
mvn -DdownloadSources=true eclipse:eclipse

on a smaller set which I think is safe… it appears to just update.

If you know that trunk is stable it might be worth trying, just to see what happens, if it makes a complete mess, you can just delete all the modified and new files and svn update

14 05 2007
Matthew Buckett

The output of eclipse:eclipse makes dependencies on the repository version of a dependency whereas the current .classpath files point to relative eclipse projects directly, also it seems to add in eclipse dependencies on all the provided XML stuff (xalan/xerces/etc) from the master/pom.xml.




Follow

Get every new post delivered to your Inbox.

Join 121 other followers

%d bloggers like this: