Create maven archetype project

A simple maven archetypes with most common set of libraries, configured property files and some boiler plate code that you often copy past in every project can be of great help. I had similar requirements and here I am sharing my experience of creating a maven archetype project.

The source code is available here

All the dependencies and properties define in pom.xml will be included in the generated project.

Interesting to look how to include the properties and properties with default values


And if you look at the file ${property1} will be asked while generating the project.


Now to install this archetype locally do

#mvn install

And to create a project out of it do

#mvn archetype:generate  -DarchetypeArtifactId=hello-app-archetype -DarchetypeVersion=1.0.0-SNAPSHOT  -DartifactId=testapp

That’s it then wish you happy coding in the newly generated project.

One thought on “Create maven archetype project

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s