-
Type:
Task
-
Status: Closed
-
Priority:
Trivial
-
Resolution: Completed
-
Affects Version/s: 7.0.X, 7.1.X, 7.2.X, Master
-
Fix Version/s: 7.0.X, 7.1.X, 7.2.10 DXP FP17, 7.2.10.6 DXP SP6, 7.2.X
-
Component/s: Dev Tools > Portal Build Env
-
Branch Version/s:7.2.x, 7.1.x, 7.0.x
-
Backported to Branch:Committed
-
Git Pull Request:
When you execute ant snapshot-bundle, it will always try to download it from default mirror:
mirrors.hostname=mirrors.lax.liferay.com
In case you are working from home and don't have access to that server, this causes some minor problems: build process will retry using the mirror after 30 seconds:
[mirrors-get] Unable to connect to http://mirrors.lax.liferay.com/files.liferay.com/private/ee/portal/snapshot-master-private/latest/liferay-portal-tomcat-master-private.7z.sha256, will retry in 30 seconds.
In order to save that 30 seconds, if you want to disable the mirror usage and you configure it with an empty value:
mirrors.hostname=
And you execute ant snapshot-bundle, following error is produced:
snapshot-bundle: [mirrors-get] Downloading http:/files.liferay.com/private/ee/portal/snapshot-master-private/latest/liferay-portal-tomcat-master-private.7z.sha256 to /home/jorge/.liferay/mirrors/files.liferay.com/private/ee/portal/snapshot-master-private/latest/liferay-portal-tomcat-master-private.7z.sha256. BUILD FAILED /home/jorge/code/portal-master/build.xml:1045: java.lang.RuntimeException: java.lang.IllegalArgumentException: protocol = http host = null at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1512) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1498) at sun.net.www.protocol.http.HttpURLConnection.getHeaderField(HttpURLConnection.java:3097) at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:489) at com.liferay.ant.mirrors.get.MirrorsGetTask.openConnection(MirrorsGetTask.java:465) at com.liferay.ant.mirrors.get.MirrorsGetTask.toOutputStream(MirrorsGetTask.java:512) at com.liferay.ant.mirrors.get.MirrorsGetTask.toFile(MirrorsGetTask.java:493) at com.liferay.ant.mirrors.get.MirrorsGetTask._downloadFile(MirrorsGetTask.java:579) at com.liferay.ant.mirrors.get.MirrorsGetTask.downloadFile(MirrorsGetTask.java:279) at com.liferay.ant.mirrors.get.MirrorsGetTask.doExecute(MirrorsGetTask.java:242) at com.liferay.ant.mirrors.get.MirrorsGetTask.execute(MirrorsGetTask.java:48) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292) at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:99) at org.apache.tools.ant.Task.perform(Task.java:350) at org.apache.tools.ant.Target.execute(Target.java:449) at org.apache.tools.ant.Target.performTasks(Target.java:470) at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1391) at org.apache.tools.ant.Project.executeTarget(Project.java:1364) at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41) at org.apache.tools.ant.Project.executeTargets(Project.java:1254) at org.apache.tools.ant.Main.runBuild(Main.java:830) at org.apache.tools.ant.Main.startAnt(Main.java:223) at org.apache.tools.ant.launch.Launcher.run(Launcher.java:284) at org.apache.tools.ant.launch.Launcher.main(Launcher.java:101) Caused by: java.lang.IllegalArgumentException: protocol = http host = null at sun.net.spi.DefaultProxySelector.select(DefaultProxySelector.java:177) at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1156) at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1056) at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:990) at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1570) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1498) at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:480) ... 23 more
The expected behavior should be:
- It is possible to configure an empty mirrors.hostname
- In that situation, the mirror servers will be ignored and no error will be produced when you execute ant snapshot-bundle