Home‎ > ‎Maven‎ > ‎

Archetype Creation

Creating a template for for creating a new project from archetype template. 


Deploy to SonaType Nexus 

  1. Create a maven project with pom.xml
  2. Remove IDE and system files from project otherwise they will get copied
  3. Run 'mvn archetype:create-from-project' to create the archetype
  4. Install the project 'mvn install' for using locally
  5. Check for package import and project refactor conflicts with in archetype template which is located in ./target/generated-sources/archetype/
  6. For deploying goto ./target/generated-sources/archetype/pom.xml
    1. Add <distributionManagement> with the repository deployment server paths to the nexus server.
    2. Be sure your nexus server credentials exist in ~/.m2/settings.xml
  7. run 'mvn deploy' to push the archetype template to the nexus server.
  8. For exact instructions, see the Deployment Shell Script


  1. Archetype deployment controls are put in ./target/generated-sources/archetype/pom.xml
  2. The archetype template is located at ./target/generated-sources/archetype/src/main/resources/archetype-resources


At the end of the day something like this can be used to deploy your new archetype template. 
mvn archetype:generate -DarchetypeGroupId=com.arcbees \
-DarchetypeArtifactId=gwtp-basic-appengine-archetype \
-DarchetypeVersion=0.1-SNAPSHOT \
-DgroupId=com.projectname \
-DartifactId=new-project-name \

Thanks To

The gadget spec URL could not be found