what do I need to do if I want to convert a eclipse project to start using maven2?
I know of the maven plugin, but do I need to modify the existing project?
Or should I just re-import into a newly created project?
what do I need to do if I want to convert a eclipse project to start using maven2?
I know of the maven plugin, but do I need to modify the existing project?
Or should I just re-import into a newly created project?
Steps I would take to convert a single Eclipse project include:
That should be everything as I recall the steps without opening up Eclipse. Be sure to let me know if you run into any problems!
Trying to keep the existing Eclipse project and add maven as an after thought will just put you in a world of hurt if you don't have the correct project layout and/or dangling Eclipse managed dependencies.
Converting a set of projects working together might prove more difficult, but should include the same steps (with the addition of setting up a parent pom / modules / dependencies)
Supposing you have m2eclipse installed, you can mavenize the existing Java project by just right click on project->Maven->Enable Dependency Management. Now project can be build with maven and you can manage dependencies in generated pom.xml. The disadvantage of this approach is that the existing project folder structure is preserved, so your project layout won't follow the maven standard convention.
If you don't have heavy reasons to stay with existing project, I would recommend to start new maven one and import your sources and resources into it, so you'll take advantage of meaningful maven defaults, that hopefully will save you a lot of time and nerves in using various plugins.