首页 > 系统 > Ubuntu > 正文

Ubuntu安装mvn3.3.9

2024-06-28 16:01:25
字体:
来源:转载
供稿:网友

首先安装java1.8 这个gaoding 其次下载mvn

http://maven.apache.org/

解压缩

tar -vxzf apache-maven-3.3.9-bin.tar.gz -C /usr/local/

设置环境变量

export MVN_HOME=/usr/local/apache-maven-3.3.9export PATH=${MVN_HOME}/bin:$PATHsource /etc/PRofile

查看结果

root@Ubuntu:/usr/local/java/jdk1.8.0_121# mvn -vApache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-11T00:41:47+08:00)Maven home: /usr/local/apache-maven-3.3.9Java version: 1.8.0_121, vendor: Oracle CorporationJava home: /usr/local/java/jdk1.8.0_121/jreDefault locale: en_US, platform encoding: UTF-8OS name: "linux", version: "3.13.0-108-generic", arch: "amd64", family: "unix"

设置本地仓储库

vim /usr/local/apache-maven-3.3.9/conf/settings.xml <profile> <id>profile-nexus</id> <repositories> <repository> <id>nexus</id> <url>http://10.142.164.239/nexus/content/groups/public/</url> <snapshots><enabled>true</enabled></snapshots> <releases><enabled>true</enabled></releases> </repository> </repositories> <pluginRepositories> <pluginRepository> <id>nexus</id> <url>http://10.142.164.239/nexus/content/groups/public/</url> <snapshots><enabled>true</enabled></snapshots> <releases><enabled>true</enabled></releases> </pluginRepository> </pluginRepositories> </profile> </profiles>
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表