RFR: Archetype: move jmh-generator-annprocess into configuration of maven-compiler-plugin

Aleksey Shipilev shade at openjdk.org
Wed Oct 19 14:16:27 UTC 2022


On Fri, 8 Jul 2022 11:28:54 GMT, Сергей Цыпанов <duke at openjdk.org> wrote:

> I found out that sometimes IDEA does not pick-up annotation processor from `pom.xml` of a project generated from archetype. If I then move annotation processor into compiler's config and reimport the project the issue is gone. So it seems reasonable to move annotation processor into dedicated section of compiler plugin's config.

[Documentation](https://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html#annotationProcessorPaths) says:


Classpath elements to supply as annotation processor path. If specified, the compiler will detect annotation processors only in those classpath elements.


So this would stop other annotation processors from running on the benchmark source. Which does not look right. 
Additionally, this deviates from the "golden" way to hook up JMH everywhere. If we do this, it would require much more work.
I guess you need to submit the bug against the IDEA instead of band-aid-ing it in JMH.

(Please close this PR if you agree)

-------------

PR: https://git.openjdk.org/jmh/pull/74


More information about the jmh-dev mailing list