You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by GitBox <gi...@apache.org> on 2020/04/27 15:43:50 UTC

[GitHub] [maven-surefire] Tibor17 commented on pull request #288: SUREFIRE-1234 Set java home from toolchain

Tibor17 commented on pull request #288:
URL: https://github.com/apache/maven-surefire/pull/288#issuecomment-620067158


   But the inheritance of the env is not done from the toolchain to the jvm. The toolchain is used only for one purpose, to get the path of the JDK installation on the disk, see [this](https://github.com/apache/maven-surefire/blob/master/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java#L2546).
   The SHELL is calling `/path/to/jdk/bin/java -jar` etc.
   The only place where the JAVA_HOME can be inherited in to the SHELL is [this](https://github.com/apache/maven-shared-utils/blob/master/src/main/java/org/apache/maven/shared/utils/cli/Commandline.java#L402) - external library - not surefire however we are able to exclude it. And the environment is merged in [here](https://github.com/apache/maven-shared-utils/blob/master/src/main/java/org/apache/maven/shared/utils/cli/Commandline.java#L243).
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org