Maven 3.3.3手动安装Ubuntu 14.04

时间:2015-11-06 19:42:46

标签: maven maven-3 ubuntu-14.04

我正在尝试手动安装Maven 3.3.3。我从Apache Maven网站下载了maven-3.3.3.tar.gz文件,并在/usr/local/apache-maven-3.3.3中提取了该文件。我尝试使用PATHMAVEN_HOME系统属性设置M2_HOME,但我无法安装Maven。

我也尝试了sudo apt-get installapt-get cache

1 个答案:

答案 0 :(得分:1)

我不确定你提取了什么,但无法安装,因为这几乎就是它的所有内容。

以下是我的工作:

shackle@shackle-desktop:~$ cd /usr/local/
shackle@shackle-desktop:/usr/local$ sudo tar -xzf ~/Downloads/apache-maven-3.3.3-bin.tar.gz 
shackle@shackle-desktop:/usr/local$ export PATH=/usr/local/apache-maven-3.3.3/bin/:$PATH
shackle@shackle-desktop:/usr/local$ export MAVEN_HOME=/usr/local/apache-maven-3.3.3/
shackle@shackle-desktop:/usr/local$ mvn -version
Apache Maven 3.3.3 (7994120775791599e205a5524ec3e0dfe41d4a06; 2015-04-22T07:57:37-04:00)
Maven home: /usr/local/apache-maven-3.3.3
Java version: 1.8.0_66, vendor: Oracle Corporation
Java home: /usr/local/jdk1.8.0_66/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.2.0-32-generic", arch: "i386", family: "unix"