Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Create Maven archetype

I have some Eclipse maven project which I typically, copy-and-paste/modify which serves as a "template" application. How can I make this a maven archetype such that I can create these template project with maven and where is the best place to publish it perhaps?

Such that I can do something like:

mvn archetype:generate -DarchetypeRepository=repo1.maven.org -DarchetypeGroupId=org.codehaus.mojo -DarchetypeArtifactId=gwt-maven-plugin -DarchetypeVersion=2.3.0
like image 429
quarks Avatar asked Mar 25 '26 07:03

quarks


1 Answers

Try to see this :

  • this excellent book from Sonatype : http://books.sonatype.com/mvnref-book/reference/archetypes.html
  • the official documentation http://maven.apache.org/guides/mini/guide-creating-archetypes.html (see Noahz's comment)

With maven official website, this is THE documentation.

Those tutorials may help you more than one of our answer.

About location, you should put them into your corporate repository.

like image 190
3 revsJean-Rémy Revy Avatar answered Mar 26 '26 19:03

3 revsJean-Rémy Revy