RFR: Specify explicitly jmh-generator-annprocess as an annotation processor in jmh-samples pom.xml
Fabrice Bibonne
duke at openjdk.org
Sun Feb 1 22:35:19 UTC 2026
When building **with maven** jmh-samples with a jdk version 22+ , the annotation processor jmh-generator-annprocess is not executed and files and classes generated by jmh are not included in the jar. Then there is an error at runtime when trying to execute samples with command line such as `java -jar target/benchmarks.jar JMHSample_01` : `Exception in thread "main" java.lang.RuntimeException: ERROR: Unable to find the resource: /META-INF/BenchmarkList`
This error happens because the jmh-sample pom.xml does not explicitly set jmh-generator-annprocess as an annotation processor path. This PR aims to correct this issue like the PR #125
-------------
Commit messages:
- fix (samples with java > 22)
Changes: https://git.openjdk.org/jmh/pull/165/files
Webrev: https://webrevs.openjdk.org/?repo=jmh&pr=165&range=00
Stats: 13 lines in 1 file changed: 7 ins; 6 del; 0 mod
Patch: https://git.openjdk.org/jmh/pull/165.diff
Fetch: git fetch https://git.openjdk.org/jmh.git pull/165/head:pull/165
PR: https://git.openjdk.org/jmh/pull/165
More information about the jmh-dev
mailing list