zoukankan      html  css  js  c++  java
  • mave常用设置

    如何修改maven本地仓库位置

    1.创建文件夹D:m2 epository

    2.修改E:apache-maven-3.5.4confsetting.xml文件。

    将改成<localRepository></localRepository>中路径修改成希望保存的路径

      <!-- localRepository
       | The path to the local repository maven will use to store artifacts.
       |
       | Default: ${user.home}/.m2/repository
         -->
      <localRepository>D:m2
    epository</localRepository>

      注意:修改路径,要把注释打开

    3.将setting.xml文件复制到m2文件夹里

    如何修改maven本地仓库镜像地址

    打开 Maven 的配置文件(windows机器一般在maven安装目录的conf/settings.xml),在<mirrors></mirrors>标签中添加 mirror 子节点:

    <mirror>
        <id>aliyunmaven</id>
        <mirrorOf>*</mirrorOf>
        <name>阿里云公共仓库</name>
        <url>https://maven.aliyun.com/repository/public</url>
    </mirror>

    如果想使用其它代理仓库,可在<repositories></repositories>节点中加入对应的仓库使用地址。以使用spring代理仓为例:

    <repository>
        <id>spring</id>
        <url>https://maven.aliyun.com/repository/spring</url>
        <releases>
            <enabled>true</enabled>
        </releases>
        <snapshots>
            <enabled>true</enabled>
        </snapshots>
    </repository>
  • 相关阅读:
    微软小娜APP的案例分析
    嵌入式第12次实验
    嵌入式第11次实验
    嵌入式第10次实验报告
    嵌入式第9次实验
    软工 小组作业(第二次)
    嵌入式软件设计第8次实验报告-140201236-沈樟伟
    5月17下
    5月17上
    5月15上午
  • 原文地址:https://www.cnblogs.com/liberty777/p/13645767.html
Copyright © 2011-2022 走看看