Wednesday, April 11, 2018

Create maven archetype from existing project

I share basic example, how to create maven archetype from existing project.

Steps:

Step 1.

-cd your_project

run next command: mvn archetype:create-from-project





































It then generates the directory tree of the archetype in the target/generated-sources/archetype directory.
Step 2. Move directory.

- cd target/generated-sources/archetype/

- And run command mvn install






























Step 3. Move to a fresh directory and use your archetype.

- mkdir /tmp/archetype

- cd /tmp/archetype

- mvn archetype:generate -DarchetypeCatalog=local































References: https://maven.apache.org/archetype/maven-archetype-plugin/advanced-usage.html






No comments:

Post a Comment

Integrating Google Cloud Pub/Sub with Terraform and Spring Boot 3 (Java 21)

Introduction In this blog post, I'll demonstrate how to provision Google Cloud Pub/Sub resources using Terraform and integrate them with...