maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yana Vasileva (Jira)" <>
Subject [jira] [Created] (MSHADE-374) Exclude test shading when shadeTestJar is enabled
Date Tue, 07 Jul 2020 07:13:00 GMT
Yana Vasileva created MSHADE-374:

             Summary: Exclude test shading when shadeTestJar is enabled
                 Key: MSHADE-374
             Project: Maven Shade Plugin
          Issue Type: Task
    Affects Versions: 3.2.4, 3.2.3
            Reporter: Yana Vasileva

 * Plugin version - 3.2.3 (I tried with 3.2.4 as well)
 * Maven version - 3.2.5 (old one, so I tried with 3.6.3 as well - same result)
 * Project A shades some libraries - `httpclient`, `commons-coded`, `commons-logging`
 * {{shadeTestJar}} is enabled so the created `projectA-tests.jar` can resolve the shaded
source classes
 * The plugin configuration looks similar to the following:

            <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"

As a result, `projectA-tests.jar` includes the shaded classes from the `commons-codec-tests.jar`
and `commons-logging-tests.jar` which cause troubles when some of the tests scenarios are
being executed for project A.

Is it possible to exclude the classes of `commons-*-tests.jar` and prevent their shading in
the `projectA-tests.jar`?

I tried the following as it is documented [here|],
however, the classes are still shaded:
Is the observed behavior expected? Is there any way to exclude the tests shading?

Any help is highly appreciated, please let me know if I need to provide some further information.

This message was sent by Atlassian Jira

View raw message