Create maven multi module project

Create maven multi module project

Simple way

1. Create parent project to your favour workspace directory.

mvn archetype:generate 

2. Enter the details like groupId, artifactId, version and etc

3. CD to your parent project directory

4. Create modular project, such as persistent and web project.

mvn archetype:generate 

5. Repeat step 2 enter the groupId, artifactId , version and etc.


Alternative way

1. Create parent project in your favor directory with maven command.

mvn archetype:generate

2. From the terminal, search for the keywords “pom-root” and refer back the number.

3. The number will be change for the time being. In my case, the number is 828, so enter 828 and press enter

4. Enter your groupId, artifactId, version and hit enter.

5. CD to your parent project you’ve had just created.

6. To create a module project, you have list of options to choose such as basic setup spring data + hibernate + mysql. and etc

7. For my case I’m searching for maven-archetype-quickstart, number 589.

8. After fill up all the groupId, artifactId, version import the project to your favor IDE.


Write a Reply or Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.