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
Maven seems to fork with the jre instead of the jdk #21275
Comments
It's very unclear where this actually comes from to me, been trying to debug it after we ran into it. The launch scripts generated by the derivation for Maven explicitly set the /n/s/p/bin $ pwd
/nix/store/psd9lhhz259fmzssxxm33b3hzmscd8b3-apache-maven-3.5.0/bin
/n/s/p/bin $ cat mvn
#! /nix/store/hqi64wjn83nw4mnf9a5z9r4vmpl72j3r-bash-4.4-p12/bin/bash -e
export JAVA_HOME="/nix/store/hh30vm83ffsvhk14r09np6cngg4s8vgz-openjdk-8u152b16"
exec "/nix/store/psd9lhhz259fmzssxxm33b3hzmscd8b3-apache-maven-3.5.0/maven/bin/mvn" "${extraFlagsArray[@]}" "$@" But asking Maven for information about how it's configured suddenly shows that it's pointing at the JRE: /n/s/p/bin $ ./mvn -version
Apache Maven 3.5.0 (ff8f5e7444045639af65f6095c62210b5713f426; 2017-04-03T21:39:06+02:00)
Maven home: /nix/store/psd9lhhz259fmzssxxm33b3hzmscd8b3-apache-maven-3.5.0/maven
Java version: 1.8.0_152, vendor: Oracle Corporation
Java home: /nix/store/hh30vm83ffsvhk14r09np6cngg4s8vgz-openjdk-8u152b16/lib/openjdk/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: I haven't been able to figure out what makes it append the |
Hi, there I faced same issue.
When I tries in my project:
It complained:
So I think, that Maven wrongly guesses Nevertheless is seems working under JDK 11. |
This should be fixed by #80728 |
I'll assume this is fixed. If it isn't, please let me know and I'll re-open. |
Issue description
Nixos' maven seems to fork with the jre instead of the jdk. This results in not having jdk tools available in test code.
Steps to reproduce
clone this repo https://github.com/FaustXVI/nixos-maven-break
run
mvn test
Workaround
Use maven
forkcount
to 0.Or explicitly set the right jvm on the command line with
mvn -Djvm=$(which java) verify
Technical details
The text was updated successfully, but these errors were encountered: