2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

MacにMavenをインストール(memoレベル)

2
Posted at

1、https://maven.apache.org/download.cgi にアクセス

2、Binary tar.gz archive(バージョンは必要に応じて)を適当な場所にdownload
例:apache-maven-3.6.2-bin.tar.gz

3、apache-maven-3.6.2-bin.tar.gzを解凍 (double clickすれば解凍できる)
  例:apache-maven-3.6.2

4、/usr/local配下に移動
 Finderを開き、shift+command+Gを実行、/usr/localを入力して、移動させる
 解凍したファイル(例:apache-maven-3.6.2)を/usr/localに移動

5、コマンドを実行

$ cd ~
$ vi .bash_profile

6、bash_profileファイルを修正

.bash_profile.
export M3_HOME=/usr/local/apache-maven-3.6.2
M3=$M3_HOME/bin
export PATH=$M3:$PATH

7、コマンドを実行

$ source .bash_profile

8、コマンドを実行。バージョンが表示できたら、ok

$ mvn --version
Apache Maven 3.6.2 (40f52333136460af0dc0d7232c0dc0bcf0d9e117; 2019-08-28T00:06:16+09:00)
Maven home: /usr/local/apache-maven-3.6.2
Java version: 1.8.0_211, vendor: Oracle Corporation, runtime: /Library/Java/JavaVirtualMachines/jdk1.8.0_211.jdk/Contents/Home/jre
Default locale: ja_JP, platform encoding: UTF-8
OS name: "mac os x", version: "10.14.5", arch: "x86_64", family: "mac"

参考リンク:
https://qiita.com/saitoryc/items/737ee9e711f1ebe0dcfa

2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?