How to package and rely on a war package in a MAVEN project

Source: Internet
Author: User

A dependency reference between two Web projects. The Web project is referenced by the way the war package is used. For example, there are two projects, Puzzle-web and Puzzle-web-demo, and two are Web projects, and Puzzle-web-demo depends on Puzzle-web, which is configured as follows.

(1) Puzzle-web Configuration of package in Project Pom.xml

A, compile the plug-in version to use 2.4, otherwise, you can appear in the war package, with the date of the jar package.

B, the archiveclasses item is configured to False, which is used to control whether Puzzle-web-demo references the Project War package automatically classes the following file into a jar package for use. Fasle is used here, that is, it is not packaged automatically, because packaging will package the configuration file together so that there will be problems when the project starts.

C, the attachclasses item is configured to True, when the control is packaged, whether to hit a jar package on the Puzzle-web-demo, the project is compiled for debugging.

(2) Puzzle-web package on the on-the-go

There are two packages, a war packet, and a jar package on the.

(3) Related configuration of Puzzle-web-demo Project Pom.xml Reference

A reference is made to a war package and a jar package, where the jar package is used primarily for compile-time, scoped to provided

How to package and rely on a war package in a MAVEN project

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.