maven,使用

  1.  官网下载maven
    http://maven.apache.org/download.cgi
  2. 解压放到,一个指定目录 
  3.  配置环境变量:
    MAVEN_HOME  --  解压后的dir
    path  --  %MAVEN_HOME%\bin
  4. 修改,maven\conf\setting.xml
    *** 增加自定义的本地仓库:
    <localRepository>D:\apache-maven-3.6.1\myRepository</localRepository>
     *** 配置阿里云仓库
    <!-- 阿里云仓库 -->
        <mirror>
            <id>alimaven</id>
            <mirrorOf>central</mirrorOf>
            <name>aliyun maven</name>
            <url>http://maven.aliyun.com/nexus/content/repositories/central/</url>
        </mirror>
     
     
        <!-- 中央仓库1 -->
        <mirror>
            <id>repo1</id>
            <mirrorOf>central</mirrorOf>
            <name>Human Readable Name for this Mirror.</name>
            <url>http://repo1.maven.org/maven2/</url>
        </mirror>
     
     
        <!-- 中央仓库2 -->
        <mirror>
            <id>repo2</id>
            <mirrorOf>central</mirrorOf>
            <name>Human Readable Name for this Mirror.</name>
            <url>http://repo2.maven.org/maven2/</url>
        </mirror>
  5. idea配置:
    *** 路径:file  --  setting  --  maven
    *** 配置:
    --- Maven home directory: 【D:/apache-maven-3.6.1】your maven dir
    --- User settings file:
        D:\apache-maven-3.6.1\conf\settings.xml  【your maven dir \conf\setting.xml】Override【打钩】
    *** aplay -- ok
posted @ 2020-01-14 10:41  FocusTa  阅读(133)  评论(0编辑  收藏  举报