maven安装配置

下载

wget https://dlcdn.apache.org/maven/maven-3/3.8.4/binaries/apache-maven-3.8.4-bin.tar.gz

官网下载.png

#解压到 /usr/local
tar -zxvf maven_xxxx.tar.gz -C /usr/local
#修改配置
mv /usr/local/maven-xxx maven
mkdir ck
cd conf
vim setting.xml
#找到·localRepository下面复制一行加上/usr/local/apache-maven-3.6.3/ck
/usr/local/apache-maven-3.6.3/ck
#找到mirror 加上阿里的仓库配置

      alimaven
      aliyun maven
       http://maven.aliyun.com/nexus/content/groups/public/
      central

#配置环境变量
export MAVEN_HOME=/usr/local/maven
export PATH=$PATH:$MAVEN_HOME/bin
#验证安装是否成功
mvn -v
安装成功示例.png

你可能感兴趣的:(maven安装配置)