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

How to install Maven on Mac OSX

时间:2015-05-24 11:36:32      阅读:666      评论:0      收藏:0      [点我收藏+]

标签:maven

After the upgrade of Mac OS X Mavericks, Maven was removed (no idea why). So, You have to install it manually.
**2.1 – Download Maven**Download the Maven, for example apache-maven-3.1.1-bin.tar.gz
. Extracts it,

tar -xvf apache-maven-3.1.1-bin.tar.gz
$pwd
/Users/mkyong/apache-maven-3.1.1

2.2 – Set Maven command in environment variable.
Update ~/. bash_profile – create this file if doesn’t exist.

$ vim ~/.bash_profile

~/.bash_profile
export M2_HOME=/Users/mkyong/apache-maven-3.1.1
export PATH=$PATH:$M2_HOME/bin

Restart the terminal. Test it.

$mvn -version

Apache Maven 3.1.1 (0728685237757ffbf44136acec0402957f723d9a; 2013-09-17 23:22:22+0800)
Maven home: /Users/mkyong/apache-maven-3.1.1
Java version: 1.7.0_05, vendor: Oracle Corporation
Java home: /Library/Java/JavaVirtualMachines/1.7.0.jdk/Contents/Home/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "10.9", arch: "x86_64", family: "mac"

1.http://www.mkyong.com/maven/install-maven-on-mac-osx/

How to install Maven on Mac OSX

标签:maven

原文地址:http://blog.csdn.net/leochang130731/article/details/45950331

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