Author: psrna
Date: 2012-10-01 07:00:24 -0400 (Mon, 01 Oct 2012)
New Revision: 44169
Modified:
trunk/tests/scripts/installation-updates/src/main/groovy/getAndInstallEclipse.groovy
Log:
* added mirrorSite, use -Dmirror="your mirror site" to download eclipse from
another eclipse mirror site.
Modified:
trunk/tests/scripts/installation-updates/src/main/groovy/getAndInstallEclipse.groovy
===================================================================
---
trunk/tests/scripts/installation-updates/src/main/groovy/getAndInstallEclipse.groovy 2012-10-01
10:56:39 UTC (rev 44168)
+++
trunk/tests/scripts/installation-updates/src/main/groovy/getAndInstallEclipse.groovy 2012-10-01
11:00:24 UTC (rev 44169)
@@ -5,7 +5,9 @@
String eclipseFlavour = System.properties['eclipseFlavour'] != null ?
System.properties['eclipseFlavour'] : "jee";
String releaseTrainId = System.properties['releaseTrainId'] != null ?
System.properties['releaseTrainId'] : "juno";
String versionLabel = System.properties['versionLabel'] != null ?
System.properties['versionLabel'] : "R";
+String mirrorSite = System.properties['mirror'] != null ?
System.properties['mirror'] :
"http://www.eclipse.org/downloads/download.php?r=1&file=/technology/epp/downloads/release";
+
if (!eclipseCacheDirectory.canWrite()) {
println ("WARNING: You can't write to " + eclipseCacheDirectory);
println ("WARNING: Script may fail in case of cache miss");
@@ -30,8 +32,8 @@
String archLabel = System.properties['os.arch'].contains("64") ?
"-x86_64" : "";
String eclipseArchive = "eclipse-" + eclipseFlavour + "-" +
releaseTrainId + "-" + osLabel + archLabel + "." + fileExtension;
-String downloadURL =
"http://www.eclipse.org/downloads/download.php?r=1&file=/technology/epp/downloads/release/"
+ releaseTrainId + "/" + versionLabel +"/" + eclipseArchive;
-println("Will retrieve " + eclipseArchive)
+String downloadURL = mirrorSite + "/" + releaseTrainId + "/" +
versionLabel +"/" + eclipseArchive;
+println("Will retrieve " + eclipseArchive + " from mirror site: " +
mirrorSite);
File cachedFile = new File(eclipseCacheDirectory, eclipseArchive);
if (!cachedFile.isFile()) {
@@ -52,4 +54,4 @@
new AntBuilder().untar(
src: tarFile.getAbsolutePath(),
dest: new File(".").getAbsolutePath());
-}
\ No newline at end of file
+}
Show replies by date