Maven New Projects

This describes how to create a new Maven project from inside Eclipse using the m2eclipse plugin. There is also a procedure using the command line that is described on the page Maven New Projects Command Line.

Assumptions

  • Maven Install and Maven Workspace have been followed.
  • Eclipse is ready to go with Maven, but project is not yet created.
  • This builds a 'jar' file component to be used as part of another executable.

Using m2eclipse Wizard

  • Make sure MavenPluginInstall has been completed
  • From inside Eclipse:
  1. File -> New -> Project; select Maven -> Maven Project
  2. Project Location: Select your choice of default workspace or other location (I've used D:\Data\java\projects).
  3. Archetype Selection: Choose as appropriate (I've used maven-archetype-quickstart from the "Internal" catalog).
  4. Module Details:
    1. Example shown here. (newMavenProject.png)
    2. Noticed that the package doesn't have to match the group id

Issues

  • Not sure why this assumes I'll be using the 1.4 compiler. The workspace settings are for 1.5. Is this the wizard/archetype? Workaround is to turn off the project specific settings.
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License