• 阿里云Maven配置,Maven仓库配置,Maven镜像配置


    阿里云Maven配置,Maven仓库配置,Maven镜像配置

    ========================

    蕃薯耀 2018年1月29日

    http://www.cnblogs.com/fanshuyao/

    一、setting.xml文件配置镜像

    找到mirrors镜像节点,增加mirror节点,如下所示:

    Xml代码  收藏代码
    1. <mirrors>  
    2.     <!-- mirror  
    3.      | Specifies a repository mirror site to use instead of a given repository. The repository that  
    4.      | this mirror serves has an ID that matches the mirrorOf element of this mirror. IDs are used  
    5.      | for inheritance and direct lookup purposes, and must be unique across the set of mirrors.  
    6.      |  
    7.     <mirror>  
    8.       <id>mirrorId</id>  
    9.       <mirrorOf>repositoryId</mirrorOf>  
    10.       <name>Human Readable Name for this Mirror.</name>  
    11.       <url>http://my.repository.com/repo/path</url>  
    12.     </mirror>  
    13.      -->  
    14.      <mirror>  
    15.       <id>alimaven</id>  
    16.       <mirrorOf>central</mirrorOf>  
    17.       <name>aliyun maven</name>  
    18.       <url>http://maven.aliyun.com/nexus/content/groups/public/</url>  
    19.     </mirror>  
    20.   </mirrors>  

    二、本地Jar包仓库配置

    在setting.xml文件中找点localRepository节点,具体配置如下:

    路径自己定义

    Xml代码  收藏代码
    1. <!-- localRepository  
    2.  | The path to the local repository maven will use to store artifacts.  
    3.  |  
    4.  | Default: ${user.home}/.m2/repository  
    5. <localRepository>/path/to/local/repo</localRepository>  
    6. -->  
    7. <localRepository>D:soft epository</localRepository>  

    三、pom.xml文件仓库配置

    Xml代码  收藏代码
    1. <repositories>    
    2.         <repository>    
    3.             <id>alimaven</id>    
    4.             <name>aliyun maven</name>    
    5.             <url>http://maven.aliyun.com/nexus/content/groups/public/</url>    
    6.         </repository>  
    7.     </repositories>  

    ========================

    蕃薯耀 2018年1月29日

    http://www.cnblogs.com/fanshuyao/

  • 相关阅读:
    广播的最佳实践---实现强制下线功能
    广播的最佳实践---实现强制下线功能
    使用本地广播
    使用本地广播
    关于Win7固态优盘的优化方法
    关于Win7固态优盘的优化方法
    在屏幕中使用评分组件
    在屏幕中使用评分组件
    【NYOJ】[65]另一种阶乘问题
    【NYOJ】[65]另一种阶乘问题
  • 原文地址:https://www.cnblogs.com/fanshuyao/p/8376106.html
Copyright © 2020-2023  润新知