Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
4.0.0-alpha-13
-
None
-
None
Description
Maven3 plugin using ModelBuilder gets this:
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal eu.maveniverse.maven.plugins:toolbox:0.2.4-SNAPSHOT:gav-dm-tree (default-cli) on project unused: Execution default-cli of goal eu.maveniverse.maven.plugins:toolbox:0.2.4-SNAPSHOT:gav-dm-tree failed: An API incompatibility was encountered while executing eu.maveniverse.maven.plugins:toolbox:0.2.4-SNAPSHOT:gav-dm-tree: java.lang.AbstractMethodError: Receiver class eu.maveniverse.maven.mima.extensions.mmr.internal.ModelCacheImpl does not define or inherit an implementation of the resolved method 'abstract java.lang.Object computeIfAbsent(org.apache.maven.building.Source, java.lang.String, java.util.function.Supplier)' of interface org.apache.maven.model.building.ModelCache.
Fixing ModelCacheImpl to implement missing methods lead to another issue: missing class org.apache.maven.building.Source (this class is used by new methods on ModelCache interface). This class belongs to artifact model-builder-support but the Java package org.apache.maven.building was NEVER exported (nor in mvn3 nor in mvn4).
Basically, we got to point, that Maven4 broke this compatibility, but there is no way to fix it either, as required class is in not exported package.