I'm working on a new laptop on my office network behind a corporate proxy and I keep getting "PKIX path building failed ... unable to find valid certification path to requested target" when my project builds and tries to download the Gradle Plugin pom.
The prevailing wisdom at my company with regard to the proxy is to:
Set the Preferences > Tools > Server Certificates item "Accept non-trusted certificates automatically" to "checked"
Edit Help > Edit Custom VM Options to add "-Djavax.net.ssl.trustStoreType=KeychainStore" (the pertinent certificates appear to be in Keychain)
Despite setting those, I still get:
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'AuditTrail'.
> Could not resolve all artifacts for configuration ':classpath'.
> Could not resolve org.grails:grails-gradle-plugin:4.0.6.
Required by:
project :
> Could not resolve org.grails:grails-gradle-plugin:4.0.6.
> Could not get resource 'https://repo.grails.org/grails/core/org/grails/grails-gradle-plugin/4.0.6/grails-gradle-plugin-4.0.6.pom'.
> Could not GET 'https://repo.grails.org/grails/core/org/grails/grails-gradle-plugin/4.0.6/grails-gradle-plugin-4.0.6.pom'.
> PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
...
* Get more help at https://help.gradle.org
BUILD FAILED in 486ms```