Mac OS X下安装和配置Maven
程序员文章站
2024-01-17 19:37:58
...
1、下载Maven
打开Maven官网下载页面:http://maven.apache.org/download.cgi
下载:apache-maven-3.5.0-bin.tar.gz解压下载的安装包到某一目录,比如:/Users/dev/programs/apache-maven-3.5.4
2、配置环境变量
- 打开terminel输入以下命令:
vim ~/.bash_profile
打开.bash_profile文件,在次文件中添加设置环境变量的命令export M2_HOME=/Users/dev/programs/apache-maven-3.5.4
export PATH=$PATH:$M2_HOME/bin
添加之后保存并推出,执行以下命令使配置生效:source ~/.bash_profile
3、查看配置是否生效
1、输入:mvn -v命令,输入如下:
Apache Maven 3.5.4 (1edded0938998edf8bf061f1ceb3cfdeccf443fe; 2018-06-18T02:33:14+08:00)
Maven home: /Users/dev/programs/apache-maven-3.5.4
Java version: 1.8.0_181, vendor: Oracle Corporation, runtime: /Library/Java/JavaVirtualMachines/jdk1.8.0_181.jdk/Contents/Home/jre
Default locale: zh_CN, platform encoding: UTF-8
OS name: "mac os x", version: "10.13.6", arch: "x86_64", family: "Mac"
则配置成功。
推荐阅读
-
Mac OS X 配置Java环境变量&安装Maven
-
Mac OS X下安装和配置Maven
-
Mac OS X下Maven的安装与配置
-
Mac OS X下安装和配置Maven
-
Mac OS X下安装和配置Maven
-
Mac OS X下go的安装,使用,删除
-
phpmyadmin 下载 MAC OS X环境下配置APACHE+PHP+MYSQL+PHPMYADMIN
-
Mac OS X下PhpStorm+MAMP PRO+Xdebug+FireFox集成开发和断点调试环境配置
-
mac os下开发系列-配置 maven 3 mac os配置 maven 3
-
Mac OS10.11下mysql5.7.12 安装配置方法图文教程