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

Provisioning Cloud SQL with Private Service Connect Using Terraform & Accessing from Cloud Run with Spring Boot

In this post, we'll explore how to provision Cloud SQL instances with Private Service Connect (PSC) connectivity using Terraform and the...