首页 > 代码库 > ubuntu 安装 maven3.2
ubuntu 安装 maven3.2
1、下载并解压 apache-maven-3.2.5-bin.tar.gz
tar -xzvf apache-maven-3.2.5-bin.tar.gz
2、设置环境变量
sudo gedit ~/.profile
export M2_HOME=/opt/apache-maven-3.2.5export M2=$M2_HOME/binexport PATH=$M2:$PATH
3、查看maven配置
mvn -version
root@zsh-Aspire-4750:~# mvn -versionApache Maven 3.2.5 (12a6b3acb947671f09b81f49094c53f426d8cea1; 2014-12-15T01:29:23+08:00)Maven home: /opt/apache-maven-3.2.5Java version: 1.8.0_25, vendor: Oracle CorporationJava home: /opt/jvm/jdk1.8.0_25/jreDefault locale: zh_CN, platform encoding: UTF-8OS name: "linux", version: "3.13.0-24-generic", arch: "amd64", family: "unix"root@zsh-Aspire-4750:~#
4、修改settings.xml
修改maven仓库地址 sudo gedit settings.xml
<!-- localRepository | The path to the local repository maven will use to store artifacts. | | Default: ${user.home}/.m2/repository <localRepository>/path/to/local/repo</localRepository> --><localRepository>/opt/maven_jar</localRepository>
ubuntu 安装 maven3.2
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。