0
votes

I have created a fresh Liferay 6.2 CE GA4 using pre-downloaded SDK/Tomcat/LR Source. I have created server in eclipse and when I try to create portlet for the first time it try to download "gradle-2.2.1-bin.zip" from the internet.

I have downloaded same from gradle from "https://downloads.gradle.org/distributions/gradle-2.2.1-bin.zip" and placed it inside "liferay-plugins-sdk-6.2\tools\gradle\gradle\wrapper".

Still it shows the same error as below:

`Downloading https://services.gradle.org/distributions/gradle-2.2.1-bin.zip

Exception in thread "main" java.net.ConnectException: Connection timed out: connect
    at java.net.PlainSocketImpl.socketConnect(Native Method)
    at java.net.PlainSocketImpl.doConnect(Unknown Source)
    at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
    at java.net.PlainSocketImpl.connect(Unknown Source)
    at java.net.SocksSocketImpl.connect(Unknown Source)
    at java.net.Socket.connect(Unknown Source)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.connect(Unknown Source)
    at com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.connect(Unknown Source)
    at sun.net.NetworkClient.doConnect(Unknown Source)
    at sun.net.www.http.HttpClient.openServer(Unknown Source)
    at sun.net.www.http.HttpClient.openServer(Unknown Source)
    at sun.net.www.protocol.https.HttpsClient.(Unknown Source)
    at sun.net.www.protocol.https.HttpsClient.New(Unknown Source)
    at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(Unknown Source)
    at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
    at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
    at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(Unknown Source)
    at org.gradle.wrapper.Download.downloadInternal(Download.java:56)
    at org.gradle.wrapper.Download.download(Download.java:42)
    at org.gradle.wrapper.Install$1.call(Install.java:57)
    at org.gradle.wrapper.Install$1.call(Install.java:44)
    at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:65)
    at org.gradle.wrapper.Install.createDist(Install.java:44)
    at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:126)
    at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:56)
`

Am I placing that zip on wrong directory or missing something else ?

2

2 Answers

1
votes

From the error message, I'd say: Yes, it seems you put the file into the wrong directory. Which one is the correct one? I don't know. It'd be easiest to do your first build while connected to the internet. The download will just happen once (also, there might be more dependencies that need to be downloaded) and you can do your builds offline after that.

0
votes

To resolve your problem, you need to:

1) Delete content on:
D:\Profiles\XXX.gradle\wrapper\dists\gradle-2.2.1-bin\88n1whbyjvxg3s40jzz5ur27

2) Download manually:
https://services.gradle.org/distributions/gradle-2.2.1-bin.zip

3) Put gradle-2.2.1-bin.zip on:
D:\Profiles\XXX.gradle\wrapper\dists\gradle-2.2.1-bin\88n1whbyjvxg3s40jzz5ur27