change: use Java 17 as the build target, require Java 17+ for execution

This commit is contained in:
Vladimir Sitnikov 2024-01-04 21:58:22 +03:00
parent d3cba66416
commit 09c3f810dd
11 changed files with 17 additions and 159 deletions

View File

@ -26,8 +26,6 @@ matrix.addAxis({
name: 'java_version',
// Strings allow versions like 18-ea
values: [
'8',
'11',
'17',
'21',
eaJava,
@ -80,12 +78,6 @@ matrix.setNamePattern(['java_version', 'java_distribution', 'hash', 'os', 'tz',
// Semeru uses OpenJ9 jit which has no option for making hash codes the same
matrix.exclude({java_distribution: {value: 'semeru'}, hash: {value: 'same'}});
// Semeru 8 fails when Semeru 17 is on the PATH (we use 17 for build)
matrix.exclude({java_distribution: {value: 'semeru'}, java_version: '8'});
// Microsoft Java has no distribution for 8
matrix.exclude({java_distribution: {value: 'microsoft'}, java_version: '8'});
// Oracle JDK is only supported for JDK 17 and later
matrix.exclude({java_distribution: {value: 'oracle'}, java_version: ['8', '11']});
// Ignore builds with JAVA EA for now, see https://github.com/apache/jmeter/issues/6114
matrix.exclude({java_version: eaJava})
matrix.imply({java_version: eaJava}, {java_distribution: {value: 'oracle'}})
@ -97,10 +89,6 @@ matrix.generateRow({hash: {value: 'same'}});
matrix.generateRow({os: 'windows-latest'});
// TODO: un-comment when xvfb will be possible
// matrix.generateRow({os: 'ubuntu-latest'});
// Ensure there will be at least one job with Java 8
matrix.generateRow({java_version: "8"});
// Ensure there will be at least one job with Java 11
matrix.generateRow({java_version: "11"});
// Ensure there will be at least one job with Java 17
matrix.generateRow({java_version: "17"});
// Ensure there will be at least one job with Java 21
@ -119,15 +107,6 @@ include.forEach(v => {
`-Duser.country=${v.locale.country}`,
`-Duser.language=${v.locale.language}`,
];
if (v.hash.value === 'same' && v.java_version <= 8) {
// processSiteXslt fails with VerifyError when running with Java 8 and the same hashcode
// Skip the task in that case
//java.lang.VerifyError: (class: website_style, method: issue_separator signature: (Lcom/sun/org/apache/xala...)
// Illegal target of jump or branch
gradleArgs.push('-x :src:dist:processSiteXslt');
// javadoc tool seems take too much CPU when there are many hash collisions
gradleArgs.push('-x :src:dist:javadocAggregate');
}
v.extraGradleArgs = gradleArgs.join(' ');
});
include.forEach(v => {

View File

@ -54,7 +54,7 @@ The steps to import the sources (based on Eclipse 2019-06) into Eclipse are as f
1. Install `Eclipse IDE for Java Developers`
1. Install `Kotlin for Eclipse` plugin (JMeter code uses Java and Kotlin)
1. Make sure you have a Java 8 compatible JDK configured in your workspace
1. Make sure you have a Java 17 compatible JDK configured in your workspace
1. Open `File->Import...`
1. Select `Existing Gradle Project` and click `Next`
1. Read `How to experience the best Gradle integration` and click `Next`

View File

@ -92,7 +92,7 @@ The following requirements exist for running Apache JMeter:
- Java Interpreter:
A fully compliant Java 8 Runtime Environment is required
A fully compliant Java 17 Runtime Environment is required
for Apache JMeter to execute. A JDK with `keytool` utility is better suited
for Recording HTTPS websites.

View File

@ -38,7 +38,7 @@ buildParameters {
description.set("Collect test coverage")
}
integer("targetJavaVersion") {
defaultValue.set(8)
defaultValue.set(17)
mandatory.set(true)
description.set("Java version for source and target compatibility")
}

View File

@ -42,14 +42,9 @@ java {
}
tasks.configureEach<JavaCompile> {
// Use --release=8 for Java 10+ so the generated bytecode does not include methods introduced in Java 9+
options.release.set(
provider {
buildParameters.targetJavaVersion.takeIf {
javaCompiler.get().metadata.languageVersion.asInt() > 9
}
}
)
// Use --release=<targetJavaVersion> for javac so the generated bytecode does not include methods introduced in
// next Java releases
options.release.set(buildParameters.targetJavaVersion)
}
tasks.configureEach<JavaExec> {

View File

@ -48,18 +48,8 @@ tasks.configureEach<KotlinCompile> {
apiVersion = "kotlin.api".v
}
freeCompilerArgs += "-Xjvm-default=all"
val jdkRelease = buildParameters.targetJavaVersion.let {
when {
it < 9 -> "1.8"
else -> it.toString()
}
}
// jdk-release requires Java 9+
buildParameters.buildJdkVersion
.takeIf { it > 8 }
?.let {
freeCompilerArgs += "-Xjdk-release=$jdkRelease"
}
val jdkRelease = buildParameters.targetJavaVersion.toString()
freeCompilerArgs += "-Xjdk-release=$jdkRelease"
kotlinOptions.jvmTarget = jdkRelease
}
}

View File

@ -68,7 +68,7 @@ https://www.apache.org/dist/$tlpUrl/KEYS
N.B.
To create the distribution and test $tlp: "./gradlew build -Prelease -PskipSign".
$tlp $version requires Java 8 or later to run.
$tlp $version requires Java 17 or later to run.
The artifacts were built with
${"java.runtime.name".prop} ${"java.vendor".prop} (build ${"java.runtime.version".prop})

View File

@ -29,7 +29,7 @@
Before you can compile JMeter, you will need a few things:
<ul>
<li>a Java 8 compatible JDK (Java Development Kit)</li>
<li>a Java 17 compatible JDK (Java Development Kit)</li>
<li>Optional: <a href="https://gradle.org/">Gradle</a> installation</li>
<li>the JMeter sources as shown in the next section</li>
</ul>

View File

@ -47,14 +47,12 @@ Earlier changes are detailed in the <a href="changes_history.html">History of Pr
<br></br>
<note>
JMeter 5.6.x requires Java 8 or later for execution (Java 17 or later recommended).
<br></br>
<b>The next major release would require Java 17 or later.</b>
JMeter 6.x requires Java 17 or later for execution (Java 21 is recommended).
</note>
<!-- =================== 5.6.3 =================== -->
<!-- =================== 6.0.0 =================== -->
<h1>Version 5.6.3 </h1>
<h1>Version 6.0.0 </h1>
<p>
Summary
</p>
@ -62,95 +60,10 @@ Summary
<li><a href="#Bug fixes">Bug fixes</a></li>
</ul>
<ch_section>Improvements</ch_section>
<ch_section>Changes</ch_section>
<h3>General</h3>
<ul>
<li><pr>6199</pr>Enable use of <code>${...}</code> expressions for <code>TransactionController</code> "generate parent sample", and "include timers" checkboxes</li>
<li><pr>6199</pr>Enable use of <code>${...}</code> expressions for <code>ThreadGroupGui</code> "scheduler" checkbox</li>
<li><pr>6199</pr>Enable use of <code>${...}</code> expressions for <code>HTTP Request</code> "retrieve embedded resources", "download resources concurrently", and "store as MD5" checkboxes</li>
</ul>
<!-- =================== Bug fixes =================== -->
<ch_section>Bug fixes</ch_section>
<h3>General</h3>
<ul>
<li><issue>6043</issue><pr>6044</pr>JMeter 5.6 shows 0 as a min response time in summary report</li>
<li>Restored binary API compatibility with pre-5.6.2: restore public methods to non-static as they were before 5.6.2 <code>JavaSamplerContext.getJMeterVariables</code>,
<code>JavaSamplerContext.getJMeterProperties</code>, <code>BoundaryExtractor.extractAll</code>,
<code>AuthManager.setupCredentials</code>, <code>HttpRequestHdr.getMultipartConfig</code>, (regression since 5.6.2)</li>
<li><issue>6165</issue><pr>6192</pr>The Constant Throughput Timer is throwing a NullPointerException when using variables (vars.get) in "Target Throughput"-field</li>
<li><issue>6162</issue>The Constant Timer is throwing a NullPointerException when using variables (vars.get) in "delay"-field</li>
<li><pr>6193</pr>Log errors happening while JMeter starts the test (previously, errors from TestStateListener.testStarted were not logged)</li>
<li><pr>6216</pr>Pass JDBCSampler.maxRows to Statement.setMaxRows so the driver does not fetch extra rows from the database</li>
</ul>
<ch_section>Non-functional changes</ch_section>
<ul>
<li><pr>6166</pr>Use Gradle to 8.5 for building JMeter</li>
<li>Require Java 17 for building JMeter </li>
<li><pr>6199</pr>Improved API for programmatic test plan creation, see default implementations of <code>createTestElement</code>, <code>modifyTestElement</code>,
and new <code>makeTestElement</code> and <code>assignDefaultValues</code> methods in <code>JMeterGUIComponent</code>.
<code>AbstractJMeterGuiComponent.configureTestElement</code> is now discouraged</li>
<li><pr>6212</pr>Refactor: migrate existing Groovy tests to Kotlin, remove Groovy compiler from the build pipeline</li>
<li><pr>6214</pr>Refactor JUnit 3 and JUnit 4 tests to JUnit 5, remove JUnit 4 test dependency</li>
</ul>
<ch_section>Dependency upgrades</ch_section>
<ul>
<li>Update com.fasterxml.jackson.core:jackson-annotations to 2.16.1 (was 2.15.2)</li>
<li>Update com.fasterxml.jackson.core:jackson-core to 2.16.1 (was 2.15.2)</li>
<li>Update com.fasterxml.jackson.core:jackson-databind to 2.16.1 (was 2.15.2)</li>
<li>Update com.fifesoft:rsyntaxtextarea to 3.3.4 (was 3.3.3)</li>
<li>Update com.google.errorprone:error_prone_annotations to 2.24.0 (was 2.20.0)</li>
<li>Update commons-codec:commons-codec to 1.16.0 (was 1.15)</li>
<li>Update commons-io:commons-io to 2.15.1 (was 2.12.0)</li>
<li>Update commons-logging:commons-logging to 1.3.0 (was 1.2)</li>
<li>Update commons-net:commons-net to 3.9.0 (was 3.10.0)</li>
<li>Update io.burt:jmespath-core to 0.6.0 (was 0.5.1)</li>
<li>Update io.burt:jmespath-jackson to 0.6.0 (was 0.5.1)</li>
<li>Update net.minidev:accessors-smart to 2.5.0 (was 2.4.11)</li>
<li>Update net.minidev:json-smart to 2.5.0 (was 2.4.11)</li>
<li>Update net.sf.saxon:Saxon-HE to 11.6 (was 11.5)</li>
<li>Update org.apache.commons:commons-lang3 to 3.14.0 (was 3.12.0)</li>
<li>Update org.apache.commons:commons-pool2 to 2.12.0 (was 2.11.1)</li>
<li>Update org.apache.commons:commons-text to 1.11.0 (was 1.10.0)</li>
<li>Update org.apache.httpcomponents.client5:httpclient5 to 5.3 (was 5.2.1)</li>
<li>Update org.apache.httpcomponents.core5:httpcore5-h2 to 5.2.4 (was 5.2)</li>
<li>Update org.apache.httpcomponents.core5:httpcore5 to 5.2.4 (was 5.2)</li>
<li>Update org.apache.logging.log4j:log4j-1.2-api to 2.22.1 (was 2.20.0)</li>
<li>Update org.apache.logging.log4j:log4j-api to 2.22.1 (was 2.20.0)</li>
<li>Update org.apache.logging.log4j:log4j-core to 2.22.1 (was 2.20.0)</li>
<li>Update org.apache.logging.log4j:log4j-slf4j-impl to 2.22.1 (was 2.20.0)</li>
<li>Update org.apache.xmlgraphics:xmlgraphics-commons to 2.9 (was 2.8)</li>
<li>Update org.checkerframework:checker-qual to 3.42.0 (was 3.35.0)</li>
<li>Update org.codehaus.groovy:groovy-datetime to 3.0.20 (was 3.0.17)</li>
<li>Update org.codehaus.groovy:groovy-dateutil to 3.0.20 (was 3.0.17)</li>
<li>Update org.codehaus.groovy:groovy-jmx to 3.0.20 (was 3.0.17)</li>
<li>Update org.codehaus.groovy:groovy-json to 3.0.20 (was 3.0.17)</li>
<li>Update org.codehaus.groovy:groovy-jsr223 to 3.0.20 (was 3.0.17)</li>
<li>Update org.codehaus.groovy:groovy-sql to 3.0.20 (was 3.0.17)</li>
<li>Update org.codehaus.groovy:groovy-templates to 3.0.20 (was 3.0.17)</li>
<li>Update org.codehaus.groovy:groovy-xml to 3.0.20 (was 3.0.17)</li>
<li>Update org.codehaus.groovy:groovy to 3.0.20 (was 3.0.17)</li>
<li>Remove org.jetbrains.kotlin:kotlin-stdlib-common:1.8.22</li>
<li>Update org.jetbrains.kotlin:kotlin-stdlib-jdk7 to 1.9.10 (was 1.8.22)</li>
<li>Update org.jetbrains.kotlin:kotlin-stdlib-jdk8 to 1.9.10 (was 1.8.22)</li>
<li>Update org.jetbrains.kotlin:kotlin-stdlib to 1.9.22 (was 1.8.22)</li>
<li>Update org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm to 1.7.3 (was 1.7.1)</li>
<li>Update org.jetbrains.kotlinx:kotlinx-coroutines-swing to 1.7.3 (was 1.7.1)</li>
<li>Update org.jetbrains.lets-plot:base-portable-jvm to 4.1.0 (was 3.2.0)</li>
<li>Update org.jetbrains.lets-plot:lets-plot-common to 4.1.0 (was 3.2.0)</li>
<li>Update org.jetbrains.lets-plot:lets-plot-kotlin-jvm to 4.5.0 (was 4.4.1)</li>
<li>Update org.jetbrains.lets-plot:plot-common-portable-jvm to 4.1.0 (was 3.2.0)</li>
<li>Update org.jetbrains:annotations to 24.1.0 (was 24.0.1)</li>
<li>Update org.jsoup:jsoup to 1.17.1 (was 1.16.1)</li>
<li>Update org.mongodb:mongo-java-driver to 2.14.3 (was 2.11.3)</li>
<li>Update org.neo4j.driver:neo4j-java-driver to 4.4.13 (was 4.4.11)</li>
<li>Update org.ow2.asm:asm to 9.6 (was 9.5)</li>
<li>Update org.xmlresolver:xmlresolver to 5.2.1 (was 4.6.4)</li>
<li>Update org.xmlresolver:xmlresolver:data to 5.2.1 (was 4.6.4)</li>
<li><pr>6220</pr> Require Java 17 or later for running JMeter</li>
</ul>
<!-- =================== Thanks =================== -->
@ -203,25 +116,6 @@ This property is in this file:
See <bugzilla>56357</bugzilla> for details.
</li>
<li>
Under Mac OSX Aggregate Graph will show wrong values due to mirroring effect on numbers.
This is due to a known Java bug, see Bug <a href="https://bugs.openjdk.java.net/browse/JDK-8065373" >JDK-8065373</a>
The fix is to use JDK8_u45 or later.
</li>
<li>
View Results Tree may fail to display some HTML code under HTML renderer, see <bugzilla>54586</bugzilla>.
This is due to a known Java bug which fails to parse "<code>px</code>" units in row/col attributes.
See Bug <a href="https://bugs.openjdk.java.net/browse/JDK-8031109" >JDK-8031109</a>
The fix is to use JDK9 b65 or later.
</li>
<li>
JTable selection with keyboard (<keycombo><keysym>SHIFT</keysym><keysym>up/down</keysym></keycombo>) is totally unusable with Java 7 on Mac OSX.
This is due to a known Java bug <a href="https://bugs.openjdk.java.net/browse/JDK-8025126" >JDK-8025126</a>
The fix is to use JDK 8 b132 or later.
</li>
<li>
Since Java 11 the JavaScript implementation <a href="https://openjdk.java.net/jeps/335">Nashorn has been deprecated</a>.
Java will emit the following deprecation warnings, if you are using JavaScript based on Nashorn.

View File

@ -78,7 +78,7 @@
<a href="https://www.apache.org/dist/jmeter/KEYS">KEYS</a>
</p>
</section>
<section name="Apache JMeter &release; (Requires Java 8+)">
<section name="Apache JMeter &release; (Requires Java 17+)">
<subsection name="Binaries" anchor="binaries">
<table>
<tr>

View File

@ -115,7 +115,7 @@ over your Test Plans.</p>
<p>JMeter requires that your computing environment meets some minimum requirements.</p>
<subsection name="&sect-num;.1.1 Java Version" anchor="java_versions">
<note>JMeter is compatible with Java 8 or higher.
<note>JMeter is compatible with Java 17 or higher.
We highly advise you to install latest minor version of your major version for security and performance reasons.
</note>
<p>Because JMeter uses only standard Java APIs, please do not file bug reports if your JRE fails to run