Skip to content

Instantly share code, notes, and snippets.

@softmentor
Last active December 27, 2015 20:39
Show Gist options
  • Save softmentor/7385627 to your computer and use it in GitHub Desktop.
Save softmentor/7385627 to your computer and use it in GitHub Desktop.
mvn create archetype from existing project
# Reference: The maven documentation for archetype is not comprehensive and has issues. Please refer the below link for better reference.
# https://community.jboss.org/wiki/MavenArchetypeCreationGuidelines
cd <example mvn project which needs to be archetyped>
mvn clean archetype:create-from-project -Dinteractive=true
#This would create the archetype in target folder.
# To generate a sample project from the archetype created locally.
mvn archetype:generate -DarchetypeCatalog=local -DgroupId=com.softmentor.examples -DartifactId=example-thrift -DarchetypeArtifactId=maven-archetype-apache-thrift
# Another example, to generate from archetype:
mvn archetype:generate -DarchetypeGroupId=com.softmentor.examples -DarchetypeArtifactId=example-thrift-archetype -DarchetypeVersion=1.0.0-SNAPSHOT -DgroupId=com.testgrp -DartifactId=testthrift -Dversion=1.0.0-SNAPSHOT -DinteractiveMode=false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment