Using the Gradle Wrapper with the Tooling-API

Hello,

I have a project on a domain that I compile with the tooling api elsewhere. I want to compile this project without the user having to have Gradle installed on their computer, which is what I thought the purpose of the gradle-wrapper.jar was for. The problem is that I don’t know how exactly to build using the wrapper. I know that in the command prompt we would use gradlew build, instead of gradle build, but I’m not sure how I can do that with the tooling API, which seems to default to just gradle.

This is the error that I am getting on my domain when I try to compile my code.

org.gradle.tooling.GradleConnectionException: Could not install Gradle distribution from ‘https://services.gradle.org/distributions/gradle-2.6-bin.zip’.
at org.gradle.tooling.internal.consumer.DistributionFactory$ZippedDistribution$1.call(DistributionFactory.java:128)
at org.gradle.tooling.internal.consumer.DistributionFactory$ZippedDistribution$1.call(DistributionFactory.java:116)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: javax.net.ssl.SSLException: java.lang.RuntimeException: java.lang.IllegalStateException: TrustManagerFactoryImpl is not initialized
at weblogic.security.SSL.jsseadapter.JaSSLContextImpl.createSSLEngine(JaSSLContextImpl.java:439)
at weblogic.security.SSL.jsseadapter.JaSSLContextImpl.createSSLEngine(JaSSLContextImpl.java:34)
at weblogic.security.SSL.jsseadapter.JaSSLEngineFactoryImpl.createSSLEngine(JaSSLEngineFactoryImpl.java:126)
at weblogic.socket.JSSESocketFactory.getSSLEngine(JSSESocketFactory.java:156)
at weblogic.socket.JSSESocketFactory.getJSSEFilterImpl(JSSESocketFactory.java:103)
at weblogic.socket.JSSESocketFactory.createSocket(JSSESocketFactory.java:46)
at weblogic.security.SSL.SSLSocketFactory.createSocket(SSLSocketFactory.java:98)
at weblogic.net.http.HttpsClient.openWrappedSSLSocket(HttpsClient.java:617)
at weblogic.net.http.HttpsClient.openServer(HttpsClient.java:280)
at weblogic.net.http.HttpsClient.openServer(HttpsClient.java:361)
at weblogic.net.http.HttpsClient.New(HttpsClient.java:564)
at weblogic.net.http.HttpsClient.New(HttpsClient.java:545)
at weblogic.net.http.HttpsURLConnection.connect(HttpsURLConnection.java:236)
at weblogic.net.http.HttpURLConnection.getInputStream(HttpURLConnection.java:685)
at weblogic.net.http.SOAPHttpsURLConnection.getInputStream(SOAPHttpsURLConnection.java:41)
at org.gradle.wrapper.Download.downloadInternal(Download.java:58)
at org.gradle.wrapper.Download.download(Download.java:44)
at org.gradle.tooling.internal.consumer.DistributionFactory$ProgressReportingDownload.download(DistributionFactory.java:177)
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:65)
at org.gradle.wrapper.Install.createDist(Install.java:48)
at org.gradle.tooling.internal.consumer.DistributionFactory$ZippedDistribution$1.call(DistributionFactory.java:122)
… 5 more
Caused by: java.lang.RuntimeException: java.lang.IllegalStateException: TrustManagerFactoryImpl is not initialized
at weblogic.security.SSL.jsseadapter.JaSSLContextImpl.getSSLContext(JaSSLContextImpl.java:518)
at weblogic.security.SSL.jsseadapter.JaSSLContextImpl.createSSLEngine(JaSSLContextImpl.java:435)
… 27 more
Caused by: java.lang.IllegalStateException: TrustManagerFactoryImpl is not initialized
at sun.security.ssl.TrustManagerFactoryImpl.engineGetTrustManagers(TrustManagerFactoryImpl.java:100)
at javax.net.ssl.TrustManagerFactory.getTrustManagers(TrustManagerFactory.java:285)
at weblogic.security.SSL.jsseadapter.JaTrustManager.(JaTrustManager.java:85)
at weblogic.security.SSL.jsseadapter.JaSSLContextImpl.initializeContext(JaSSLContextImpl.java:670)
at weblogic.security.SSL.jsseadapter.JaSSLContextImpl.getSSLContext(JaSSLContextImpl.java:507)
… 28 more

Any help would be greatly appreciated. Thank you.

The tooling api is just like using the wrapper, no other installation required.

Just have a look at the exception. It’s an ssl failure, Gradle can’t be downloaded.