zoukankan      html  css  js  c++  java
  • 阿里云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/

  • 相关阅读:
    JAVA 基本数据类型长度
    字符编码详解
    几种编码方式
    Java1.5泛型指南中文版(Java1.5 Generic Tutorial)
    java泛型小问题
    java中的equals()方法
    Java泛型中E、T、K、V等的含义
    数据库的基本操作
    Mysql数据类型简介(大概了解)
    [BZOJ 2007] 海拔
  • 原文地址:https://www.cnblogs.com/fanshuyao/p/8376106.html
Copyright © 2011-2022 走看看