1
0

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 3 years have passed since last update.

jenv環境でmavenコマンドを利用すると.java-versionが無視される

Posted at

jenvで複数バージョンのJavaを管理していたところ、mavenコマンドがjenvではなくSystemのJavaを参照していたので、jenvを参照するように行った設定のメモ。

環境

  • OS : macOS 11.2.3
  • jenv : 0.5.3
  • maven : 3.6.3

状況

$ mvn -version

Apache Maven 3.6.3 (xxx)
Maven home: XXX
Java version: 15.0.1, vendor: N/A, runtime: XXXX
Default locale: ja_JP, platform encoding: UTF-8
OS name: "xx", version: "xx", arch: "xx", family: "xx"

解決方法

$ jenv enable-plugin maven
$ jenv version

Apache Maven 3.6.3 (xxx)
Maven home: XXX
Java version: 1.8.0_231, vendor: Oracle Corporation, runtime: XXX
Default locale: ja_JP, platform encoding: UTF-8
OS name: "xx", version: "xx", arch: "xx", family: "xx"

参考

1
0
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
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?