The role of Maven install and how MAVEN maintains dependencies between projects

Source: Internet
Author: User

1, when the MAVEN project code changes, whether it is necessary to install the project and put on the jetty plug-in to run the Jetty:run before the need to install it?

For:don't need2, then, when should the install command be executed? A: When the project is dependent on other projects, modification of the project code must be install to allow other projects to rely on the latest project. If there is a project common, when the common code changes, you must execute the install, other projects that rely on it, such as settle, to rely on the latest common, dependent on the common is the latest code. Why? Because executing the install will recompile the project and generate a jar package with the latest code in the local MAVEN repository, such as the install Common project, MAVEN will base the configuration in the Pom.xml <groupId>com.abc</groupId> <artifactId>common</artifactId> <version>1.0.1-SNAPSHOT</version> <packaging>jar</packaging>The project is compiled and packaged in thelocal Warehouse root directory/com/abc/common/1.0.1-snapshot/common-1.0.1-snapshot.jar“。 While Maven maintains the dependency of the project, it is dependent on the jar file, rather than performing dependent projects such as settle relies on common-1.0.1-snapshot.jar rather than directly relying on common engineering.



From for notes (Wiz)



The role of Maven install and how MAVEN maintains dependencies between projects

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.