Thursday, May 10, 2012

m2eclipse: Add archetypes to create maven project

Ran into an issue where I could not use an archetype from within Eclipse. In order to do so, a new catalog will need to be created, then Eclipse simply needs to be told where it is.
  • Navigate to your .m2/repository in your console
  • Enter the command 'mvn archetype:crawl'
This will create the file archetype-catalog.xml

In Eclipse create a new Maven project, when you get to the screen with the catalog drop down box, click configure and add a Local Catalog pointing to the xml file created above. Ok out.

This catalog will now be added to the drop down box and can be selected.

Enjoy.

No comments:

Post a Comment