码迷,mamicode.com
首页 > 系统相关 > 详细

ubuntu16.04安装 maven3.5.0

时间:2017-08-29 14:23:46      阅读:183      评论:0      收藏:0      [点我收藏+]

标签:too   load   span   tar.gz   download   目录   generic   etc   ...   

1 下载地址

http://maven.apache.org/download.cgi

2 将下载到的apache-maven-3.5.0-bin.tar.gz文件上传到/temp目录下,执行如下命令。

huffie@localhost:/temp# sudo tar zxvf apache-maven-3.5.0-bin.tar.gz
huffie@localhost:/temp# sudo cd /opt root@test:/opt# mv /temp/apache-maven-3.5.0.

3 创建软链接

huffie@localhost:/bin# sudo ln -s /opt/apache-maven-3.5.0/bin/mvn mvn

4 添加环境配置

huffie@localhost:/opt/jdk1.8.0_92# sudo vim ~/.bashrc
......
export M2_HOME=/opt/apache-maven-3.5.0
export PATH=${M2_HOME}/bin:$PATH
......

 保存退出,执行下面命令使配置文件生效

huffie@localhost:/opt/jdk1.8.0_92# source /etc/profile

5 验证安装

技术分享
ccskun@test:~$ mvn -v
Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-11T00:41:47+08:00)
Maven home: /opt/apache-maven-3.3.9
Java version: 1.8.0_92, vendor: Oracle Corporation
Java home: /opt/jdk1.8.0_92/jre
Default locale: zh_CN, platform encoding: UTF-8
OS name: "linux", version: "4.4.0-22-generic", arch: "amd64", family: "unix"
ccskun@test:~$ 
技术分享

 

ubuntu16.04安装 maven3.5.0

标签:too   load   span   tar.gz   download   目录   generic   etc   ...   

原文地址:http://www.cnblogs.com/huffie/p/7447610.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!