Puneet Behl
09/01/2022, 10:01 AM* What went wrong:
Execution failed for task ':grails-core:compileGroovy'.
> Could not resolve all files for configuration ':grails-core:annotationProcessor'.
> Could not resolve org.codehaus.groovy:groovy-bom:3.0.10.
Required by:
project :grails-core > io.micronaut.spring:micronaut-spring-annotation:4.1.1 > io.micronaut:micronaut-bom:3.5.1
project :grails-core > io.micronaut.spring:micronaut-spring-annotation:4.1.1 > io.micronaut:micronaut-bom:3.5.1 > io.micronaut.groovy:micronaut-groovy-bom:3.1.0
> No matching variant of org.apache.groovy:groovy-bom:4.0.4 was found. The consumer was configured to find a runtime of a library, packaged as a jar, and its dependencies declared externally but:
- Variant 'apiElements' capability org.apache.groovy:groovy-bom:4.0.4:
- Incompatible because this component declares an API of a platform and the consumer needed a runtime of a library
I think the above is happening due to annotationProcessor "io.micronaut.spring:micronaut-spring-annotation:$micronautSpringVersion
in the build.gradle
file. Is there an easy way to exclude the groovy-bom
from annnotationProcessor
something as the following:
annotationProcessor("io.micronaut.spring:micronaut-spring-annotation:$micronautSpringVersion") {
exclude group: "org.codehaus.groovy", module: "groovy-bom"
}
I would appreciate any help with the same.