franzbecker / gradle-lombok

Gradle plugin for Lombok support

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support for Java 7

jaypatel512 opened this issue · comments

commented

Hello,

Our team is responsible for creating different SDKs, and one of them includes creating for Java versions >= 7. When testing this using a simple Dockerfile, we ran into an issue with gradle not finding your plugin.

Do you have any insight on why this could be happening, or how can we resolve this ?

* What went wrong:
Plugin [id: 'io.franzbecker.gradle-lombok', version: '1.14'] was not found in any of the following sources:

- Gradle Core Plugins (plugin is not in 'org.gradle' namespace)
- Plugin Repositories (could not resolve plugin artifact 'io.franzbecker.gradle-lombok:io.franzbecker.gradle-lombok.gradle.plugin:1.14')
  Searched in the following repositories:
    Gradle Central Plugin Repository

Hey there,

the error message is a bit odd. Does it work with the same configuration on JDK 8?

commented

Yes, we have three builds for Java 7, 8 and 9. We are getting 100% success on 8 and 9.

Initially, we were having trouble getting gradle to download successfully as well from its wrapper, causing below error:

Exception in thread "main" javax.net.ssl.SSLException: java.security.ProviderException: java.security.InvalidKeyException: EC parameters error
	at sun.security.ssl.Alerts.getSSLException(Alerts.java:208)
	at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1914)
	at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1872)
	at sun.security.ssl.SSLSocketImpl.handleException(SSLSocketImpl.java:1855)
	at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1376)
	at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1353)
	at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:559)
	at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1366)
	at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:263)
	at org.gradle.wrapper.Download.downloadInternal(Download.java:66)
	at org.gradle.wrapper.Download.download(Download.java:51)
	at org.gradle.wrapper.Install$1.call(Install.java:62)
	at org.gradle.wrapper.Install$1.call(Install.java:48)
	at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:69)
	at org.gradle.wrapper.Install.createDist(Install.java:48)
	at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:107)
	at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)
Caused by: java.security.ProviderException: java.security.InvalidKeyException: EC parameters error
	at sun.security.pkcs11.P11Key$P11ECPublicKey.getEncodedInternal(P11Key.java:1024)
	at sun.security.pkcs11.P11Key.equals(P11Key.java:158)
	at java.util.ArrayList.indexOf(ArrayList.java:303)
	at java.util.ArrayList.contains(ArrayList.java:286)
	at sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:249)
	at sun.security.validator.Validator.validate(Validator.java:260)
	at sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:326)
	at sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:231)
	at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:126)
	at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1559)
	at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:213)
	at sun.security.ssl.Handshaker.processLoop(Handshaker.java:987)
	at sun.security.ssl.Handshaker.process_record(Handshaker.java:923)
	at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1033)
	at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1342)
	at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1369)
	... 13 more
Caused by: java.security.InvalidKeyException: EC parameters error
	at sun.security.ec.ECParameters.getAlgorithmParameters(ECParameters.java:284)
	at sun.security.ec.ECPublicKeyImpl.<init>(ECPublicKeyImpl.java:59)
	at sun.security.pkcs11.P11Key$P11ECPublicKey.getEncodedInternal(P11Key.java:1021)
	... 28 more
Caused by: java.security.NoSuchProviderException: no such provider: SunEC
	at sun.security.jca.GetInstance.getService(GetInstance.java:83)
	at sun.security.jca.GetInstance.getInstance(GetInstance.java:206)
	at java.security.Security.getImpl(Security.java:697)
	at java.security.AlgorithmParameters.getInstance(AlgorithmParameters.java:199)
	at sun.security.ec.ECParameters.getAlgorithmParameters(ECParameters.java:279)
	... 30 more
rake aborted!

We solved this issue by installing that globally via wget and adding it to classpath in our docker image. But then it got stuck here.

There seems to be a problem with your Docker image / JDK. If Gradle won't download using the wrapper there might be an underlying problem with your JDK which should be fixed first. Installing it globally via wget seems like a workaround.

Which Java version are you using? A quick Google search revealed that there are versions affected by the exception you described (docker-library/openjdk#117).

I've confirmed that the plugin works as expected using Java 7, see this Travis log: https://travis-ci.org/franzbecker/gradle-lombok-example/builds/376495799