MAVEN (vii) warehouse

Source: Internet
Author: User

Warehouses are divided into local warehouses and remote warehouses. In a MAVEN-developed project, this project does not introduce a third-party jar package, it is used when using the pom dependency mechanism, from the local warehouse or remote warehouse to obtain a third-party jar package, and then save to the local warehouse. This allows the local repository to be developed offline as long as the jar package is needed. Maven automatically packs the required jar packages into the project for project use when the package is released.

1. Local Warehouse

Add <localRepository>E:\test-maven\repo</localRepository> in Settings.xml

The local warehouse modifies the contents of the localrepository tag directly, and the component must be available to other projects through the process of installing to the local warehouse. With the MAVEN command Claean install, the project component is automatically packaged into the local repository and can then be used as a third-party component.

2. Central Warehouse

If you want to modify the central warehouse, directly modify the MAVEN source XML file, or directly in the settings.xml file to write a

The URL inside is the warehouse domain name address. Snapshots is a snapshot version. This configuration can specify that the location is the URL of the private LAN server.

3. Remote Warehouse

In fact, remote warehouses and central warehouse functions almost, central warehouse is to add most of the resources, and remote warehouse is a personal or company development projects, we just down to the local warehouse. Example: JBoss maven Warehouse

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.