여백에 도장 찍기

[Mac] Apache Maven - 설치 및 환경변수 설정 본문

카테고리 없음

[Mac] Apache Maven - 설치 및 환경변수 설정

Linzyseo 2019. 7. 17. 16:44

1. Apache Maven 을 다운로드 받는다. 

https://maven.apache.org/download.cgi

 

Maven – Download Apache Maven

Downloading Apache Maven 3.6.1 Apache Maven 3.6.1 is the latest release and recommended version for all users. The currently selected download mirror is http://mirror.apache-kr.org/. If you encounter a problem with this mirror, please select another mirror

maven.apache.org

~/Downloads 하위로 이동하여 apache-maven-3.6.1-bin.tar.gz 을 압축을 풀자. 

cd ~/Downloads
tar xzvf apache-maven-3.6.1-bin.tar.gz

압축을 해제한 maven 폴더를 user directory 하위로 가져온다.

sudo mv ~/Downloads/pache-maven-3.6.1-bin ~/

 

2. ~/.bash_profile 에서 maven 관련 환경변수를 설정한다.

# MAVEN
export MV_HOME=/Users/juminseo/apache-maven-3.6.1
export PATH=$PATH:$MV_HOME/bin

 

3. 설치 및 설정이 잘 이루어졌는지 확인. 

➜  ~ mvn -version
Apache Maven 3.6.1 (d66c9c0b3152b2e69ee9bac180bb8fcc8e6af555; 2019-04-05T04:00:29+09:00)
Maven home: /Users/juminseo/apache-maven-3.6.1
Java version: 1.8.0_212, vendor: AdoptOpenJDK, runtime: /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/jre
Default locale: ko_KR, platform encoding: UTF-8
OS name: "mac os x", version: "10.14.3", arch: "x86_64", family: "mac"
Comments