"Cannot download published Gradle versions" under entreprise firewall

I’m trying to install Buildship on my enterprise computer, (Buildship Release 1.0 for Eclipse 4.4)
I had to manually retrieve each element of the p2 repository because I cannot connect to the internet from Eclipse, due to our enterprise proxy.

Buildship installs correctly, but at Eclipse restart, I don’t see the Gradle preferences in Eclipse preferences. I cannot import or create a Gradle project, with the error

Root exception:
java.lang.NoClassDefFoundError: org/eclipse/buildship/core/notification/UserNotification

Caused by: java.lang.ClassNotFoundException: An error occurred while automatically activating bundle org.eclipse.buildship.core (408).

Caused by: org.osgi.framework.BundleException: Exception in org.eclipse.buildship.core.CorePlugin.start() of bundle org.eclipse.buildship.core.

Caused by: java.lang.RuntimeException: Cannot download published Gradle versions.

Caused by: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

Our proxy prevents Buildship from downloading Gradle distribution (from the default localtion)
Can it be bypassed ? It should be possible to point to our internal server, holding our gradle distributions, shouldn’t it ?

The problem you see is a known bug and is fixed in the latest snapshot release. We’ll do a 1.0.1 service release soon, which will also contain the fix.

Currently we don’t provide any pages in the Eclipse preferences dialog, this is another feature we’ll add later.

1 Like

FYI I’ve opened a Bugzilla issue to track the development status on this story.

I tried Buildship 1.0.1.
Now, the fact that the gradle distribution could not be downloaded from ‘https://services.gradle.org/distributions/gradle-2.5-rc-2-bin.zip’ is printed in a popup, when creating a new Gradle project.
It’s slightly better, because Gradle plugin (task views, etc etc) can launch without crashing.
But a new Gradle project still cannot be created :
<<
org.gradle.tooling.GradleConnectionException: Could not install Gradle distribution from ‘https://services.gradle.org/distributions/gradle-2.5-rc-2-bin.zip’.
Caused by: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

When creating a new Gradle project, a option to manually specify the location of the gradle distribution should be available. Otherwise, new projet cannot be added when working offline

You can specify the location of the Gradle distribution to use during import/execution under the ‘Gradle Distribution’ tab. You can choose between wrapper, fixed version, local Gradle install, and remote URI.

Note that Buildship currently ignores any proxy settings of Eclipse, but you can still point to a Gradle distribution on your local file system as described above.

Hi Etienne
This is true only for an import.
When creating a new gradle project, we can’t modify the gradle distribution settings.

Yep. You are right on this, of course. We will look into it.

The ticket to keep track of the implementation of adding a distribution page to the project creation wizard: https://bugs.eclipse.org/bugs/show_bug.cgi?id=473137

The project creation wizard has now a Gradle distribution selection page. It can be tested from the latest snapshot update site: http://download.eclipse.org/buildship/updates/e45/snapshots/1.0

and it works perfectly, thanks guys

FYI You can try the latest Buildship snapshot which has a support for proxy settings. If you set the http/https proxy settings in the Eclipse preferences UI, Buildship and Gradle will automatically make use of it. Also, downloading the published Gradle versions no longer ignores the proxy settings.

Cool I’ll give it a try :blush: