Eclipse maven creates the total Pom project

Source: Internet
Author: User

First into Eclipse's workspace, my workspace directory here is D:\workspace

1, create the total pom

D:\WORKSPACE>MVN Archetype:create-dgroupid=com.scall-dartifactid=scall Create a MAVEN project, Then modify the project's Pom.xml file, change the package type to pom <packaging>pom</packaging> and delete the SRC directory

2. Creating sub-modules

Create Submodule 1, under the Total module directory (that is, the platform directory you just created), create Submodule 1, such as SCALL-WEB-HOME:D:\WORKSPACE\SCALL>MVN archetype:create-dgroupid =com.scall-dartifactid=scall-web-home then change the package type inside the Pom.xml to pom<packaging>war</packaging> Note: Because this is a Web project, it is a war type when packaged

In the total module directory (that is, the Scall directory you just created),

Create sub-module 2, such as SCALL-UTIL:D:\WORKSPACE\SCALL>MVN Archetype:create-dgroupid=com.scall-dartifactid=scall-util Then change the package type inside the pom.xml to pom<packaging>jar</packaging> Note: Because this is a common model, it is packaged into a jar package, and the other sub-web modules can use the common package.

3. Under the Scall project root directory

MVN Eclipse:eclipse

4. Problem-handling

Install M2eclipse in Eclipse import a maven project in Eclipse Import note that eclipse will report a mistake when importing >

An internal error occurred during: "Updating Maven Project". > Unsupported Iclasspathentry kind=4

This can be resolved in the following ways:

Click on the selected item to select Maven---Remove maven Nature.

CMD switch to your project with directory execution "MVN Eclipse:clean"

Click on the selected item and select "Configure. Convert into Maven project"

Category: Java

Eclipse maven creates the total Pom project

Related Article

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.