Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mvnd seems to not respect jenv local setting #487

Closed
korthout opened this issue Oct 4, 2021 · 2 comments
Closed

mvnd seems to not respect jenv local setting #487

korthout opened this issue Oct 4, 2021 · 2 comments
Labels
wontfix This will not be worked on

Comments

@korthout
Copy link

korthout commented Oct 4, 2021

I just installed mvnd and noticed it was using a different jdk than mvn.

I installed mvnd using Homebrew. Perhaps I need to configure something additionally.

Any help is appreciated.

Here's the output of some local shell, java and maven info:

$ jenv local
11

$ java -version
openjdk version "11.0.7" 2020-04-14
OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.7+10)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.7+10, mixed mode)

$ mvn -v
Apache Maven 3.8.2 (ea98e05a04480131370aa0c110b8c54cf726c06f)
Maven home: /usr/local/Cellar/maven/3.8.2/libexec
Java version: 11.0.7, vendor: AdoptOpenJDK, runtime: /Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "10.16", arch: "x86_64", family: "mac"

$ mvnd -v
mvnd native client 0.6.0-darwin-amd64 (038257e1274c166005228e812adece85af973bcc)
Terminal: org.jline.terminal.impl.PosixSysTerminal with pty org.jline.terminal.impl.jansi.osx.OsXNativePty
Apache Maven 3.8.2 (ea98e05a04480131370aa0c110b8c54cf726c06f)
Maven home: /usr/local/Cellar/mvnd/0.6.0/libexec/mvn
Java version: 17, vendor: Homebrew, runtime: /usr/local/Cellar/openjdk/17/libexec/openjdk.jdk/Contents/Home
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "11.6", arch: "x86_64", family: "mac"
@korthout korthout changed the title mvnd seems not respect jenv local setting mvnd seems to not respect jenv local setting Oct 4, 2021
@korthout
Copy link
Author

korthout commented Oct 4, 2021

🤦 I need to read README's better.

I found jenv/jenv#324 which refers to the jenv README, which in turn clearly states that JAVA_HOME is not exported by default and the export plugin should be enabled by executing:

jenv enable-plugin export
exec $SHELL -l

Running mvnd now respects the correct jdk set by jenv:

$ mvnd -v
mvnd native client 0.6.0-darwin-amd64 (038257e1274c166005228e812adece85af973bcc)
Terminal: org.jline.terminal.impl.PosixSysTerminal with pty org.jline.terminal.impl.jansi.osx.OsXNativePty
Apache Maven 3.8.2 (ea98e05a04480131370aa0c110b8c54cf726c06f)
Maven home: /usr/local/Cellar/mvnd/0.6.0/libexec/mvn
Java version: 11.0.7, vendor: AdoptOpenJDK, runtime: /Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "10.16", arch: "x86_64", family: "mac"

@korthout korthout closed this as completed Oct 4, 2021
@ppalaga
Copy link
Contributor

ppalaga commented Oct 5, 2021

Thanks for the report and solution, @korthout!

@ppalaga ppalaga added this to the No fix/wont't fix milestone Oct 5, 2021
@gnodet gnodet added the wontfix This will not be worked on label Dec 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

3 participants