title: Intellij Idea: "Accept non-trusted certificates automatically" setting doesn't work
body: <p>I'm working on a new laptop on my office network behind a corporate proxy and I keep getting &quot;PKIX path building failed ... unable to find valid certification path to requested target&quot; when my project builds and tries to download the Gradle Plugin pom.</p>
  <p>The prevailing wisdom at my company with regard to the proxy is to:</p>
  <ol>
  <li><p>Set the Preferences &gt; Tools &gt; Server Certificates item &quot;Accept non-trusted certificates automatically&quot; to &quot;checked&quot;</p>
  </li>
  <li><p>Edit Help &gt; Edit Custom VM Options to add &quot;-Djavax.net.ssl.trustStoreType=KeychainStore&quot; (the pertinent certificates appear to be in Keychain)</p>
  </li>
  </ol>
  <p>Despite setting those, I still get:</p>
  <pre><code>FAILURE: Build failed with an exception.
  
  * What went wrong:
  A problem occurred configuring root project 'AuditTrail'.
  &gt; Could not resolve all artifacts for configuration ':classpath'.
     &gt; Could not resolve org.grails:grails-gradle-plugin:4.0.6.
       Required by:
           project :
        &gt; Could not resolve org.grails:grails-gradle-plugin:4.0.6.
           &gt; 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'.
              &gt; Could not GET 'https://repo.grails.org/grails/core/org/grails/grails-gradle-plugin/4.0.6/grails-gradle-plugin-4.0.6.pom'.
                 &gt; 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```
   
  </code></pre>