Build a multi-module Maven project and a maven Project

Source: Internet
Author: User

Build a multi-module Maven project and a maven Project

Create a maven project under Eclipse, which consists of multiple modules.

1. Create a Parent Project

File-> New-> Project-> Maven Project (figure 1)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Next, open Figure 2

 

 

 

 

 

 

 

 

 

 

Click next To Go To The Select an Archetype interface.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Select site-simple and next to go to the interface for entering the project Group Id and Artifact Id

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Click Finish to generate a project named test1.

Delete the src folder in the test1 Project

2. Create a service sub-project

The purpose of the service subitem is to provide the jar package for the web project, the Basic Package module layer and service layer

Right-click the test1 project name-> New-> Maven Module, and click next

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Enter Module Name as test1-service, next

To Select an Archetype Interface

Enter Module Name as test1-web, next

<Dependency> <groupId> com. koala. test </groupId> <artifactId> test1-service </artifactId> <version> 0.0.1-SNAPSHOT </version> <scope> jar </scope> </dependency>

Content source, pom. xml file for the test1-service Project

Now that the Maven multi-module project is created, you only need to add the corresponding configuration file, package, code, and page.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.