An Open Source Organization!

Add Maven Archetype

1. Introduction

In short, Archetype is a Maven project templating toolkit. An archetype is defined as an original pattern or model from which all other things of the same kind are made. The name fits as we are trying to provide a system that provides a consistent means of generating Maven projects. Archetype will help authors create Maven project templates for users, and provides users with the means to generate parameterized versions of those project templates.

2. Add a maven archetype

We provide 2 maven archetypes

2.1 Add a maven archetype on eclipse

Let’s say you want to add maven-simple-archetype version 1.0.2 to Eclipse
Step 1. Open eclipse, click File -> New -> Others. Select Maven project and click next and next to Select and Archetype step, If don’t know how to create a maven project, please read this guilde
Step 2. After step 1, we will get a popup:
https://tvd12.com/wp-content/uploads/add-archetypes-1.png
Click to Add Archetype button, and we get:
https://tvd12.com/wp-content/uploads/add-archetypes-2.png
Fill information follow:

Group Id: com.tvd12
Artifact Id: maven-simple-archetype
Version: 1.0.2
URL: Empty

https://tvd12.com/wp-content/uploads/add-archetypes-3.png
Click OK and we get:
https://tvd12.com/wp-content/uploads/add-archetypes-4.png
Ok, done, you can use maven-simple-archetype to create maven project in eclipse from now

2.2 Add a maven archetype on Intellij

Step 1. Like Eclipse, we open Intellij, click File->New->Project, get the popup and select maven on left side (take a look if you want to know more about maven project creation on Intellij)
https://tvd12.com/wp-content/uploads/add-archetypes-5.png
Step 2. Tick to Create from archetype and click Add Archetype button, we get:
https://tvd12.com/wp-content/uploads/add-archetypes-6.png
Fill information follow:

Group Id: com.tvd12
Artifact Id: maven-simple-archetype
Version: 1.0.2
URL: Empty

https://tvd12.com/wp-content/uploads/add-archetypes-7.png
Click OK and we get:
https://tvd12.com/wp-content/uploads/add-archetypes-8.png
Ok, done, you can use maven-simple-archetype to create maven project in Intellij from now

3. Conclusion

Maven Archetype help you pack all in one template and help you save a lot of time to setup maven project, and we also provide 2 maven archetypes

Share: