I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit 316011e0 authored by zzz's avatar zzz
Browse files

Debian: Fix version detection of Tomcat 9 required for reproducible builds

parent 68567cb5
No related branches found
No related tags found
No related merge requests found
......@@ -39,7 +39,8 @@ import net.i2p.util.VersionComparator;
*/
public class JspC {
// First Tomcat version to support multiple threads and -threadCount arg
private static final String THREADS_VERSION = "8.5.33";
private static final String THREADS_VERSION_8 = "8.5.33";
private static final String THREADS_VERSION_9 = "9.0.11";
// if true, try to make web.xml reproducible
private static final boolean REPRODUCIBLE = Boolean.valueOf(System.getProperty("build.reproducible"));
// if true, we must get the Tomcat version out of the jasper jar's manifest
......@@ -109,8 +110,12 @@ public class JspC {
Attributes atts = attributes(JASPER_JAR);
if (atts != null) {
String ver = atts.getValue("Implementation-Version");
if (ver != null && ver.startsWith("8.")) {
supportsThreads = VersionComparator.comp(ver, THREADS_VERSION) >= 0;
if (ver != null) {
if (ver.startsWith("8.")) {
supportsThreads = VersionComparator.comp(ver, THREADS_VERSION_8) >= 0;
} else {
supportsThreads = VersionComparator.comp(ver, THREADS_VERSION_9) >= 0;
}
System.out.println("Found JspC version: " + ver + ", supports threads? " + supportsThreads);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment