forked from I2P_Developers/i2p.i2p
Jetty: Patch to fix console not starting on Java 11.0.9.1
Backport JavaVersion.java from Jetty 9.4.34 Jetty does not plan to fix in 9.3.x ref: https://github.com/eclipse/jetty.project/issues/5682 https://github.com/eclipse/jetty.project/issues/2284 http://zzz.i2p/topics/2991
This commit is contained in:
@ -175,13 +175,15 @@
|
|||||||
<copy preservelastmodified="true" file="${jetty.base}/lib/jetty-security-${jetty.ver}.jar" tofile="jettylib/jetty-security.jar" />
|
<copy preservelastmodified="true" file="${jetty.base}/lib/jetty-security-${jetty.ver}.jar" tofile="jettylib/jetty-security.jar" />
|
||||||
<copy preservelastmodified="true" file="${jetty.base}/lib/jetty-servlet-${jetty.ver}.jar" tofile="jettylib/jetty-servlet.jar" />
|
<copy preservelastmodified="true" file="${jetty.base}/lib/jetty-servlet-${jetty.ver}.jar" tofile="jettylib/jetty-servlet.jar" />
|
||||||
<copy preservelastmodified="true" file="${jetty.base}/lib/jetty-servlets-${jetty.ver}.jar" tofile="jettylib/jetty-servlets.jar" />
|
<copy preservelastmodified="true" file="${jetty.base}/lib/jetty-servlets-${jetty.ver}.jar" tofile="jettylib/jetty-servlets.jar" />
|
||||||
|
<!--
|
||||||
<copy preservelastmodified="true" file="${jetty.base}/lib/jetty-util-${jetty.ver}.jar" tofile="jettylib/jetty-util.jar" />
|
<copy preservelastmodified="true" file="${jetty.base}/lib/jetty-util-${jetty.ver}.jar" tofile="jettylib/jetty-util.jar" />
|
||||||
<!-- comment out above line and uncomment below and the patches section further down if we need patches
|
-->
|
||||||
|
<!-- comment out above line and uncomment below and the patches section further down if we need patches -->
|
||||||
<jar destfile="jettylib/jetty-util.jar" manifest="${jetty.base}/lib/jetty-util-${jetty.ver}.jar" filesetmanifest="mergewithoutmain" >
|
<jar destfile="jettylib/jetty-util.jar" manifest="${jetty.base}/lib/jetty-util-${jetty.ver}.jar" filesetmanifest="mergewithoutmain" >
|
||||||
<zipfileset excludes="**/RolloverFileOutputStream*.class" src="${jetty.base}/lib/jetty-util-${jetty.ver}.jar" />
|
<zipfileset excludes="**/JavaVersion.class" src="${jetty.base}/lib/jetty-util-${jetty.ver}.jar" />
|
||||||
<zipfileset src="build/jetty-util-patch.jar" />
|
<zipfileset src="build/jetty-util-patch.jar" />
|
||||||
</jar>
|
</jar>
|
||||||
-->
|
|
||||||
<copy preservelastmodified="true" file="${jetty.base}/lib/jetty-webapp-${jetty.ver}.jar" tofile="jettylib/jetty-webapp.jar" />
|
<copy preservelastmodified="true" file="${jetty.base}/lib/jetty-webapp-${jetty.ver}.jar" tofile="jettylib/jetty-webapp.jar" />
|
||||||
<copy preservelastmodified="true" file="${jetty.base}/lib/jetty-xml-${jetty.ver}.jar" tofile="jettylib/jetty-xml.jar" />
|
<copy preservelastmodified="true" file="${jetty.base}/lib/jetty-xml-${jetty.ver}.jar" tofile="jettylib/jetty-xml.jar" />
|
||||||
<jar destfile="jettylib/jetty-java5-threadpool.jar" >
|
<jar destfile="jettylib/jetty-java5-threadpool.jar" >
|
||||||
@ -464,8 +466,10 @@
|
|||||||
</target>
|
</target>
|
||||||
|
|
||||||
<!-- empty, uncomment below if needed -->
|
<!-- empty, uncomment below if needed -->
|
||||||
<target name="buildPatches" unless="${with-libjetty9-java}" />
|
|
||||||
<!--
|
<!--
|
||||||
|
<target name="buildPatches" unless="${with-libjetty9-java}" />
|
||||||
|
-->
|
||||||
|
|
||||||
<target name="buildPatches" depends="jarPatches" unless="${with-libjetty9-java}" />
|
<target name="buildPatches" depends="jarPatches" unless="${with-libjetty9-java}" />
|
||||||
|
|
||||||
<target name="compilePatches" unless="${with-libjetty9-java}" >
|
<target name="compilePatches" unless="${with-libjetty9-java}" >
|
||||||
@ -498,7 +502,6 @@
|
|||||||
</or>
|
</or>
|
||||||
</condition>
|
</condition>
|
||||||
</target>
|
</target>
|
||||||
-->
|
|
||||||
|
|
||||||
<target name="clean" >
|
<target name="clean" >
|
||||||
<delete dir="./build" />
|
<delete dir="./build" />
|
||||||
|
@ -0,0 +1,153 @@
|
|||||||
|
//
|
||||||
|
// ========================================================================
|
||||||
|
// Copyright (c) 1995-2020 Mort Bay Consulting Pty Ltd and others.
|
||||||
|
// ------------------------------------------------------------------------
|
||||||
|
// All rights reserved. This program and the accompanying materials
|
||||||
|
// are made available under the terms of the Eclipse Public License v1.0
|
||||||
|
// and Apache License v2.0 which accompanies this distribution.
|
||||||
|
//
|
||||||
|
// The Eclipse Public License is available at
|
||||||
|
// http://www.eclipse.org/legal/epl-v10.html
|
||||||
|
//
|
||||||
|
// The Apache License v2.0 is available at
|
||||||
|
// http://www.opensource.org/licenses/apache2.0.php
|
||||||
|
//
|
||||||
|
// You may elect to redistribute this code under either of these licenses.
|
||||||
|
// ========================================================================
|
||||||
|
//
|
||||||
|
|
||||||
|
package org.eclipse.jetty.util;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Java Version Utility class.
|
||||||
|
* <p>Parses java versions to extract a consistent set of version parts</p>
|
||||||
|
*/
|
||||||
|
public class JavaVersion
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Context attribute that can be set to target a different version of the jvm than the current runtime.
|
||||||
|
* Acceptable values should correspond to those returned by JavaVersion.getPlatform().
|
||||||
|
*/
|
||||||
|
public static final String JAVA_TARGET_PLATFORM = "org.eclipse.jetty.javaTargetPlatform";
|
||||||
|
|
||||||
|
public static final JavaVersion VERSION = parse(System.getProperty("java.version"));
|
||||||
|
|
||||||
|
public static JavaVersion parse(String v)
|
||||||
|
{
|
||||||
|
// $VNUM is a dot-separated list of integers of arbitrary length
|
||||||
|
String[] split = v.split("[^0-9]");
|
||||||
|
int len = Math.min(split.length, 3);
|
||||||
|
int[] version = new int[len];
|
||||||
|
for (int i = 0; i < len; i++)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
version[i] = Integer.parseInt(split[i]);
|
||||||
|
}
|
||||||
|
catch (Throwable e)
|
||||||
|
{
|
||||||
|
len = i - 1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return new JavaVersion(
|
||||||
|
v,
|
||||||
|
(version[0] >= 9 || len == 1) ? version[0] : version[1],
|
||||||
|
version[0],
|
||||||
|
len > 1 ? version[1] : 0,
|
||||||
|
len > 2 ? version[2] : 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
private final String version;
|
||||||
|
private final int platform;
|
||||||
|
private final int major;
|
||||||
|
private final int minor;
|
||||||
|
private final int micro;
|
||||||
|
|
||||||
|
private JavaVersion(String version, int platform, int major, int minor, int micro)
|
||||||
|
{
|
||||||
|
this.version = version;
|
||||||
|
this.platform = platform;
|
||||||
|
this.major = major;
|
||||||
|
this.minor = minor;
|
||||||
|
this.micro = micro;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the string from which this JavaVersion was created
|
||||||
|
*/
|
||||||
|
public String getVersion()
|
||||||
|
{
|
||||||
|
return version;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>Returns the Java Platform version, such as {@code 8} for JDK 1.8.0_92 and {@code 9} for JDK 9.2.4.</p>
|
||||||
|
*
|
||||||
|
* @return the Java Platform version
|
||||||
|
*/
|
||||||
|
public int getPlatform()
|
||||||
|
{
|
||||||
|
return platform;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>Returns the major number version, such as {@code 1} for JDK 1.8.0_92 and {@code 9} for JDK 9.2.4.</p>
|
||||||
|
*
|
||||||
|
* @return the major number version
|
||||||
|
*/
|
||||||
|
public int getMajor()
|
||||||
|
{
|
||||||
|
return major;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>Returns the minor number version, such as {@code 8} for JDK 1.8.0_92 and {@code 2} for JDK 9.2.4.</p>
|
||||||
|
*
|
||||||
|
* @return the minor number version
|
||||||
|
*/
|
||||||
|
public int getMinor()
|
||||||
|
{
|
||||||
|
return minor;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>Returns the micro number version (aka security number), such as {@code 0} for JDK 1.8.0_92 and {@code 4} for JDK 9.2.4.</p>
|
||||||
|
*
|
||||||
|
* @return the micro number version
|
||||||
|
*/
|
||||||
|
public int getMicro()
|
||||||
|
{
|
||||||
|
return micro;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>Returns the update number version, such as {@code 92} for JDK 1.8.0_92 and {@code 0} for JDK 9.2.4.</p>
|
||||||
|
*
|
||||||
|
* @return the update number version
|
||||||
|
*/
|
||||||
|
@Deprecated
|
||||||
|
public int getUpdate()
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>Returns the remaining string after the version numbers, such as {@code -internal} for
|
||||||
|
* JDK 1.8.0_92-internal and {@code -ea} for JDK 9-ea, or {@code +13} for JDK 9.2.4+13.</p>
|
||||||
|
*
|
||||||
|
* @return the remaining string after the version numbers
|
||||||
|
*/
|
||||||
|
@Deprecated
|
||||||
|
public String getSuffix()
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString()
|
||||||
|
{
|
||||||
|
return version;
|
||||||
|
}
|
||||||
|
}
|
10
history.txt
10
history.txt
@ -1,6 +1,16 @@
|
|||||||
|
2020-11-17 zzz
|
||||||
|
* Jetty:
|
||||||
|
- Update to 9.3.29.v20201019
|
||||||
|
- Patch to fix console not starting on Java 11.0.9.1
|
||||||
|
|
||||||
|
2020-11-17 zzz
|
||||||
|
* Wrapper: Add missing binaries for armv7 and aarch64
|
||||||
|
to installer (ticket #2308)
|
||||||
|
|
||||||
2020-11-16 zzz
|
2020-11-16 zzz
|
||||||
* GeoIP 2020-11-01
|
* GeoIP 2020-11-01
|
||||||
* I2NP: Don't extend DataStructureImpl, to save space
|
* I2NP: Don't extend DataStructureImpl, to save space
|
||||||
|
* Imagegen: Update zxing to 3.4.1
|
||||||
* Wrapper: Update to 3.5.44
|
* Wrapper: Update to 3.5.44
|
||||||
|
|
||||||
2020-11-11 zzz
|
2020-11-11 zzz
|
||||||
|
@ -18,7 +18,7 @@ public class RouterVersion {
|
|||||||
/** deprecated */
|
/** deprecated */
|
||||||
public final static String ID = "Monotone";
|
public final static String ID = "Monotone";
|
||||||
public final static String VERSION = CoreVersion.VERSION;
|
public final static String VERSION = CoreVersion.VERSION;
|
||||||
public final static long BUILD = 13;
|
public final static long BUILD = 14;
|
||||||
|
|
||||||
/** for example "-test" */
|
/** for example "-test" */
|
||||||
public final static String EXTRA = "-rc";
|
public final static String EXTRA = "-rc";
|
||||||
|
Reference in New Issue
Block a user