chore: Fix compatibility with Maven's pom.xml parser by adding explicit versions for com.google.auto.service:auto-service-annotations

Fixes https://github.com/apache/jmeter/issues/6041

See https://github.com/gradle/gradle/issues/25712
This commit is contained in:
Vladimir Sitnikov 2023-07-11 10:58:36 +03:00
parent 7a3d3e4c4a
commit e424b5fa99
6 changed files with 188 additions and 50 deletions

View File

@ -23,7 +23,9 @@ plugins {
dependencies { dependencies {
annotationProcessor("com.google.auto.service:auto-service") annotationProcessor("com.google.auto.service:auto-service")
compileOnlyApi("com.google.auto.service:auto-service-annotations") // Technically speaking, the version is already declared with bom-thirdparty,
// however we have to duplicate it here to workaround https://github.com/gradle/gradle/issues/25712
compileOnlyApi("com.google.auto.service:auto-service-annotations:1.1.1")
} }
plugins.withId("org.jetbrains.kotlin.jvm") { plugins.withId("org.jetbrains.kotlin.jvm") {

View File

@ -77,6 +77,7 @@ dependencies {
findProject(":src:bom-thirdparty")?.let{ findProject(":src:bom-thirdparty")?.let{
api(platform(it)) api(platform(it))
annotationProcessor(platform(it)) annotationProcessor(platform(it))
compileOnlyApi(platform(it))
} }
} }

View File

@ -1,5 +1,6 @@
import groovy.util.Node import groovy.util.Node
import groovy.util.NodeList import groovy.util.NodeList
import java.lang.IllegalStateException
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Licensed to the Apache Software Foundation (ASF) under one or more
@ -63,9 +64,13 @@ publishing {
dependenciesNode as Node dependenciesNode as Node
for (dependency in (dependenciesNode["dependency"] as NodeList)) { for (dependency in (dependenciesNode["dependency"] as NodeList)) {
dependency as Node dependency as Node
if ((dependency["optional"] as? NodeList)?.firstOrNull()?.let { it as? Node } if ((dependency["optional"] as NodeList).firstOrNull()?.let { it as? Node }
?.text() == "true") { ?.text() == "true") {
dependenciesNode.remove(dependency) dependenciesNode.remove(dependency)
continue
}
if ((dependency["version"] as NodeList).isEmpty()) {
throw IllegalStateException("Generated pom.xml contains a dependency without <version> for dependency ${dependency}. It will cause issues with Maven resolution, see https://github.com/apache/jmeter/issues/6041")
} }
} }
} }

View File

@ -31,7 +31,7 @@ kotlin.code.style=official
# This is version for Apache JMeter itself # This is version for Apache JMeter itself
# Note: it should not include "-SNAPSHOT" as it is automatically added by build.gradle.kts # Note: it should not include "-SNAPSHOT" as it is automatically added by build.gradle.kts
# Release version can be generated by using -Prelease or -Prc=<int> arguments # Release version can be generated by using -Prelease or -Prc=<int> arguments
jmeter.version=5.6.1 jmeter.version=5.6.2
# Plugins # Plugins
com.github.vlsi.checksum-dependency.sha512=FAC41BF54A7C833BEAE9AB64083F6BEB3E1935BD6866C1B2F1D48FF926ABA4AECA53600FC3E41BE6ECBC87B73CE12F59C59836FB2E1DECC9408288060D66E988 com.github.vlsi.checksum-dependency.sha512=FAC41BF54A7C833BEAE9AB64083F6BEB3E1935BD6866C1B2F1D48FF926ABA4AECA53600FC3E41BE6ECBC87B73CE12F59C59836FB2E1DECC9408288060D66E988

View File

@ -47,67 +47,28 @@ Earlier changes are detailed in the <a href="changes_history.html">History of Pr
<br></br> <br></br>
<note> <note>
JMeter 5.6.1 requires Java 8 or later for execution (Java 17 or later recommended). JMeter 5.6.x requires Java 8 or later for execution (Java 17 or later recommended).
<br></br> <br></br>
<b>The next major release would require Java 11 or later.</b> <b>The next major release would require Java 11 or later.</b>
</note> </note>
<!-- =================== 5.6.1 =================== --> <!-- =================== 5.6.2 =================== -->
<h1>Version 5.6.1</h1> <h1>Version 5.6.2 </h1>
<p> <p>
Summary Summary
</p> </p>
<ul> <ul>
<li><a href="#New and Noteworthy">New and Noteworthy</a></li>
<li><a href="#Incompatible changes">Incompatible changes</a></li>
<li><a href="#Bug fixes">Bug fixes</a></li> <li><a href="#Bug fixes">Bug fixes</a></li>
<li><a href="#Improvements">Improvements</a></li>
<li><a href="#Non-functional changes">Non-functional changes</a></li>
<li><a href="#Known problems and workarounds">Known problems and workarounds</a></li>
<li><a href="#Thanks">Thanks</a></li>
</ul>
<ch_section>New and Noteworthy</ch_section>
<ch_section>Improvements</ch_section>
<h3>HTTP Samplers and Test Script Recorder</h3>
<ul>
<li><pr>6010</pr>Use UTF-8 as a default encoding in HTTP sampler. It enables sending parameter names, and filenames with unicode characters</li>
<li><pr>6010</pr>Test Recorder will use UTF-8 encoding by default, so it will infer human-readable arguments rather than percent-encoded ones</li>
</ul>
<ch_section>Non-functional changes</ch_section>
<ul>
<li><pr>6000</pr>Add release-drafter for populating GitHub releases info based on the merged PRs</li>
<li><pr>5989</pr>Use Gradle toolchains for JDK provisioning, enable building and testing with different JDKs, start testing with Java 21</li>
<li><pr>5991</pr>Update jackson-core, jackson-databind, jackson-annotations to 2.15.2 (from 2.15.1)</li>
<li><pr>5993</pr>Update ph-commons to 10.2.5 (from 10.2.4)</li>
<li><pr>6017</pr>Update kotlin-stdlib to 1.8.22 (from 1.8.21)</li>
<li><pr>6020</pr>Update error_prone_annotations to 2.20.0 (from 2.19.1)</li>
<li><pr>6023</pr>Update checker-qual to 3.35.0 (from 3.34.0)</li>
</ul>
<h3>Other Samplers</h3>
<ul>
<li><pr>6028</pr> Change default value for <code>sampleresult.default.encoding</code> to UTF-8 (it inherits default HTTP encoding which was modified in <pr>6010</pr>)</li>
</ul> </ul>
<!-- =================== Bug fixes =================== --> <!-- =================== Bug fixes =================== -->
<ch_section>Bug fixes</ch_section> <ch_section>Bug fixes</ch_section>
<h3>Thread Groups</h3> <h3>General</h3>
<ul> <ul>
<li><pr>6011</pr>Regression since 5.6: ThreadGroups are running endlessly in non-gui mode: use default value <li><pr></pr><issue>6041</issue>Fix compatibility with Maven's pom.xml parser by adding explicit versions for <code>com.google.auto.service:auto-service-annotations</code> (regression since 5.6.1)</li>
for LoopController.continue_forever rather than initializing it in the constructor</li>
</ul>
<h3>Other Samplers</h3>
<ul>
<li><pr>6012</pr> Java Request sampler cannot be enabled again after disabling in UI (regression since 5.6)</li>
</ul> </ul>
<!-- =================== Thanks =================== --> <!-- =================== Thanks =================== -->
@ -116,12 +77,9 @@ Summary
<p>We thank all contributors mentioned in bug and improvement sections above: <p>We thank all contributors mentioned in bug and improvement sections above:
</p> </p>
<ul> <ul>
<li>Alex Schwartz, <a href="https://github.com/alexsch01">@alexsch01</a></li>
</ul> </ul>
<p>We also thank bug reporters who helped us improve JMeter.</p> <p>We also thank bug reporters who helped us improve JMeter.</p>
<ul> <ul>
<li>David Getzlaff, <a href="https://github.com/dgetzlaf">@dgetzlaf</a></li>
<li>LeeBaul, <a href="https://github.com/libaolu">@libaolu</a></li>
</ul> </ul>
<p> <p>
Apologies if we have omitted anyone else. Apologies if we have omitted anyone else.

View File

@ -42,6 +42,178 @@ Current changes are detailed in <a href="changes.html">Changes</a>.
<p><b>Changes sections are chronologically ordered from top (most recent) to bottom <p><b>Changes sections are chronologically ordered from top (most recent) to bottom
(least recent)</b></p> (least recent)</b></p>
<!-- =================== 5.6.1 =================== -->
<h1>Version 5.6.1</h1>
<p>
Summary
</p>
<ul>
<li><a href="#New and Noteworthy">New and Noteworthy</a></li>
<li><a href="#Incompatible changes">Incompatible changes</a></li>
<li><a href="#Bug fixes">Bug fixes</a></li>
<li><a href="#Improvements">Improvements</a></li>
<li><a href="#Non-functional changes">Non-functional changes</a></li>
<li><a href="#Known problems and workarounds">Known problems and workarounds</a></li>
<li><a href="#Thanks">Thanks</a></li>
</ul>
<ch_section>New and Noteworthy</ch_section>
<ch_section>Improvements</ch_section>
<h3>HTTP Samplers and Test Script Recorder</h3>
<ul>
<li><pr>6010</pr>Use UTF-8 as a default encoding in HTTP sampler. It enables sending parameter names, and filenames with unicode characters</li>
<li><pr>6010</pr>Test Recorder will use UTF-8 encoding by default, so it will infer human-readable arguments rather than percent-encoded ones</li>
</ul>
<ch_section>Non-functional changes</ch_section>
<ul>
<li><pr>6000</pr>Add release-drafter for populating GitHub releases info based on the merged PRs</li>
<li><pr>5989</pr>Use Gradle toolchains for JDK provisioning, enable building and testing with different JDKs, start testing with Java 21</li>
<li><pr>5991</pr>Update jackson-core, jackson-databind, jackson-annotations to 2.15.2 (from 2.15.1)</li>
<li><pr>5993</pr>Update ph-commons to 10.2.5 (from 10.2.4)</li>
<li><pr>6017</pr>Update kotlin-stdlib to 1.8.22 (from 1.8.21)</li>
<li><pr>6020</pr>Update error_prone_annotations to 2.20.0 (from 2.19.1)</li>
<li><pr>6023</pr>Update checker-qual to 3.35.0 (from 3.34.0)</li>
</ul>
<h3>Other Samplers</h3>
<ul>
<li><pr>6028</pr> Change default value for <code>sampleresult.default.encoding</code> to UTF-8 (it inherits default HTTP encoding which was modified in <pr>6010</pr>)</li>
</ul>
<!-- =================== Bug fixes =================== -->
<ch_section>Bug fixes</ch_section>
<h3>Thread Groups</h3>
<ul>
<li><pr>6011</pr>Regression since 5.6: ThreadGroups are running endlessly in non-gui mode: use default value
for LoopController.continue_forever rather than initializing it in the constructor</li>
</ul>
<h3>Other Samplers</h3>
<ul>
<li><pr>6012</pr> Java Request sampler cannot be enabled again after disabling in UI (regression since 5.6)</li>
</ul>
<!-- =================== Thanks =================== -->
<ch_section>Thanks</ch_section>
<p>We thank all contributors mentioned in bug and improvement sections above:
</p>
<ul>
<li>Alex Schwartz, <a href="https://github.com/alexsch01">@alexsch01</a></li>
</ul>
<p>We also thank bug reporters who helped us improve JMeter.</p>
<ul>
<li>David Getzlaff, <a href="https://github.com/dgetzlaf">@dgetzlaf</a></li>
<li>LeeBaul, <a href="https://github.com/libaolu">@libaolu</a></li>
</ul>
<p>
Apologies if we have omitted anyone else.
</p>
<!-- =================== Known bugs or issues related to JAVA Bugs =================== -->
<ch_section>Known problems and workarounds</ch_section>
<ul>
<li><code>pom.xml</code> misses <code>&lt;version&gt;</code> tags for <code>auto-service-annotations</code>, so Maven can't infer transitive dependencies. The issue is resolved in 5.6.2</li>
<li>The Once Only controller behaves correctly under a Thread Group or Loop Controller,
but otherwise its behaviour is not consistent (or clearly specified).</li>
<li>
The numbers that appear to the left of the green box are the number of active threads / total number of threads,
the total number of threads only applies to a locally run test, otherwise it will show <code>0</code> (see <bugzilla>55510</bugzilla>).
</li>
<li>
Note that under some windows systems you may have this WARNING:
<source>
java.util.prefs.WindowsPreferences
WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs at root 0
x80000002. Windows RegCreateKeyEx(&hellip;) returned error code 5.
</source>
The fix is to run JMeter as Administrator, it will create the registry key for you, then you can restart JMeter as a normal user and you won't have the warning anymore.
</li>
<li>
You may encounter the following error:
<source>java.security.cert.CertificateException: Certificates does not conform to algorithm constraints</source>
if you run a HTTPS request on a web site with a SSL certificate (itself or one of SSL certificates in its chain of trust) with a signature
algorithm using MD2 (like <code>md2WithRSAEncryption</code>) or with a SSL certificate with a size lower than 1024 bits.
This error is related to increased security in Java 8+.
<br></br>
To allow you to perform your HTTPS request, you can downgrade the security of your Java installation by editing
the Java <code>jdk.certpath.disabledAlgorithms</code> property. Remove the MD2 value or the constraint on size, depending on your case.
<br></br>
This property is in this file:
<source>JAVA_HOME/jre/lib/security/java.security</source>
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.
<source>
Warning: Nashorn engine is planned to be removed from a future JDK release
</source>
To silence these warnings, add <code>-Dnashorn.args=--no-deprecation-warning</code> to your Java arguments.
That can be achieved by setting the enviroment variable <code>JVM_ARGS</code>
<source>
export JVM_ARGS="-Dnashorn.args=--no-deprecation-warning"
</source>
</li>
<li>
With Java 15 the JavaScript implementation <a href="https://openjdk.java.net/jeps/372">Nashorn has been removed</a>. To add back a JSR-223 compatible JavaScript engine you have two options:
<dl>
<dt>Use Mozilla Rhino</dt>
<dd>Copy <a href="https://github.com/mozilla/rhino/releases/download/Rhino1_7_14_Release/rhino-engine-1.7.14.jar">rhino-engine-1.7.14.jar</a> into <code>$JMETER_HOME/lib/ext</code>.</dd>
<dt>Use OpenJDK Nashorn</dt>
<dd>
The OpenJDK Nashorn implementation comes as a module. To use it, you will have to download it and add it to the module path. A hacky way to download the version 15.0 (or later) and its dependencies and set the module path is outlined below:
<source>
mkdir lib/modules
pushd lib/modules
wget https://repo1.maven.org/maven2/org/openjdk/nashorn/nashorn-core/15.3/nashorn-core-15.3.jar
wget https://repo1.maven.org/maven2/org/ow2/asm/asm/9.5/asm-9.5.jar
wget https://repo1.maven.org/maven2/org/ow2/asm/asm-commons/9.5/asm-commons-9.5.jar
wget https://repo1.maven.org/maven2/org/ow2/asm/asm-util/9.5/asm-util-9.5.jar
wget https://repo1.maven.org/maven2/org/ow2/asm/asm-tree/9.5/asm-tree-9.5.jar
wget https://repo1.maven.org/maven2/org/ow2/asm/asm-analysis/9.5/asm-analysis-9.5.jar
popd
export JVM_ARGS="--module-path $PWD/lib/modules"
./bin/jmeter
</source>
</dd>
</dl>
</li>
</ul>
<!-- =================== 5.6 =================== --> <!-- =================== 5.6 =================== -->
<h1>Version 5.6</h1> <h1>Version 5.6</h1>