zoukankan      html  css  js  c++  java
  • 使用阿里云的maven私服的setting.xml, 提高maven项目jar下载速度

    下载:

     http://files.cnblogs.com/files/007sx/settings.zip

    然后替换自己原本maven的配置文件。

    如下载失败,可内容替换:

    <?xml version="1.0" encoding="UTF-8"?>
    <settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
      
        <!--
            <localRepository>~/.m2</localRepository>
        -->
    
        <pluginGroups>
           
        </pluginGroups>
    
         <proxies>
            
        </proxies>
    
        <servers>
          
        </servers>
        <!--
            <mirrorOf>central</mirrorOf> 这里最好不要写成*号,否则你项目中的pom中配置repository不生效
        -->
        <mirrors>
            <mirror>
                <id>nexus-aliyun</id>
                <mirrorOf>central</mirrorOf>
                <name>Nexus Aliyun</name>
                <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
            </mirror>
        </mirrors>
    
        <profiles>
            <profile>
                <repositories>
                    <repository>
                        <id>nexus</id>
                        <name>local private nexus</name>
                        <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
                        <releases>
                            <enabled>true</enabled>
                        </releases>
                        <snapshots>
                            <enabled>false</enabled>
                        </snapshots>
                    </repository>
                </repositories>
                <pluginRepositories>
                    <pluginRepository>
                        <id>nexus</id>
                        <name>local private nexus</name>
                        <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
                        <releases>
                            <enabled>true</enabled>
                        </releases>
                        <snapshots>
                            <enabled>false</enabled>
                        </snapshots>
                    </pluginRepository>
                </pluginRepositories>
            </profile>
        </profiles>
    </settings>

    注意:

    这是阿里云的maven私服的setting.xml文件,MirroOf配置不是*号,是central,这样在项目pom中配置repository依然生效

  • 相关阅读:
    CentOS上svn checkout时报错SSL handshake failed: SSL error: Key usage violation in certificate has been det
    SnmpTools配置
    Django下载文件
    Cacti的使用
    RRDtool 安装和使用
    SNMP 安装及使用
    Openstack CentOS6.5 ALL IN ONE 安装
    mysqladmin -u root password
    VS2013打包程序步骤
    python中使用rabbitmq消息中间件
  • 原文地址:https://www.cnblogs.com/007sx/p/7145602.html
Copyright © 2011-2022 走看看