Benefits of using Maven

Source: Internet
Author: User

1, the classification of MAVEN warehouse

    • Local Warehouse: When Maven performs a compilation or test, if it needs to use a dependent file, it always uses the local repository's dependent files based on coordinates . By default, regardless of Linux or Windows, each user has a repository directory with a path named . m2/respository/ in their user directory.
    • Remote warehouses: After MAVEN is installed, the local repository directory does not exist if you do not perform any MAVEN commands. When the user enters the first MAVEN command, MAVEN creates the local repository, and then downloads the dependent build to the local repository from the remote repository as configured and required.
    • Central Warehouse: Because the most original local warehouse is empty,maven must know at least one of the available remote warehouses to download the required build when the MAVEN command is executed. The central repository is a default remote repository , and the MAVEN installation file defaults to the configuration of the central repository.
    • Server is a special remote warehouse, which is a warehouse service set up in the LAN. Remote repositories on a wide area network for use by MAVEN users within the LAN. When Maven needs to download the build, it requests it from the server, and if it does not, it is downloaded from an external remote repository, then cached on the database and served as a maven download request.
2. Benefits of using a
    • Save your own external network bandwidth

It can reduce the organization's own expenses, a large number of repeated requests for external remote warehouses will consume a large amount of bandwidth, after the use of the agent external warehouse, external duplicate component download is eliminated, that is, reduce the external network bandwidth pressure.

    • Accelerate the build of Maven


It is certainly time-consuming to request an external repository, but some of MAVEN's internal mechanisms, such as snapshot detection, require Maven to constantly check the data of the remote repository as it executes the build. As a result, when many remote repositories are configured, the speed of the build is greatly reduced. This problem can be well solved by using a.

    • Deploy third-party artifacts

What if a widget cannot be downloaded from an external remote repository?

Such examples are many, such as the creation of private components within the organization is certainly not available from the external warehouse, Oracle's JDBC driver for copyright reasons can not be published to the external network of the Central warehouse.

These artifacts can then be deployed to an in-house MAVEN project for use by the internal projects.

    • Improved stability, enhanced control

MAVEN builds rely on remote repositories, so when the internet is unstable, MAVEN builds can become unstable and even impossible to build.
Even if you do not have an Internet connection, MAVEN will work properly after using the private, because a large number of artifacts are cached in the.

In addition, some of the software (such as the Nexus) also provides a lot of additional features, such as Rights Management, Release/snapshot, etc., the administrator can carry out some more advanced control of the warehouse.

    • Reduce the load on the central warehouse

Millions of of requests, storing data of T, need considerable financial resources. Many duplicate requests to the central warehouse can be avoided by using the.

Benefits of using Maven

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.