4

When trying to package the thorntail-examples project on github, the build fails on several of the examples stating an API incompatibility error similar to this...

[ERROR] Failed to execute goal io.thorntail:thorntail-maven-plugin:2.3.0.Final-SNAPSHOT:package (package) on project example-stm: Execution package of goal io.thorntail:thorntail-maven-plugin:2.3.0.Final-SNAPSHOT:package failed: An API incompatibility was encountered while executing io.thorntail:thorntail-maven-plugin:2.3.0.Final-SNAPSHOT:package: java.lang.AbstractMethodError: null
[ERROR] -----------------------------------------------------
[ERROR] realm =    plugin>io.thorntail:thorntail-maven-plugin:2.3.0.Final-SNAPSHOT
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/home/<user>/.m2/repository/io/thorntail/thorntail-maven-plugin/2.3.0.Final-SNAPSHOT/thorntail-maven-plugin-2.3.0.Final-SNAPSHOT.jar
[ERROR] urls[1] = file:/home/<user>/.m2/repository/io/thorntail/fraction-metadata/2.3.0.Final-SNAPSHOT/fraction-metadata-2.3.0.Final-SNAPSHOT.jar
[ERROR] urls[2] = file:/home/<user>/.m2/repository/io/thorntail/meta-spi/2.3.0.Final-SNAPSHOT/meta-spi-2.3.0.Final-SNAPSHOT.jar
[ERROR] urls[3] = file:/home/<user>/.m2/repository/org/jboss/shrinkwrap/descriptors/shrinkwrap-descriptors-impl-javaee/2.0.0/shrinkwrap-descriptors-impl-javaee-2.0.0.jar
...

If I remove one of the dependencies, the problem goes away, for example with the jpa/jpa example, I receive an API Incompatibility error when I try to build as is, but if I remove the h2 dependency it clears the error.

Having a similar issue with my own project, adding h2 or hibernate results in an API Incompatibility error, but the app runs fine if i leave out both of these.

Has anyone else experienced this issue?

Atrum
  • 76
  • 6

1 Answers1

6

Thorntail currently doesn't work well with Maven 3.6, as tracked in https://issues.jboss.org/browse/THORN-2229. Suggested workaround is to switch back to Maven 3.5 for the time being.

Ladicek
  • 5,970
  • 17
  • 20
  • 1
    Wow, I literally searched on those keywords a dozen times and didn't find that. That is in fact the exact issue, thanks. – Atrum Nov 28 '18 at 18:06
  • 1
    Crazy. My error was "Execution default of goal org.wildfly.swarm:wildfly-swarm-plugin:7.0.0.redhat-8:package failed: An API incompatibility was encountered while executing org.wildfly.swarm:wildfly-swarm-plugin:7.0.0.redhat-8:package: java.lang.AbstractMethodError: null" while using the WildFly Swarm plugin. So hopefully people will be lead to here when they encounter that error. – ofrommel Jan 21 '19 at 13:26
  • 1
    FTR, Maven 3.6 should work just fine with the recently released Thorntail 2.3.0.Final. – Ladicek Jan 21 '19 at 17:02
  • I have this error but I use `Apache Maven 3.5.2`, any idea ? – Rom May 24 '19 at 12:33
  • Must be a different root cause. Could you ask a new question and provide more details? Thanks. – Ladicek May 27 '19 at 09:11