Fórum
Blade CLI hangs on downloads
Alessandro Candini, modificado 7 Anos atrás.
Blade CLI hangs on downloads
Regular Member Postagens: 130 Data de Entrada: 17/10/15 Postagens Recentes
Hi everyone.
On my Ubuntu 14.04 64 bit machine, I've installed the blade cli, following the instructions reported on its github page.
Everything looks fine, but the only command working right now is the blade version one:
If I do anything else instead, from blade update to blade init myworkspace it doesn't work, giving me the following:
As suggested here, I've configured gradle.properties file this way:
But it does not work anyway.
What am I missing?
Thank you.
On my Ubuntu 14.04 64 bit machine, I've installed the blade cli, following the instructions reported on its github page.
Everything looks fine, but the only command working right now is the blade version one:
user@host:~$ blade version
1.0.0.201604152215
If I do anything else instead, from blade update to blade init myworkspace it doesn't work, giving me the following:
user@host:~$ blade update
java.net.ConnectException: Connessione scaduta
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:579)
at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:637)
at sun.security.ssl.BaseSSLSocketImpl.connect(BaseSSLSocketImpl.java:160)
at sun.net.NetworkClient.doConnect(NetworkClient.java:180)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:432)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:527)
at sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:264)
at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:367)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:191)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:934)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:177)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1302)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:254)
at aQute.lib.io.IO.copy(IO.java:172)
at aQute.lib.io.IO.copy(IO.java:168)
at aQute.jpm.lib.JustAnotherPackageManager.put(JustAnotherPackageManager.java:773)
at aQute.jpm.lib.JustAnotherPackageManager$2.run(JustAnotherPackageManager.java:745)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Error
0. [File.<init>] null
Error
0. blade exited with code: 1</init></init>
As suggested here, I've configured gradle.properties file this way:
user@host:$ cat ~/.gradle/gradle.properties
systemProp.http.proxyHost=my.correct.proxy.it
systemProp.http.proxyPort=3128
systemProp.http.nonProxyHosts=localhost
systemProp.https.proxyHost=my.correct.proxy.it
systemProp.https.proxyPort=3128
systemProp.https.nonProxyHosts=localhost
But it does not work anyway.
What am I missing?
Thank you.
Alessandro Candini, modificado 7 Anos atrás.
RE: Blade CLI hangs on downloads (Resposta)
Regular Member Postagens: 130 Data de Entrada: 17/10/15 Postagens Recentes
I found a way to get things work, but with two differences with official docs:
It worked to create a workspace too:
I don't know if this is the best approach possible, but it works: so any suggestion/improvement, will be really appreciated.
- I didn't used JPM because I didn't find any documentation to set a proxy for it. In this way evey blade command works but the blade update one, because it relies on JPM.
- I didn't installed the blade command globally but I used the jar file every time beause I found too many issues with read/write permissions
wget https://liferay-test-01.ci.cloudbees.com/job/liferay-blade-cli/lastSuccessfulBuild/artifact/com.liferay.blade.cli/generated/com.liferay.blade.cli.jar
export JAVA_HOME=/my/path/to/jre-1.8
export ANT_HOME=/my/path/to/ant
export PATH=$JAVA_HOME/bin:$ANT_HOME/bin:$PATH
To create an mvcportlet, for example I ran:java -Dhttp.proxyHost=myproxy.it -Dhttp.proxyPort=3128 -Dhttps.proxyHost=myproxy.it -Dhttps.proxyPort=3128 -jar com.liferay.blade.cli.jar create -t mvcportlet helloworld
and that worked fine.It worked to create a workspace too:
java -Dhttp.proxyHost=myproxy.it -Dhttp.proxyPort=3128 -Dhttps.proxyHost=myproxy.it -Dhttps.proxyPort=3128 -jar com.liferay.blade.cli.jar init myworkspace
I don't know if this is the best approach possible, but it works: so any suggestion/improvement, will be really appreciated.
Gregory Amerson, modificado 7 Anos atrás.
RE: Blade CLI hangs on downloads
Liferay Legend Postagens: 1123 Data de Entrada: 16/02/10 Postagens Recentes
Thanks for posting with this information. If you have proxy issues (we are going to work on this in the future) you can also install JPM and then download the blade cli jar and install it locally with jpm (to avoid having to do all of the manual path settings, etc)
Hope this helps!
- install jpm
- download the com.liferay.blade.cli.jar from release repo: http://releases.liferay.com/tools/blade-cli/1.0.0.201604152315/plugins/com.liferay.blade.cli_1.0.0.201604152315.jar
- Install cli jar with jpm: $ sudo jpm install -fl /path/to/downloaded/com.liferay.blade.cli.jar
Hope this helps!
Alessandro Candini, modificado 7 Anos atrás.
RE: Blade CLI hangs on downloads
Regular Member Postagens: 130 Data de Entrada: 17/10/15 Postagens Recentes
Thank you Gregory, I will give it a try!
Gregory Amerson, modificado 7 Anos atrás.
RE: Blade CLI hangs on downloads
Liferay Legend Postagens: 1123 Data de Entrada: 16/02/10 Postagens Recentesdarren rose:
Gregory Amerson:Thanks for posting with this information. If you have proxy issues (we are going to work on this in the future) you can also install JPM and then download the blade cli jar and install it locally with jpm (to avoid having to do all of the manual path settings, etc)
- install jpm
- download the com.liferay.blade.cli.jar from release repo: http://releases.liferay.com/tools/blade-cli/1.0.0.201604152315/plugins/com.liferay.blade.cli_1.0.0.201604152315.jar
- Install cli jar with jpm: $ sudo jpm install -fl /path/to/downloaded/com.liferay.blade.cli.jar
Hope this helps!
Hi Greg, I have jpm and blade installed, but I need to specify proxy settings, I think, do I create a blade.properties file? If so, which folder do I place this in? thanks
Hello Darren,
You can do this by uninstalling blade using jpm and then reinstall blade with jpm and specify proxy settings to use
$ $ jpm install -fl --jvmargs "-Dhttp.proxyHost=10.0.0.100 -Dhttp.proxyPort=8800" /path/to/blade.cli.jar
Andy Wu, modificado 7 Anos atrás.
RE: Blade CLI hangs on downloads
Regular Member Postagens: 195 Data de Entrada: 05/05/15 Postagens Recentes
hey Greg , I got this when run your command:
D:\>jpm install -fl --jvmargs "-Dhttp.proxyHost=localhost -Dhttp.proxyPort=8008" com.liferay.blade.cli.jar
NAME
install - Install a jar into the repository. If the jar
defines a number of headers it can also be
installed as a command and/or a service. If not,
additional information such as the name of the
command and/or the main class must be specified
with the appropriate flags.
SYNOPSIS
install [options] <command|service>
OPTIONS
[ -f, --force ] - Force overwrite of existing command
[ -i, --ignore ] - Install jar but do not look for a command in the
jar
[ -j, --jvmargs <string> ] - Provide or override the JVM arguments
[ -l, --local ] - Install jar without resolving dependencies with
http://www.jpm4j.org
[ -m, --main <string> ] - Provide the name of the main class used to
launch this command or service in fully
qualified form, e.g. aQute.main.Main
[ -n, --name <string> ] - Provide the name of the command or service
[ -t, --title <string> ] - Provide the title of the command or service
[ -T, --trace ] - Collect permission requests and print them at
the end of a run. This can provide detailed
information about what resources the command is
using.
[ -w, --windows ] - Java is default started in console mode, you can
specify to start it in windows mode (or javaw)
Error
0. Missing argument command|service,</string></string></string></string></command|service>
Andy Wu, modificado 7 Anos atrás.
RE: Blade CLI hangs on downloads
Regular Member Postagens: 195 Data de Entrada: 05/05/15 Postagens Recentes
o I see ! it is a bug in bnd , I will send a pr to them.
aQute.jpm.platform.Windows.java
should be:
aQute.jpm.platform.Windows.java
if (data.jvmArgs != null && data.jvmArgs.length() != 0) {
String parts[] = data.jvmArgs.split("\\s+");
for (int i = 0; i < parts.length; i++)
pw.printf("vmarg.%d=%s%n", i, data.jvmArgs);
}
should be:
if (data.jvmArgs != null && data.jvmArgs.length() != 0) {
String parts[] = data.jvmArgs.split("\\s+");
for (int i = 0; i < parts.length; i++)
pw.printf("vmarg.%d=%s%n", i+1, parts[i]);
}
Andy Wu, modificado 7 Anos atrás.
RE: Blade CLI hangs on downloads
Regular Member Postagens: 195 Data de Entrada: 05/05/15 Postagens Recentes
also I found a bug in winrun4j , it can't pass parameters with "-" prefix , for example :
jpm install -f -j "-Dhttp.proxyHost=localhost" -l blade.jar
and then the jpm will not receive the "-Dhttp.proxyHost=localhost" parameter and will not set them into blade.ini file vmarg.1 block
so I am trying to fix it in winrun4j .
jpm install -f -j "-Dhttp.proxyHost=localhost" -l blade.jar
and then the jpm will not receive the "-Dhttp.proxyHost=localhost" parameter and will not set them into blade.ini file vmarg.1 block
so I am trying to fix it in winrun4j .
darren rose, modificado 7 Anos atrás.
RE: Blade CLI hangs on downloads
Regular Member Postagens: 215 Data de Entrada: 04/04/15 Postagens Recentes
now I experience the following when running gradle tasks
What went wrong:
A problem occurred evaluating settings 'blade-workspace'.
> Failed to apply plugin [id 'com.liferay.workspace']
> Could not create an instance of type com.liferay.gradle.plugins.workspace.WorkspaceExtension_Decorated.
What went wrong:
A problem occurred evaluating settings 'blade-workspace'.
> Failed to apply plugin [id 'com.liferay.workspace']
> Could not create an instance of type com.liferay.gradle.plugins.workspace.WorkspaceExtension_Decorated.
Gregory Amerson, modificado 7 Anos atrás.
RE: Blade CLI hangs on downloads
Liferay Legend Postagens: 1123 Data de Entrada: 16/02/10 Postagens Recentes
Hey Darren,
Can you post the output of
Can you post the output of
blade version
? Also can you post the command that you are running to get this error? Also make sure to use the wrapper instead of your native gradle.
Haseena Begum, modificado 7 Anos atrás.
RE: Blade CLI hangs on downloads
New Member Postagens: 12 Data de Entrada: 20/05/16 Postagens Recentes
Thank you Gregory Amerson! It was helpful
Andy Wu, modificado 7 Anos atrás.
RE: Blade CLI hangs on downloads
Regular Member Postagens: 195 Data de Entrada: 05/05/15 Postagens Recentes
yeah , the
https://cdn.lfrs.sl/repository.liferay.com/nexus/content/groups/public
could only be resolved by gradle
https://cdn.lfrs.sl/repository.liferay.com/nexus/content/groups/public
could only be resolved by gradle
darren rose, modificado 7 Anos atrás.
RE: Blade CLI hangs on downloads
Regular Member Postagens: 215 Data de Entrada: 04/04/15 Postagens RecentesAndy Wu:
yeah , the
https://cdn.lfrs.sl/repository.liferay.com/nexus/content/groups/public
could only be resolved by gradle
and that didn't resolve my dependencies
Andy Wu, modificado 7 Anos atrás.
RE: Blade CLI hangs on downloads
Regular Member Postagens: 195 Data de Entrada: 05/05/15 Postagens Recentes
O sorry ,I didn't see your post above , could you zip your sample project and attach it here ? so I can reproduce it .
darren rose, modificado 7 Anos atrás.
RE: Blade CLI hangs on downloads
Regular Member Postagens: 215 Data de Entrada: 04/04/15 Postagens RecentesAndy Wu:
O sorry ,I didn't see your post above , could you zip your sample project and attach it here ? so I can reproduce it .
Anexos:
Andy Wu, modificado 7 Anos atrás.
RE: Blade CLI hangs on downloads
Regular Member Postagens: 195 Data de Entrada: 05/05/15 Postagens Recentes
hey , I run into some errors in my local machine , but not the same as yours. Can you change your com.liferay.gradle.plugins.workspace to 1.0.35 and try again ?(edit settings.gradle line 3)
darren rose, modificado 7 Anos atrás.
RE: Blade CLI hangs on downloads
Regular Member Postagens: 215 Data de Entrada: 04/04/15 Postagens RecentesAndy Wu:
hey , I run into some errors in my local machine , but not the same as yours. Can you change your com.liferay.gradle.plugins.workspace to 1.0.35 and try again ?(edit settings.gradle line 3)
some progress, I now see:
:modules:portlet:compileJava
Download https://cdn.lfrs.sl/repository.liferay.com/nexus/content/groups/public/org/osgi/org.osgi.compendium/5.0.0/org.osgi.compendium-5.0.0.jar
/home/scs1786/Workspace/blade-workspace/modules/portlet/src/main/java/portlet/Portlet.java:5: error: Portlet is already defined in this compilation unit
import javax.portlet.Portlet;
^
1 error
:modules:portlet:compileJava FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':modules:portlet:compileJava'.
> Compilation failed; see the compiler error output for details.
Andy Wu, modificado 7 Anos atrás.
RE: Blade CLI hangs on downloads
Regular Member Postagens: 195 Data de Entrada: 05/05/15 Postagens Recentes
I thinks it maybe your network problem , that causes the dependencies can't be download. Could you confirm that ?
darren rose, modificado 7 Anos atrás.
RE: Blade CLI hangs on downloads
Regular Member Postagens: 215 Data de Entrada: 04/04/15 Postagens Recentes
yes, weirdly, I have to specify proxy settings on the gradle command line, even though I have a gradle.properties file, anyways, yes, resolved, thanks