[573852] Declare support in Tomcat 10 for jst.web 5.0
Include commons-daemon in Tomcat launch classpath
Update Tomcat license and download URLs to https
diff --git a/plugins/org.eclipse.jst.server.tomcat.core/plugin.xml b/plugins/org.eclipse.jst.server.tomcat.core/plugin.xml
index 738c05f..603c8fb 100644
--- a/plugins/org.eclipse.jst.server.tomcat.core/plugin.xml
+++ b/plugins/org.eclipse.jst.server.tomcat.core/plugin.xml
@@ -646,132 +646,132 @@
<extension point="org.eclipse.wst.server.core.installableRuntimes">
<runtime
id="org.eclipse.jst.server.tomcat.runtime.32"
- licenseUrl="http://www.apache.org/licenses/LICENSE-1.1"
- archiveUrl="http://archive.apache.org/dist/tomcat/tomcat-3/archive/v3.2.4/bin/jakarta-tomcat-3.2.4.zip"
+ licenseUrl="https://www.apache.org/licenses/LICENSE-1.1"
+ archiveUrl="https://archive.apache.org/dist/tomcat/tomcat-3/archive/v3.2.4/bin/jakarta-tomcat-3.2.4.zip"
archivePath="jakarta-tomcat-3.2.4"
os="win32"/>
<runtime
id="org.eclipse.jst.server.tomcat.runtime.32"
licenseUrl="http://www.apache.org/licenses/LICENSE-1.1"
- archiveUrl="http://archive.apache.org/dist/tomcat/tomcat-3/archive/v3.2.4/bin/jakarta-tomcat-3.2.4.tar.gz"
+ archiveUrl="https://archive.apache.org/dist/tomcat/tomcat-3/archive/v3.2.4/bin/jakarta-tomcat-3.2.4.tar.gz"
archivePath="jakarta-tomcat-3.2.4"
os="linux,macosx"/>
<runtime
id="org.eclipse.jst.server.tomcat.runtime.40"
licenseUrl="http://www.apache.org/licenses/LICENSE-1.1"
- archiveUrl="http://archive.apache.org/dist/tomcat/tomcat-4/archive/v4.0.6/bin/jakarta-tomcat-4.0.6.zip"
+ archiveUrl="https://archive.apache.org/dist/tomcat/tomcat-4/archive/v4.0.6/bin/jakarta-tomcat-4.0.6.zip"
archivePath="jakarta-tomcat-4.0.6"
os="win32"/>
<runtime
id="org.eclipse.jst.server.tomcat.runtime.40"
licenseUrl="http://www.apache.org/licenses/LICENSE-1.1"
- archiveUrl="http://archive.apache.org/dist/tomcat/tomcat-4/archive/v4.0.6/bin/jakarta-tomcat-4.0.6.tar.gz"
+ archiveUrl="https://archive.apache.org/dist/tomcat/tomcat-4/archive/v4.0.6/bin/jakarta-tomcat-4.0.6.tar.gz"
archivePath="jakarta-tomcat-4.0.6"
os="linux,macosx"/>
<runtime
id="org.eclipse.jst.server.tomcat.runtime.41"
- licenseUrl="http://www.apache.org/licenses/LICENSE-2.0.txt"
- archiveUrl="http://archive.apache.org/dist/tomcat/tomcat-4/v4.1.40/bin/apache-tomcat-4.1.40.zip"
+ licenseUrl="https://www.apache.org/licenses/LICENSE-2.0.txt"
+ archiveUrl="https://archive.apache.org/dist/tomcat/tomcat-4/v4.1.40/bin/apache-tomcat-4.1.40.zip"
archivePath="apache-tomcat-4.1.40"
archiveSize="11210581"
fileCount="1425"
os="win32"/>
<runtime
id="org.eclipse.jst.server.tomcat.runtime.41"
- licenseUrl="http://www.apache.org/licenses/LICENSE-2.0.txt"
- archiveUrl="http://archive.apache.org/dist/tomcat/tomcat-4/v4.1.40/bin/apache-tomcat-4.1.40.tar.gz"
+ licenseUrl="https://www.apache.org/licenses/LICENSE-2.0.txt"
+ archiveUrl="https://archive.apache.org/dist/tomcat/tomcat-4/v4.1.40/bin/apache-tomcat-4.1.40.tar.gz"
archivePath="apache-tomcat-4.1.40"
archiveSize="9358737"
fileCount="1425"
os="linux,macosx"/>
<runtime
id="org.eclipse.jst.server.tomcat.runtime.50"
- licenseUrl="http://www.apache.org/licenses/LICENSE-2.0.txt"
- archiveUrl="http://archive.apache.org/dist/tomcat/tomcat-5/v5.0.28/bin/jakarta-tomcat-5.0.28.zip"
+ licenseUrl="https://www.apache.org/licenses/LICENSE-2.0.txt"
+ archiveUrl="https://archive.apache.org/dist/tomcat/tomcat-5/v5.0.28/bin/jakarta-tomcat-5.0.28.zip"
archivePath="jakarta-tomcat-5.0.28"
os="win32"/>
<runtime
id="org.eclipse.jst.server.tomcat.runtime.50"
- licenseUrl="http://www.apache.org/licenses/LICENSE-2.0.txt"
- archiveUrl="http://archive.apache.org/dist/tomcat/tomcat-5/v5.0.28/bin/jakarta-tomcat-5.0.28.tar.gz"
+ licenseUrl="https://www.apache.org/licenses/LICENSE-2.0.txt"
+ archiveUrl="https://archive.apache.org/dist/tomcat/tomcat-5/v5.0.28/bin/jakarta-tomcat-5.0.28.tar.gz"
archivePath="jakarta-tomcat-5.0.28"
os="linux,macosx"/>
<runtime
id="org.eclipse.jst.server.tomcat.runtime.55"
- licenseUrl="http://www.apache.org/licenses/LICENSE-2.0.txt"
- archiveUrl="http://archive.apache.org/dist/tomcat/tomcat-5/v5.5.33/bin/apache-tomcat-5.5.33.zip"
+ licenseUrl="https://www.apache.org/licenses/LICENSE-2.0.txt"
+ archiveUrl="https://archive.apache.org/dist/tomcat/tomcat-5/v5.5.33/bin/apache-tomcat-5.5.33.zip"
archivePath="apache-tomcat-5.5.33"
archiveSize="9081893"
fileCount="840"
os="win32"/>
<runtime
id="org.eclipse.jst.server.tomcat.runtime.55"
- licenseUrl="http://www.apache.org/licenses/LICENSE-2.0.txt"
- archiveUrl="http://archive.apache.org/dist/tomcat/tomcat-5/v5.5.33/bin/apache-tomcat-5.5.33.tar.gz"
+ licenseUrl="https://www.apache.org/licenses/LICENSE-2.0.txt"
+ archiveUrl="https://archive.apache.org/dist/tomcat/tomcat-5/v5.5.33/bin/apache-tomcat-5.5.33.tar.gz"
archivePath="apache-tomcat-5.5.33"
archiveSize="8205713"
fileCount="840"
os="linux,macosx"/>
<runtime
id="org.eclipse.jst.server.tomcat.runtime.60"
- licenseUrl="http://www.apache.org/licenses/LICENSE-2.0.txt"
- archiveUrl="http://archive.apache.org/dist/tomcat/tomcat-6/v6.0.37/bin/apache-tomcat-6.0.37-windows-x86.zip"
+ licenseUrl="https://www.apache.org/licenses/LICENSE-2.0.txt"
+ archiveUrl="https://archive.apache.org/dist/tomcat/tomcat-6/v6.0.37/bin/apache-tomcat-6.0.37-windows-x86.zip"
archivePath="apache-tomcat-6.0.37"
archiveSize="7912624"
fileCount="496"
os="win32"/>
<runtime
id="org.eclipse.jst.server.tomcat.runtime.60"
- licenseUrl="http://www.apache.org/licenses/LICENSE-2.0.txt"
- archiveUrl="http://archive.apache.org/dist/tomcat/tomcat-6/v6.0.37/bin/apache-tomcat-6.0.37.tar.gz"
+ licenseUrl="https://www.apache.org/licenses/LICENSE-2.0.txt"
+ archiveUrl="https://archive.apache.org/dist/tomcat/tomcat-6/v6.0.37/bin/apache-tomcat-6.0.37.tar.gz"
archivePath="apache-tomcat-6.0.37"
archiveSize="6885442"
fileCount="492"
os="linux,macosx"/>
<runtime
id="org.eclipse.jst.server.tomcat.runtime.70"
- licenseUrl="http://www.apache.org/licenses/LICENSE-2.0.txt"
- archiveUrl="http://archive.apache.org/dist/tomcat/tomcat-7/v7.0.47/bin/apache-tomcat-7.0.47-windows-x86.zip"
+ licenseUrl="https://www.apache.org/licenses/LICENSE-2.0.txt"
+ archiveUrl="https://archive.apache.org/dist/tomcat/tomcat-7/v7.0.47/bin/apache-tomcat-7.0.47-windows-x86.zip"
archivePath="apache-tomcat-7.0.47"
archiveSize="9418080"
fileCount="633"
os="win32"/>
<runtime
id="org.eclipse.jst.server.tomcat.runtime.70"
- licenseUrl="http://www.apache.org/licenses/LICENSE-2.0.txt"
- archiveUrl="http://archive.apache.org/dist/tomcat/tomcat-7/v7.0.47/bin/apache-tomcat-7.0.47.tar.gz"
+ licenseUrl="https://www.apache.org/licenses/LICENSE-2.0.txt"
+ archiveUrl="https://archive.apache.org/dist/tomcat/tomcat-7/v7.0.47/bin/apache-tomcat-7.0.47.tar.gz"
archivePath="apache-tomcat-7.0.47"
archiveSize="8234674"
fileCount="629"
os="linux,macosx"/>
<runtime
id="org.eclipse.jst.server.tomcat.runtime.80"
- licenseUrl="http://www.apache.org/licenses/LICENSE-2.0.txt"
- archiveUrl="http://archive.apache.org/dist/tomcat/tomcat-8/v8.0.36/bin/apache-tomcat-8.0.36-windows-x86.zip"
+ licenseUrl="https://www.apache.org/licenses/LICENSE-2.0.txt"
+ archiveUrl="https://archive.apache.org/dist/tomcat/tomcat-8/v8.0.36/bin/apache-tomcat-8.0.36-windows-x86.zip"
archivePath="apache-tomcat-8.0.36"
archiveSize="10562332"
fileCount="645"
os="win32"/>
<runtime
id="org.eclipse.jst.server.tomcat.runtime.80"
- licenseUrl="http://www.apache.org/licenses/LICENSE-2.0.txt"
- archiveUrl="http://archive.apache.org/dist/tomcat/tomcat-8/v8.0.53/bin/apache-tomcat-8.0.53.tar.gz"
+ licenseUrl="https://www.apache.org/licenses/LICENSE-2.0.txt"
+ archiveUrl="https://archive.apache.org/dist/tomcat/tomcat-8/v8.0.53/bin/apache-tomcat-8.0.53.tar.gz"
archivePath="apache-tomcat-8.0.53"
archiveSize="9455895"
fileCount="643"
os="linux,macosx"/>
<runtime
id="org.eclipse.jst.server.tomcat.runtime.85"
- licenseUrl="http://www.apache.org/licenses/LICENSE-2.0.txt"
- archiveUrl="http://archive.apache.org/dist/tomcat/tomcat-8/v8.5.61/bin/apache-tomcat-8.5.61.tar.gz"
+ licenseUrl="https://www.apache.org/licenses/LICENSE-2.0.txt"
+ archiveUrl="https://archive.apache.org/dist/tomcat/tomcat-8/v8.5.61/bin/apache-tomcat-8.5.61.tar.gz"
archivePath="apache-tomcat-8.5.61"
archiveSize="10492067"
fileCount="625"
os="linux,macosx"/>
<runtime
id="org.eclipse.jst.server.tomcat.runtime.85"
- licenseUrl="http://www.apache.org/licenses/LICENSE-2.0.txt"
- archiveUrl="http://archive.apache.org/dist/tomcat/tomcat-8/v8.5.61/bin/apache-tomcat-8.5.61-windows-x86.zip"
+ licenseUrl="https://www.apache.org/licenses/LICENSE-2.0.txt"
+ archiveUrl="https://archive.apache.org/dist/tomcat/tomcat-8/v8.5.61/bin/apache-tomcat-8.5.61-windows-x86.zip"
archivePath="apache-tomcat-8.5.61"
archiveSize="11538389"
fileCount="627"
@@ -779,16 +779,16 @@
<runtime
id="org.eclipse.jst.server.tomcat.runtime.90"
- licenseUrl="http://www.apache.org/licenses/LICENSE-2.0.txt"
- archiveUrl="http://archive.apache.org/dist/tomcat/tomcat-9/v9.0.46/bin/apache-tomcat-9.0.46.tar.gz"
+ licenseUrl="https://www.apache.org/licenses/LICENSE-2.0.txt"
+ archiveUrl="https://archive.apache.org/dist/tomcat/tomcat-9/v9.0.46/bin/apache-tomcat-9.0.46.tar.gz"
archivePath="apache-tomcat-9.0.46"
archiveSize="11496577"
fileCount="639"
os="linux,macosx"/>
<runtime
id="org.eclipse.jst.server.tomcat.runtime.90"
- licenseUrl="http://www.apache.org/licenses/LICENSE-2.0.txt"
- archiveUrl="http://archive.apache.org/dist/tomcat/tomcat-9/v9.0.46/bin/apache-tomcat-9.0.46.zip"
+ licenseUrl="https://www.apache.org/licenses/LICENSE-2.0.txt"
+ archiveUrl="https://archive.apache.org/dist/tomcat/tomcat-9/v9.0.46/bin/apache-tomcat-9.0.46.zip"
archivePath="apache-tomcat-9.0.46"
archiveSize="12037488"
fileCount="639"
@@ -796,16 +796,16 @@
<runtime
id="org.eclipse.jst.server.tomcat.runtime.100"
- licenseUrl="http://www.apache.org/licenses/LICENSE-2.0.txt"
- archiveUrl="http://archive.apache.org/dist/tomcat/tomcat-10/v10.0.6/bin/apache-tomcat-10.0.6.tar.gz"
+ licenseUrl="https://www.apache.org/licenses/LICENSE-2.0.txt"
+ archiveUrl="https://archive.apache.org/dist/tomcat/tomcat-10/v10.0.6/bin/apache-tomcat-10.0.6.tar.gz"
archivePath="apache-tomcat-10.0.6"
archiveSize="11822805"
fileCount="642"
os="linux,macosx"/>
<runtime
id="org.eclipse.jst.server.tomcat.runtime.100"
- licenseUrl="http://www.apache.org/licenses/LICENSE-2.0.txt"
- archiveUrl="http://archive.apache.org/dist/tomcat/tomcat-10/v10.0.6/bin/apache-tomcat-10.0.6.zip"
+ licenseUrl="https://www.apache.org/licenses/LICENSE-2.0.txt"
+ archiveUrl="https://archive.apache.org/dist/tomcat/tomcat-10/v10.0.6/bin/apache-tomcat-10.0.6.zip"
archivePath="apache-tomcat-10.0.6"
archiveSize="12367163"
fileCount="642"
diff --git a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Messages.properties b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Messages.properties
index 26d2c95..3fe891c 100644
--- a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Messages.properties
+++ b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Messages.properties
@@ -1,5 +1,5 @@
###############################################################################
-# Copyright (c) 2004, 2020 IBM Corporation and others.
+# Copyright (c) 2004, 2021 IBM Corporation and others.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License 2.0
# which accompanies this distribution, and is available at
@@ -101,7 +101,7 @@
errorSpec80=Tomcat version 8.0 only supports J2EE 1.2, 1.3, 1.4, and Java EE 5, 6, and 7 Web modules
errorSpec85=Tomcat version 8.5 only supports J2EE 1.2, 1.3, 1.4, and Java EE 5, 6, and 7 Web modules
errorSpec90=Tomcat version 9.0 only supports J2EE 1.2, 1.3, 1.4, and Java EE 5, 6, 7, and 8 Web modules
-errorSpec100=Tomcat version 10.0 only supports J2EE 1.2, 1.3, 1.4, and Java EE 5, 6, 7, 8, and 9 Web modules
+errorSpec100=Tomcat version 10.0 only supports J2EE 1.2, 1.3, 1.4, and Java EE 5, 6, 7, 8, and Jakarta EE 9 Web modules
errorDuplicateContextRoot=Two or more Web modules defined in the configuration have the same context root ({0}). \
To start this server you will need to remove the duplicate(s).
errorCouldNotLoadContextXml=Could not load the context configuration for the {0} context due to a syntax error or other exception.
diff --git a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat100Handler.java b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat100Handler.java
index 530d4d4..8364b6b 100644
--- a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat100Handler.java
+++ b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat100Handler.java
@@ -1,5 +1,5 @@
/**********************************************************************
- * Copyright (c) 2020 IBM Corporation and others.
+ * Copyright (c) 2020, 2021 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
@@ -55,6 +55,11 @@
if (binPath.toFile().exists()) {
IPath path = binPath.append("bootstrap.jar");
cp.add(JavaRuntime.newArchiveRuntimeClasspathEntry(path));
+ // Add commons-daemon.jar if it exists
+ path = binPath.append("commons-daemon.jar");
+ if (path.toFile().exists()) {
+ cp.add(JavaRuntime.newArchiveRuntimeClasspathEntry(path));
+ }
// Add tomcat-juli.jar if it exists
path = binPath.append("tomcat-juli.jar");
if (path.toFile().exists()) {
@@ -115,7 +120,7 @@
public IStatus canAddModule(IModule module) {
String version = module.getModuleType().getVersion();
if ("2.2".equals(version) || "2.3".equals(version) || "2.4".equals(version) || "2.5".equals(version)
- || "3.0".equals(version) || "3.1".equals(version) || "4.0".equals(version))
+ || "3.0".equals(version) || "3.1".equals(version) || "4.0".equals(version) || "5.0".equals(version))
return Status.OK_STATUS;
return new Status(IStatus.ERROR, TomcatPlugin.PLUGIN_ID, 0, Messages.errorSpec100, null);
diff --git a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat80Handler.java b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat80Handler.java
index ba2c1fb..90d2b12 100644
--- a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat80Handler.java
+++ b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat80Handler.java
@@ -1,5 +1,5 @@
/**********************************************************************
- * Copyright (c) 2013, 2017 IBM Corporation and others.
+ * Copyright (c) 2013, 2021 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
@@ -55,6 +55,11 @@
if (binPath.toFile().exists()) {
IPath path = binPath.append("bootstrap.jar");
cp.add(JavaRuntime.newArchiveRuntimeClasspathEntry(path));
+ // Add commons-daemon.jar if it exists
+ path = binPath.append("commons-daemon.jar");
+ if (path.toFile().exists()) {
+ cp.add(JavaRuntime.newArchiveRuntimeClasspathEntry(path));
+ }
// Add tomcat-juli.jar if it exists
path = binPath.append("tomcat-juli.jar");
if (path.toFile().exists()) {
diff --git a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat85Handler.java b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat85Handler.java
index a87395e..7ac2f23 100644
--- a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat85Handler.java
+++ b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat85Handler.java
@@ -1,5 +1,5 @@
/**********************************************************************
- * Copyright (c) 2016, 2017 IBM Corporation and others.
+ * Copyright (c) 2016, 2021 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
@@ -55,6 +55,11 @@
if (binPath.toFile().exists()) {
IPath path = binPath.append("bootstrap.jar");
cp.add(JavaRuntime.newArchiveRuntimeClasspathEntry(path));
+ // Add commons-daemon.jar if it exists
+ path = binPath.append("commons-daemon.jar");
+ if (path.toFile().exists()) {
+ cp.add(JavaRuntime.newArchiveRuntimeClasspathEntry(path));
+ }
// Add tomcat-juli.jar if it exists
path = binPath.append("tomcat-juli.jar");
if (path.toFile().exists()) {
diff --git a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat90Handler.java b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat90Handler.java
index 902cdce..c8c8376 100644
--- a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat90Handler.java
+++ b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat90Handler.java
@@ -1,5 +1,5 @@
/**********************************************************************
- * Copyright (c) 2016, 2018 IBM Corporation and others.
+ * Copyright (c) 2016, 2021 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
@@ -55,6 +55,11 @@
if (binPath.toFile().exists()) {
IPath path = binPath.append("bootstrap.jar");
cp.add(JavaRuntime.newArchiveRuntimeClasspathEntry(path));
+ // Add commons-daemon.jar if it exists
+ path = binPath.append("commons-daemon.jar");
+ if (path.toFile().exists()) {
+ cp.add(JavaRuntime.newArchiveRuntimeClasspathEntry(path));
+ }
// Add tomcat-juli.jar if it exists
path = binPath.append("tomcat-juli.jar");
if (path.toFile().exists()) {
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/InstallableRuntime2.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/InstallableRuntime2.java
index ee115b8..dbd770c 100644
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/InstallableRuntime2.java
+++ b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/InstallableRuntime2.java
@@ -14,6 +14,7 @@
import java.io.*;
import java.net.URL;
+import java.net.URLConnection;
import java.util.zip.GZIPInputStream;
import java.util.zip.ZipEntry;
import java.util.zip.ZipInputStream;
@@ -114,7 +115,13 @@
return null;
url = new URL(licenseURL);
- InputStream in = url.openStream();
+ URLConnection connection = url.openConnection();
+ String possibleNewURL = connection.getHeaderField("Location");
+ while (possibleNewURL != null) {
+ connection = new URL(possibleNewURL).openConnection();
+ possibleNewURL = connection.getHeaderField("Location");
+ }
+ InputStream in = connection.getInputStream();
out = new ByteArrayOutputStream();
copyWithSize(in, out, null, 0);
return new String(out.toByteArray());