zoukankan      html  css  js  c++  java
  • linux环境下安装maven-3.6.3

    1. 下载安装包

    wget https://mirrors.tuna.tsinghua.edu.cn/apache/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz

    2 解压安装包


    tar -xzvf apache-maven-3.6.3-bin.tar.gz
    mv apache-maven-3.6.3 /opt/myprogram/

    3 在maven配置文件中添加阿里云镜像

    vi /opt/myprogram/apache-maven-3.6.3/conf/settings.xml

    在标签<mirrors>里添加内容:

    <mirrors>
        <!-- mirror
         | Specifies a repository mirror site to use instead of a given repository. The repository that
         | this mirror serves has an ID that matches the mirrorOf element of this mirror. IDs are used
         | for inheritance and direct lookup purposes, and must be unique across the set of mirrors.
         |
         -->
         <mirror> 
           <id>aliyun-maven</id>
           <mirrorOf>*</mirrorOf>
           <name>aliyun maven</name>
           <url>http://maven.aliyun.com/nexus/content/groups/public</url>
        </mirror>
      </mirrors>

    4 配置maven环境变量

    vi  /etc/profile

    添加以下内容

    export M2_HOME=/opt/myprogram/apache-maven-3.6.3
    export PATH=$PATH:$M2_HOME/bin

     使配置生效

    source /etc/profile
  • 相关阅读:
    洛谷 P3391文艺平衡树 【fhq_treap】
    食物链(转自yekehe2002大神)
    TX
    黑匣子——KEY
    Splay初学习
    BZOJ2330_糖果_KEY
    BZOJ3224_普通平衡树_KEY
    BZOJ2730_矿场搭建_KEY
    BZOJ1452_Count_KEY
    初识主席树_Prefix XOR
  • 原文地址:https://www.cnblogs.com/datangguott/p/14211357.html
Copyright © 2011-2022 走看看