fix (jmh) : Explicitly configure JMH annotation processor in binary-tree benchmark #297
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Context
Part of our RPMs QA process, When running the binary-tree benchmark demo for our RPM release for newer GraalVM versions , the benchmark demo fails with:
Exception in thread "main" java.lang.RuntimeException: ERROR: Unable to find the resource: /META-INF/BenchmarkListThis occurs because the JMH annotation processor isn't explicitly configured in the Maven build, leading to missing metadata generation required for JMH benchmarks to run.
Root Cause
The current
pom.xmlrelies on implicit annotation processing, which can be unreliable across different build environments and JDK versions. While it might work in some environments where Maven picks up the processor automatically, it fails in other environments.Solution
Added explicit configuration for the JMH annotation processor in the maven-compiler-plugin: