akomakom edited a comment on pull request #285:
URL: https://github.com/apache/maven-surefire/pull/285#issuecomment-619458497


   I'm fairly convinced that **JAVA_HOME** is not being changed for the test 
process and is inherited from the parent process.  I'd definitely like it to 
be, and, assuming that you're on board with that, should it be done in:
   
   * ~~JarManifestForkConfiguration~~ (never mind, confused by search results)
   * in our `getToolchain()` or `getEffectiveJvm()` method by simply modifying 
`environmentVariables` Map (if not already set?).  This is how I did it in my 
own custom plugin, and I also had to add JAVA_HOME to the 
`excludedEnvironmentVariables`
   * Same but controlled by a configuration parameter?
   * someplace else?
   
   On a side note, I believe that the original implementation is **also 
wrong**.  Even if I set the main maven toolchain to a different JDK via the 
toolchains plugin configuration, the JAVA_HOME environment variable is 
inherited from the invoking shell and does not change.


----------------------------------------------------------------
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:
[email protected]


Reply via email to