MAVEN Warehouse Classification

Source: Internet
Author: User

MAVEN Warehouse Classification

maven Warehouse is divided into: local warehouse + Remote Warehouse two major categories

Remote Warehouse is divided into: Central warehouse + Other public Remote Storage

1, in Maven, any dependency, plug-in, or project-built output can be called a component

2,maven stores the shared artifacts of all projects in a single, unified location, which we call warehouses. (Warehouses are places where dependencies and plugins are stored)

3, any component has a unique coordinate, and MAVEN defines the unique storage path of the component in the warehouse according to this coordinate.

4, Local repository, where Maven is the local storage widget (maven's local repository is not created after Maven is installed, it was created the first time the MAVEN command was executed)

5, when Maven looking for components, first from the local warehouse, if not found in the local warehouse, then to the remote warehouse, if the remote warehouse can not find the error, remote warehouse found on the download to local reuse. So with Maven's ongoing use of download artifacts, its local repositories will grow larger

6, a component can only be used by other MAVEN projects after it is in the local repository

7, Central warehouse is MAVEN's own remote warehouse, default address: Http://repol.maven.org/maven2

8, it is a special remote warehouse which is set up in local or LAN, and it can manage all other external remote warehouses conveniently.

9, the default address for the local warehouse is: ${user:home}/.m2/repository

10, add the remote warehouse in the project, when the central warehouse cannot find the required artifacts, we can configure the Pom.xml file, add other remote warehouses, where the ID must be unique (if not unique, set to Central will overwrite the location of the centralized warehouse)

11, by default, each user has a repository directory named. m2/repository/in their user directory, whether on Windows or Linux. Sometimes, for some reason (such as insufficient disk space, etc.), users will want to customize the local warehouse directory address, then they need to modify the settings.xml configuration file. (after this change, all users will be affected, and if MAVEN is upgraded, all configurations will be erased, so copy and back up the m2_home/conf/settings.xml file in advance , it is generally not recommended to configure the global Settings.xml)

MAVEN Warehouse Classification

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.