Maven

DevOps Maven评论1,213字数 791阅读2分38秒阅读模式
  • https://maven.apache.org/

Maven

安装

[centos@ip-10-0-3-215 ~]$ wget https://dlcdn.apache.org/maven/maven-3/3.8.6/binaries/apache-maven-3.8.6-bin.tar.gz --no-check-certificate
[centos@ip-10-0-3-215 ~]$  tar -zxvf apache-maven-3.8.6-bin.tar.gz
[centos@ip-10-0-3-215 ~]$ sudo mv apache-maven-3.8.6 /usr/local/

添加环境变量

[centos@ip-10-0-3-215 ~]$ sudo vim /etc/profile
# set maven environment
M2_HOME=/usr/local/apache-maven-3.8.6
PATH=$PATH:$M2_HOME/bin
export PATH M2_HOME
[centos@ip-10-0-3-215 ~]$ source /etc/profile

验证

[centos@ip-10-0-3-215 ~]$ mvn -v
Apache Maven 3.8.6 (84538c9988a25aec085021c365c560670ad80f63)
Maven home: /usr/local/apache-maven-3.8.6
Java version: 13.0.1, vendor: Oracle Corporation, runtime: /data/app/jdk-13.0.1
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.10.0-1160.41.1.el7.x86_64", arch: "amd64", family: "unix"

DevOps
  • 本文由 发表于 2022年8月2日 18:35:27
  • 除非特殊声明,本站文章均为原创,转载请务必保留本文链接
  • Maven
评论  0  访客  0

发表评论