diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 569ff26c..f50fefa2 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -53,7 +53,7 @@ jobs: env: EXHORT_PYTHON3_PATH: "${{steps.python-location.outputs.python-bin-location}}/python3" EXHORT_PIP3_PATH: "${{steps.python-location.outputs.python-bin-location}}/pip3" - PATH: "${{steps.java-location.outputs.java-bin-location}}:${{steps.java-location.outputs.path-env}}" + JAVA_HOME: "${{steps.java-location.outputs.java-bin-location}}" run: | mvn verify -Dskip.junit_platform=true -Pits,cov -B -ff diff --git a/src/main/java/com/redhat/exhort/providers/JavaMavenProvider.java b/src/main/java/com/redhat/exhort/providers/JavaMavenProvider.java index 0409b492..dcf812c1 100644 --- a/src/main/java/com/redhat/exhort/providers/JavaMavenProvider.java +++ b/src/main/java/com/redhat/exhort/providers/JavaMavenProvider.java @@ -36,6 +36,7 @@ import com.github.packageurl.PackageURL; import com.redhat.exhort.Api; import com.redhat.exhort.Provider; +import com.redhat.exhort.impl.ExhortApi; import com.redhat.exhort.logging.LoggersFactory; import com.redhat.exhort.sbom.Sbom; import com.redhat.exhort.sbom.SbomFactory; @@ -469,7 +470,7 @@ private List getDependencies(final Path manifestPath) thro } private Map getMvnExecEnvs() { - var javaHome = System.getProperty("JAVA_HOME"); + var javaHome = ExhortApi.getStringValueEnvironment("JAVA_HOME",null); if (javaHome != null && !javaHome.isBlank()) { return Collections.singletonMap("JAVA_HOME", javaHome); }