You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Moreover, KAPT is in maintenance mode. Thus, I don't expect the kapt maven plugin to add exclusions support.
Changes in Core break Kotlin Maven Kapt support
In Micronaut Framework 4.2.0, we did changes to Micronaut Core AnnotationValue. If platform contains a module, which contributes an annotation processor, built with a previous version of core (E.g. core version in Micronaut Platform is 4.2.0, but Micronaut Data in platform was built with core 4.1.6), the Kotlin Maven applications break.
Caused by: Java.lang.NoSuchMethodError: Micronaut constructor io.micronaut.core.annotation.AnnotationValue(String,Map,AnnotationDefaultValuesProvider) not found. Most likely reason for this issue is that you are running a newer version of Micronaut with code compiled against an older version. Please recompile the offending classes
at io.micronaut.core.reflect.ReflectionUtils.newNoSuchConstructorInternalError(ReflectionUtils.java:430)
Since KSP is not supported for Maven to keep supporting Maven and Kotlin, the only workaround is to build and release every module that adds an annotation processor with the same core version as in Micronaut Platform.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Maven KAPT and Java
For Java, we can add exclusions with the Maven Plugin for annotation processors:
Maven KAPT and Kotlin
However, the KAPT Maven Plugin does not support exclusions:
Moreover, KAPT is in maintenance mode. Thus, I don't expect the kapt maven plugin to add exclusions support.
Changes in Core break Kotlin Maven Kapt support
In Micronaut Framework 4.2.0, we did changes to Micronaut Core AnnotationValue. If platform contains a module, which contributes an annotation processor, built with a previous version of core (E.g. core version in Micronaut Platform is 4.2.0, but Micronaut Data in platform was built with core 4.1.6), the Kotlin Maven applications break.
Since KSP is not supported for Maven to keep supporting Maven and Kotlin, the only workaround is to build and release every module that adds an annotation processor with the same core version as in Micronaut Platform.
I had to release again:
This is a horrible coupling.
Can we solve this issue?
Beta Was this translation helpful? Give feedback.
All reactions