Skip to content

Conversation

jthurne
Copy link
Member

@jthurne jthurne commented May 11, 2023

Users can use CLIENT_JAVA_HOME to override which JVM is used to execute the
Build Scan clients. The other JVMs used (for running Gradle and for building
code) are not affected.

Fixes #428

@jthurne jthurne changed the title Add support for CLIENT_JAVA_HOME Add support for CLIENT_JAVA_HOME May 11, 2023
jthurne and others added 11 commits August 7, 2023 17:05
Users can use CLIENT_JAVA_HOME to override which JVM is used to execute the
Build Scan clients.  The other JVMs used (for running Gradle and for building
code) are not affected.
Co-authored-by: Eric Haag <ehaag@gradle.com>
Signed-off-by: Jim Hurne <jhurne@gradle.com>
@erichaagdev erichaagdev force-pushed the jhurne/allow-setting-client-java-home branch from ce02ec1 to b052dd0 Compare August 7, 2023 22:07
@erichaagdev
Copy link
Member

I tested this and confirmed it works. Written below is what I did to test this:

  1. Verified Java version is set to 8
$ java -version
openjdk version "1.8.0_362"
OpenJDK Runtime Environment (Zulu 8.68.0.19-CA-macos-aarch64) (build 1.8.0_362-b08)
OpenJDK 64-Bit Server VM (Zulu 8.68.0.19-CA-macos-aarch64) (build 25.362-b08, mixed mode)
  1. This script invocation fails, which is expected
$ ./03-validate-local-build-caching-different-locations.sh \
  -r https://github.com/etiennestuder/java-ordered-properties \
  -t build \
  -c d54ff833f3337ec6df6ab7b5157d36e12af8b6ae \
  -x \
  --debug

image

  1. This script invocation succeeds
$ CLIENT_JAVA_HOME="$JDK17" \
  ./03-validate-local-build-caching-different-locations.sh \
  -r https://github.com/etiennestuder/java-ordered-properties \
  -t build \
  -c d54ff833f3337ec6df6ab7b5157d36e12af8b6ae \
  -x \
  --debug

image

Uploading the scan dump and we can see the build was still invoked with the system's currently configured Java runtime.

image

@erichaagdev erichaagdev merged commit 86cc038 into main Aug 7, 2023
@erichaagdev erichaagdev deleted the jhurne/allow-setting-client-java-home branch August 7, 2023 23:00
@etiennestuder
Copy link
Member

@erichaagdev Thanks for the testing and merge!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

User can configure Java version used to invoked java clients
3 participants