mvn eclipse:eclipse does some cool things

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.

Comments

3 Responses to “mvn eclipse:eclipse does some cool things”

  1. Matthew Buckett on May 14th, 2007 4:13 pm

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

  2. Ian Boston on May 14th, 2007 4:24 pm

    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

  3. Matthew Buckett on May 14th, 2007 6:00 pm

    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.

Leave a Reply




This is a captcha-picture. It is used to prevent mass-access by robots. (see: www.captcha.net)

You must read and type the 5 chars within 0..9 and A..F, and submit the form.

  

Oh no, I cannot read this. Please, generate a