title: maven shade, overlapping classes within spring dependencies. Why aren't the same reported by spring-boot-maven-plugin?
body: <p>In my spring project I used this plugin to create fat jar:</p>
  <pre><code>&lt;plugin&gt;
    &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
    &lt;artifactId&gt;spring-boot-maven-plugin&lt;/artifactId&gt;
    &lt;version&gt;2.3.5.RELEASE&lt;/version&gt;
    &lt;executions&gt;
      &lt;execution&gt;
        &lt;goals&gt;
          &lt;goal&gt;build-info&lt;/goal&gt;
          &lt;goal&gt;repackage&lt;/goal&gt;
        &lt;/goals&gt;
        &lt;configuration&gt;
          &lt;classifier&gt;repackaged&lt;/classifier&gt;
        &lt;/configuration&gt;
      &lt;/execution&gt;
    &lt;/executions&gt;
  &lt;/plugin&gt;
  </code></pre>
  <p>works OK, without warning. I added JMH to project, so I need to produce another fat-jar, which will contain benchmarks. So I added this:</p>
  <pre><code>&lt;plugin&gt;
    &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
    &lt;artifactId&gt;maven-shade-plugin&lt;/artifactId&gt;
    &lt;version&gt;3.2.1&lt;/version&gt;
    &lt;executions&gt;
      &lt;execution&gt;
        &lt;phase&gt;package&lt;/phase&gt;
        &lt;goals&gt;
          &lt;goal&gt;shade&lt;/goal&gt;
        &lt;/goals&gt;
        &lt;configuration&gt;
          &lt;minimizeJar&gt;true&lt;/minimizeJar&gt;
          &lt;finalName&gt;jmhBenchmarks&lt;/finalName&gt;
          &lt;transformers&gt;
            &lt;transformer implementation=&quot;org.apache.maven.plugins.shade.resource.ManifestResourceTransformer&quot;&gt;
              &lt;mainClass&gt;org.openjdk.jmh.Main&lt;/mainClass&gt;
            &lt;/transformer&gt;
            &lt;transformer implementation=&quot;org.apache.maven.plugins.shade.resource.ServicesResourceTransformer&quot;/&gt;
          &lt;/transformers&gt;
          &lt;filters&gt;
            &lt;filter&gt;
              &lt;!--
                  Shading signed JARs will fail without this.
                  http://stackoverflow.com/questions/999489/invalid-signature-file-when-attempting-to-run-a-jar
              --&gt;
              &lt;artifact&gt;*:*&lt;/artifact&gt;
              &lt;excludes&gt;
                &lt;exclude&gt;module-info.class&lt;/exclude&gt;
                &lt;exclude&gt;META-INF/*.SF&lt;/exclude&gt;
                &lt;exclude&gt;META-INF/*.DSA&lt;/exclude&gt;
                &lt;exclude&gt;META-INF/*.RSA&lt;/exclude&gt;
              &lt;/excludes&gt;
            &lt;/filter&gt;
          &lt;/filters&gt;
        &lt;/configuration&gt;
      &lt;/execution&gt;
    &lt;/executions&gt;
  &lt;/plugin&gt;
  </code></pre>
  <p>but when running it I get this:</p>
  <pre><code>[WARNING] jakarta.annotation-api-1.3.5.jar, javax.annotation-api-1.3.2.jar define 5 overlapping classes: 
  [WARNING]   - javax.annotation.PreDestroy
  [WARNING]   - javax.annotation.Resource$AuthenticationType
  [WARNING]   - javax.annotation.Resource
  [WARNING]   - javax.annotation.Resources
  [WARNING]   - javax.annotation.PostConstruct
  [WARNING] maven-shade-plugin has detected that some class files are
  [WARNING] present in two or more JARs. When this happens, only one
  [WARNING] single version of the class is copied to the uber jar.
  [WARNING] Usually this is not harmful and you can skip these warnings,
  [WARNING] otherwise try to manually exclude artifacts based on
  [WARNING] mvn dependency:tree -Ddetail=true and the above output.
  [WARNING] See http://maven.apache.org/plugins/maven-shade-plugin/
  </code></pre>
  <p>so this conflict is below 2 branches:</p>
  <pre><code>org.springframework.boot:spring-boot-starter-validation:jar:2.4.2:compile
  org.springframework.kafka:spring-kafka:jar:2.6.5:compile
  </code></pre>
  <p>whose versions are both declared within: spring-boot-dependencies-2.4.2.</p>
  <p>I know I can put exclusion:</p>
  <pre><code>&lt;dependency&gt;
    &lt;groupId&gt;org.springframework.kafka&lt;/groupId&gt;
    &lt;artifactId&gt;spring-kafka&lt;/artifactId&gt;
    &lt;exclusions&gt;
      &lt;exclusion&gt;
        &lt;groupId&gt;javax.annotation&lt;/groupId&gt;
        &lt;artifactId&gt;javax.annotation-api&lt;/artifactId&gt;
      &lt;/exclusion&gt;
    &lt;/exclusions&gt;
  &lt;/dependency&gt;
  </code></pre>
  <p>but how is possible that spring-boot-maven-plugin does not report this? It must see the same problem. In default configuration it ignores these issues? Or what is true cause that one shading does have this problem and second does not?</p>