[Go] using MAVEN image

Source: Internet
Author: User

Review

The most depressing thing about doing projects with Maven is that some dependent libraries can't be downloaded. It's a wall, you know. The use of MAVEN image warehouse and its importance, especially the domestic mirror, can effectively alleviate the wall pain.

Common mirror foreign mirrors

ibiblio.org

<mirror>       <id>ibiblio</id>       <mirrorOf>central</mirrorOf>       <name>ibiblio Mirror of http://repo1.maven.org/maven2/</name>       <url>http://mirrors.ibiblio.org/pub/mirrors/maven2/</url>  </mirror>  

Jboss

<mirror>       <id>jboss-public-repository-group</id>       <mirrorOf>central</mirrorOf>       <name>JBoss Public Repository Group</name>       <url>http://repository.jboss.org/nexus/content/groups/public</url>  </mirror>

Repo2

<mirror>  <id>repo2</id>  <mirrorOf>central</mirrorOf>  <name>Human Readable Name for this Mirror.</name>  <url>http://repo2.maven.org/maven2/</url></mirror>

uk.maven.org

<mirror>  <id>ui</id>  <mirrorOf>central</mirrorOf>  <name>Human Readable Name for this Mirror.</name> <url>http://uk.maven.org/maven2/</url></mirror>
Domestic mirror

Oschina.net

<mirror>    <id>nexus-osc</id>    <mirrorOf>*</mirrorOf>    <name>Nexus osc</name>    <url>http://maven.oschina.net/content/groups/public/</url></mirror>

net.cn

<mirror>    <id>net-cn</id>    <mirrorOf>central</mirrorOf>    <name>Human Readable Name for this Mirror.</name>    <url>http://maven.net.cn/content/groups/public/</url>    </mirror>
Using mirroring

The following is an example of a oschina.net image.

1.Maven the installation directory under the Conf file has a settings.xml file, edit the file

2. Insert in <mirrors>:

<mirror>    <id>nexus-osc</id>    <mirrorOf>*</mirrorOf>    <name>Nexus osc</name>    <url>http://maven.oschina.net/content/groups/public/</url></mirror>

3. Here is the MAVEN image address that configures MAVEN's mirror address to Oschina. MAVEN also needs to install some plug-in packages when executing the MAVEN command, which also points to the Maven address of oschina.net. Insert in <profiles>:

<profile> <id>jdk-1.4</id> <activation> <jdk>1.4</jdk> </activation> <repositories> <repository> <id>nexus</id> <name>local priv Ate nexus</name> <url>http://maven.oschina.net/content/groups/public/</url> <re                leases> <enabled>true</enabled> </releases> <snapshots> <enabled>false</enabled> </snapshots> </repository> </reposit ories> <pluginRepositories> <pluginRepository> <id>nexus</id> & Lt;name>local Private nexus</name> <url>http://maven.oschina.net/content/groups/public/</url&            Gt <releases> <enabled>true</enabled> </releases> <snapshots&      Gt          <enabled>false</enabled> </snapshots> </pluginRepository> </plug Inrepositories></profile>

ps:http://www.waylau.com/use-maven-mirrors/
http://search.maven.org/#browse

[Go] using MAVEN image

Related Article

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.