You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 7, 2024. It is now read-only.
I'm trying to use this GraalVM plugin behind firewall, and my caching proxy is using the company CA root. If we use gu as --native (the default), it always uses the default cacerts, and fails to download the native-image.
For anybody having the same problem, here is a workaround by intercepting the extractGraalTooling task:
tasks.named('extractGraalTooling') { t->
doFirst { // touch file, so the task will not try to install itdef out = (t.outputDirectory asDirectoryProperty ).get().asFile.canonicalPath
file("$out/bin/native-image").with { Fileni->
ni.parentFile.mkdirs()
ni.text =""
}
}
doLast { // patch the cacerts and install native-image ourselves passing '--jvm'def defaultCacerts =System.getProperty("java.home") +"/lib/security/cacerts"def cacerts =System.getProperty("javax.net.ssl.trustStore", defaultCacerts)
def out = (t.outputDirectory asDirectoryProperty ).get().asFile.canonicalPath
file("$out//jre/lib/security/cacerts").bytes=file(cacerts).bytes
project.exec {
executable "$out/bin/gu"
args "--jvm", "install", "--no-progress", "--force", "--replace", "native-image"
}
}
}
To implement it cleanly it also requires to separate the extraction from the install of native-image, so we can add a separate task copying cacerts in between them.
It is part of the Gradle plugin to which this issue belongs. If you are only using "gu" on the command line, it is not relevant to you (despite getting the same error message).
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
What happened?
I'm trying to use this GraalVM plugin behind firewall, and my caching proxy is using the company CA root. If we use
gu
as--native
(the default), it always uses the defaultcacerts
, and fails to download thenative-image
.For more details, see oracle/graal#2585
What did you want to happen?
I'd like my build to run
gu --jvm install native-image
, which would pick up theJAVA_TOOL_OPTIONS
and use the correct CA roots.It can be configurable, or default behavior.
The text was updated successfully, but these errors were encountered: