I’m working with a Java code base that uses Gradle with Groovy for build automation. Our build logic has pluginMangement
decleration with repositories
nested inside.
Initially, the build logic was failing to resolve artifacts contained in our repositories.
I suspected SSL certificates for our artifactory url within jdk-17/Home/lib/security/cacerts
might’ve been the issue and added a new one.
The build continued to fail. However the build suceeded after ./gradlew --stop
followed by ./gradlew build
The only explanation I could fathom was that the existing daemons did not pickup the cacert changes.
The default certificate store (cacerts) is loaded by the JVM when initializing the first TLS configuration. Gradle demons are executed by the JVM. So it makes sense that you need to restart the process to pick up changes to cacerts, same as any JVM based application.