Packaging and dependency of War packages in Maven projects, mavenwar

Source: Internet
Author: User

Packaging and dependency of War packages in Maven projects, mavenwar

Dependency references between two web projects. Web projects are referenced through war packages. For example, there are two projects, puzzle-web and puzzle-web-demo, both of which are web projects. puzzle-web-demo depends on puzzle-web. The specific configuration is as follows.

 

(1) configuration of packaging in pom. xml of puzzle-web project

 

A. Compile the plug-in version 2.4. Otherwise, A jar package with A date will appear in the war package.

B. Set archiveClasses to false. This configuration is used to control whether to automatically compress the files under classes into jar packages when puzzle-web-demo references the war package of the project. Fasle is used here, that is, it is not automatically packaged because the configuration file will be packaged together, so there will be problems when the project starts.

C. Set the attachClasses item to true to control whether to package a jar package to a private server. The puzzle-web-demo project is used for debugging and compilation.

 

(2) puzzle-web packaging on private servers

 

The private server has two packages, one war package and one jar package.

 

(3) configuration of reference to pom. xml in puzzle-web-demo project

 

The war package and jar package are referenced respectively. The jar package is mainly used for compilation, and its scope is provided.

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.