Use eclipse to create a multi-module maven Project

Source: Internet
Author: User

Next I will explain how to use eclipse to create a multi-module maven project first to go to the eclipse workspace. my workspace directory here is G: \ Unionpay \ mavendemo1 and the total POMG is created: \ Unionpay \ mavendemo> mvn archetype: create-DgroupId = com. emailsys-DartifactId = platform: Create a maven project and modify the pom of the project. in the xml file, change the package type to pom <packaging> pom </packaging> and delete the src directory. 2. Create a sub-module under the directory of the main module (that is, under the platform directory just created ), create sub-module 1, such as emailsys: G: \ Unionpay \ mavendemo \ platform> mvn archetype: create-DgroupId = com. emailsys-Darti FactId = emailsys and then set pom. change the package type in xml to pom <packaging> war </packaging>. Note: This is a web project, therefore, when packaging, the war type is under the directory of the general module (that is, under the platform directory just created) and sub-module 2 is created, such as tablemodel: G: \ Unionpay \ mavendemo \ platform> mvn archetype: create-DgroupId = com. emailsys-DartifactId = tablemodel and then set pom. change the package type in xml to pom <packaging> jar </packaging>. Note: because this is a shared model, it is packaged into a jar package, other sub-web modules can use this public package. 3. In the root directory of the platform project, mvn eclipse: eclipse 4. import data through the eclipse import project. You can find two projects. Note: When installing the web Project, inside the structure must be maven web structure, that is to have webapp directory, WEB-INF directory, web. xml file. Otherwise, an error occurs during install!

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.