This question is related to Conflicting versions of datanucleus enhancer in a maven google app engine project. I tried the solution there and it works. But if I run mvn clean compile I get the error
Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project XXX: Fatal error compiling: java.lang.NoClassDefFoundError: org/datanucleus/util/AnnotationProcessorUtils: org.datanucleus.util.AnnotationProcessorUtils.
Any idea why? I'm using datanucleus-maven-plugin:3.3.0-release.
The problem is that I have the datanucleus-core twice: one from project dependencies and one from plugin dependencies. In the console after running mvn datanuleus:enhance the following line appears twice:
[INFO] CP: /home/user/.m2/repository/org/datanucleus/datanucleus-core/3.2.7/datanucleus-core-3.2.7.jar