Mac OS | Maven 설치하기


설치하기

Homebrew를 사용한 메이블 설치명령어는 아래와 같다.

% brew install maven

위에 명령어를 실행하면 아래와 같이 표시되면서 설치가 된다.

Updating Homebrew...
==> Homebrew is run entirely by unpaid volunteers. Please consider donating:
  https://github.com/Homebrew/brew#donations
==> Auto-updated Homebrew!
Updated 2 taps (homebrew/core and adoptopenjdk/openjdk).
==> New Formulae
fabric-installer      gnupg@2.2             lefthook              lychee                revive                stp                   webhook
==> Updated Formulae
Updated 250 formulae.
==> Updated Casks
Updated 23 casks.

==> Downloading https://ghcr.io/v2/homebrew/core/openjdk/manifests/15.0.2
######################################################################## 100.0%

... 가운데 생략 ...

For compilers to find openjdk you may need to set:
  export CPPFLAGS="-I/usr/local/opt/openjdk/include"

설치 확인하기

설치가 잘되었는지 버전확인 명령어로 확인할 수 있다.

% mvn -version

위와 같이 명령어를 입력하면 아래와 같이 결과가 표시되는 것을 확인할 수 있다.

Apache Maven 3.8.1 (05c21c65bdfed0f71a2f2ada8b84da59348c4c5d)
Maven home: /usr/local/Cellar/maven/3.8.1/libexec
Java version: 15.0.2, vendor: N/A, runtime: /usr/local/Cellar/openjdk/15.0.2/libexec/openjdk.jdk/Contents/Home
Default locale: ko_KR, platform encoding: UTF-8
OS name: "mac os x", version: "11.2.3", arch: "x86_64", family: "mac"
kimkc@kimkcui-MacBookPro macaront % 

설치 위치 확인

% which mvn
/usr/local/bin/mvn