Skip to content

Maven shade plugin ResourceTransformer API changed #21128

@zman0900

Description

@zman0900

Using org.springframework.boot.maven.PropertiesMergingResourceTransformer as a transformer with maven-shade-plugin is no longer possible as of shade plugin 3.2.3. The API of org.apache.maven.plugins.shade.resource.ResourceTransformer was changed, which causes an AbstractMethodError:

Execution default of goal org.apache.maven.plugins:maven-shade-plugin:3.2.3:shade failed: An API incompatibility was encountered while executing org.apache.maven.plugins:maven-shade-plugin:3.2.3:shade: java.lang.AbstractMethodError: Receiver class org.springframework.boot.maven.PropertiesMergingResourceTransformer does not define or inherit an implementation of the resolved method 'abstract void processResource(java.lang.String, java.io.InputStream, java.util.List, long)' of interface org.apache.maven.plugins.shade.resource.ResourceTransformer.

Above error is from running maven with Java 11. Running with Java 8 produces a similar, but much less useful error:

Execution default of goal org.apache.maven.plugins:maven-shade-plugin:3.2.3:shade failed: An API incompatibility was encountered while executing org.apache.maven.plugins:maven-shade-plugin:3.2.3:shade: java.lang.AbstractMethodError: null

This happens with latest spring-boot-maven-plugin 2.2.6.RELEASE.

Metadata

Metadata

Assignees

No one assigned

    Labels

    for: external-projectFor an external project and not something we can fix

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions