Java-maven (eight): Various methods for configuring Remote central warehouses

Source: Internet
Author: User

I. Configuration of remote warehouses

In peacetime development, we often do not use the default central warehouse, the default central warehouse access is slow, the number of people who visit may not be able to meet the needs of our projects, some of the projects need some of the components of the central repository is not, and in other remote warehouses, such as JBoss Maven warehouse. At this point, you can configure the warehouse in Pom.xml, with the following code:

<!--configuring remote warehouses-    <repositories>        <repository>            <id>jboss</id>            < Name>jboss repository</name>            <url>http://repository.jboss.com/maven2/</url>            < releases>                <enabled>true</enabled>                <updatePolicy>daily</updatePolicy>            </releases>            <snapshots>                <enabled>false</enabled>                <checksumPolicy> warn</checksumpolicy>            </snapshots>            <layout>default</layout>        </ Repository>    </repositories>

repository: under the Repositorys element, you can declare one or more remote warehouses using the repository child element.

ID: The unique ID of the warehouse Declaration, especially note that the central warehouse used by MAVEN has the same ID, and if the other warehouse declaration uses that ID, it overrides the configuration of the Central warehouse.

Name: Warehouse names, let us intuitive and convenient to know which warehouse is, temporarily did not find other too big meaning.

URL: Point to the address of the warehouse, in general, the address is based on the HTP protocol, MAVEN users can open the browser in the warehouse address browse build.

Releases and

Java-maven (eight): Various methods for configuring Remote central warehouses

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.