maven配置阿里云仓库完整版

阿里云仓库完成版

好多博客仅仅是配置一个mirror,但是不一定起作用,还需要配置profiles节点,完整版如下:






<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>/Users/tony/Documents/Apache/maven_repositorylocalRepository>

  

  

  
  <pluginGroups>
    
  pluginGroups>

  
  <proxies>
    
  proxies>

  
  <servers>
    

    
  servers>

  
  <mirrors>
    
     <mirror>
            <id>nexus-aliyunid>
            <mirrorOf>centralmirrorOf>
            <name>Nexus aliyunname>
            <url>http://maven.aliyun.com/nexus/content/groups/public/url>
    mirror>

  mirrors>

  
  <profiles>
    

    


<profile>
            <id>jdk-1.8id>
            <activation>
                <jdk>1.8jdk>
            activation>
            <repositories>
                <repository>
                    <id>nexusid>
                    <name>local private nexusname>
                    <url>http://maven.aliyun.com/nexus/content/groups/public/url>
                    <releases>
                        <enabled>trueenabled>
                    releases>
                    <snapshots>
                        <enabled>falseenabled>
                    snapshots>
                repository>
            repositories>
            <pluginRepositories>
                <pluginRepository>
                    <id>nexusid>
                    <name>local private nexusname>
                    <url>http://maven.aliyun.com/nexus/content/groups/public/url>
                    <releases>
                        <enabled>trueenabled>
                    releases>
                    <snapshots>
                        <enabled>falseenabled>
                    snapshots>
                pluginRepository>
            pluginRepositories>
        profile>


  profiles>

  
settings>

你可能感兴趣的:(maven,maven,阿里云,maven仓库,完整版)