stempler / gradle-versioneye-plugin

Plugin for Gradle to update your project's dependencies status on www.versioneye.com
MIT License
31 stars 5 forks source link

Build fails #29

Closed DreierF closed 8 years ago

DreierF commented 8 years ago

Hi, I was just trying to add versioneye to my gradle build, but it keeps failing with the following error message:

:versioneye-update FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':versioneye-update'.
> 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

Happens for versioneye-create as well. Running the build with --debug didn't give any additional information.

Any ideas?

michel-kraemer commented 8 years ago

Which JDK version are you using? Try to update to the latest one. I had the same error a couple of days ago and updating helped in my case.

DreierF commented 8 years ago

Thanks for the hint! Works now :)

omerlh commented 7 years ago

Just happened to me. Java version:

java version "1.8.0_74"
Java(TM) SE Runtime Environment (build 1.8.0_74-b02)
Java HotSpot(TM) 64-Bit Server VM (build 25.74-b02, mixed mode)

From the debug log, look like it is in the request to VersionEye, but I am not sure how to test the certificate:

16:30:32.130 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter] Executing actions for task ':versioneye-create'.
16:30:32.133 [DEBUG] [groovyx.net.http.HTTPBuilder] POST https://www.versioneye.com/api/v2/projects?api_key=<>
16:30:32.142 [DEBUG] [org.apache.http.impl.conn.BasicClientConnectionManager] Get connection for route {s}->https://www.versioneye.com:443
16:30:32.249 [DEBUG] [org.apache.http.impl.conn.DefaultClientConnectionOperator] Connecting to www.versioneye.com:443
16:30:32.376 [DEBUG] [org.apache.http.impl.conn.DefaultClientConnection] Connection org.apache.http.impl.conn.DefaultClientConnection@5fd3062f closed
16:30:32.376 [DEBUG] [org.apache.http.impl.conn.DefaultClientConnection] Connection org.apache.http.impl.conn.DefaultClientConnection@5fd3062f shut down
16:30:32.376 [DEBUG] [org.apache.http.impl.conn.BasicClientConnectionManager] Releasing connection org.apache.http.impl.conn.ManagedClientConnectionImpl@63d1ef27
16:30:32.376 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter] Finished executing task ':versioneye-create'
16:30:32.376 [LIFECYCLE] [class org.gradle.TaskExecutionLogger] :versioneye-create FAILED
16:30:32.377 [INFO] [org.gradle.execution.taskgraph.AbstractTaskPlanExecutor] :versioneye-create (Thread[Daemon worker Thread 2,5,main]) completed. Took 0.248 secs.
16:30:32.377 [DEBUG] [org.gradle.execution.taskgraph.AbstractTaskPlanExecutor] Task worker [Thread[Daemon worker Thread 2,5,main]] finished, busy: 33.921 secs, idle: 0.0 secs
16:30:32.381 [ERROR] [org.gradle.BuildExceptionReporter] 
16:30:32.382 [ERROR] [org.gradle.BuildExceptionReporter] FAILURE: Build failed with an exception.
16:30:32.382 [ERROR] [org.gradle.BuildExceptionReporter] 
16:30:32.382 [ERROR] [org.gradle.BuildExceptionReporter] * What went wrong:
16:30:32.382 [ERROR] [org.gradle.BuildExceptionReporter] Execution failed for task ':versioneye-create'.
16:30:32.382 [ERROR] [org.gradle.BuildExceptionReporter] > 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
16:30:32.383 [ERROR] [org.gradle.BuildExceptionReporter] 
16:30:32.383 [ERROR] [org.gradle.BuildExceptionReporter] * Try:
16:30:32.383 [ERROR] [org.gradle.BuildExceptionReporter] Run with --stacktrace option to get the stack trace. 
16:30:32.383 [LIFECYCLE] [org.gradle.BuildResultLogger] 
16:30:32.384 [LIFECYCLE] [org.gradle.BuildResultLogger] BUILD FAILED
16:30:32.384 [LIFECYCLE] [org.gradle.BuildResultLogger] 
16:30:32.384 [LIFECYCLE] [org.gradle.BuildResultLogger] Total time: 2 mins 15.5 secs
reiz commented 7 years ago

@omerlh @DreierF We are using SSL certs from LetsEncrypt. I guess JDK 1.8 update 11 and higher are supporting that certs. You just need to update your JDK. If you can't update, for what ever reason, then you can add the certs to your JDK like described here: https://github.com/versioneye/ops_contrib/blob/master/import_site_cert.md.

omerlh commented 7 years ago

Thanks, worth mentioning that this java version is working:

java version "1.8.0_131"
Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)

According to SO, the minimum required version is 8u101. Worth mention it somewhere.

reiz commented 7 years ago

@omerlh I added a note to the VersionEye Maven Plugin: https://github.com/versioneye/versioneye_maven_plugin/blob/master/README.md#minimum-requirement.

reiz commented 7 years ago

@omerlh I just send a PR here: https://github.com/stempler/gradle-versioneye-plugin/pull/39. /cc @stempler

omerlh commented 7 years ago

Great, thanks!