quarks
quarks

Reputation: 35276

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

Upvotes: 3

Views: 3486

Answers (2)

Jean-Rémy Revy
Jean-Rémy Revy

Reputation: 5677

Try to see this :

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.

Upvotes: 3

user2575807
user2575807

Reputation: 1

I recently had to do this and I wrote a tutorial which may help. It's using Eclipse and gives a few pointers on how to create directories, using conditional statements and installing it in Eclipse.

There's also a download there of the archetype itself so you are free to copy it. It's been a real life saver so I hope it helps you too:

https://www.aplossystems.co.uk/article/create-a-maven-archetype.aplos?content_id=1&cp_id=28

Upvotes: 0

Related Questions