質問

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
役に立ちましたか?

解決

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.

他のヒント

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

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top