IntelliJ Idea:关于 Java 11 上支持的注释处理器源版本 'RELEASE_6' 的 Maven 编译警告

IntelliJ Idea: Maven compilation warning about supported annotation processor source version 'RELEASE_6' on Java 11

在使用 Java 11 在 IntelliJ Idea 中 mvn clean install 智能执行后,我收到以下警告:

Warning:java: Supported source version 'RELEASE_6' from annotation processor 'net.java.dev.hickory.prism.internal.PrismGenerator' less than -source '11'

如何修复它,它来自哪里?注意我使用:

我还在 IDE 中使用默认设置启用了注释处理:

原因可以在评论区找到,这是一个IntelliJ Idea bug IDEA-200481

MapStruct 问题(1644) at GitHub contains a comprehensive explanation 1644#437463737

See IDEA-200481. IntelliJ is picking up the provided dependencies when doing the compilation.

...skipped... We can't move the hickory dependency to the annotationProcessorPaths section of the maven compiler because the @GeneratePrisms annotations are part of the dependency, so we won't be able to use them. If you think that we could do something on our side reopen this issue.

阅读 答案后,我通过在 intellij 设置中启用 Delegate IDE build/run 动作给 Maven 解决了这个问题。

查看 IDEA-200481 了解更多详情。