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

2

9

Upon mvn clean install smart execution in IntelliJ Idea using Java 11 I get the following warning:

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

How to fix it and where does it come from? Note I use:

  • Lombok version 1.18.12
  • Mapstruct version 1.3.1.Final

I have also enabled annotation processing in the IDE with default settings:

  • Build, Execution, Deployment -> Compiler -> Annotation processors -> check Enable annotation processing
Antipyrine answered 16/7, 2020 at 10:15 Comment(2)
It is bug in idea. According to this link github.com/mapstruct/mapstruct/issues/1644Vacla
I've got the same issue, have you fix it? Can you share your solution ? thx !Unconditional
A
4

The reason can be found in the comments section, this is an IntelliJ Idea bug IDEA-200481.

The MapStruct issue (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.

Antipyrine answered 16/7, 2020 at 16:17 Comment(1)
To add some more info. We have fixed this in 1.4 (still in Beta). We are no longer using Hickory, we use our own adaptation adaptation of it (mapstruct gem tools)Tom
B
9

After read this answer, I solved the issue by enabling Delegate IDE build/run actions to Maven in the intellij settings.

Check IDEA-200481 for more details.

intellij settings

Brinkmanship answered 8/9, 2021 at 15:46 Comment(0)
A
4

The reason can be found in the comments section, this is an IntelliJ Idea bug IDEA-200481.

The MapStruct issue (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.

Antipyrine answered 16/7, 2020 at 16:17 Comment(1)
To add some more info. We have fixed this in 1.4 (still in Beta). We are no longer using Hickory, we use our own adaptation adaptation of it (mapstruct gem tools)Tom

© 2022 - 2024 — McMap. All rights reserved.