2

I am creating an uber jar using the maven-shade-plugin. When running package, it throws the following warning:

connect-api-1.1.0.jar, kafka-clients-1.1.0.jar define 2 overlapping resources: 
  - LICENSE
  - NOTICE

In response, I add the ApacheLicenseResourceTransformer, but the warning still appears. It seems possible to explicitly filter out these files, but that seems a bit messy. Any suggestions?

relevant part of pom:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <groupId>org.pluginTester</groupId>
  <artifactId>shadowPluginTest</artifactId>
  <version>1.0-SNAPSHOT</version>
  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-shade-plugin</artifactId>
        <version>3.2.4</version>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
            <configuration>
              <transformers>
                <transformer implementation="org.apache.maven.plugins.shade.resource.ApacheLicenseResourceTransformer">
                </transformer>
              </transformers>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
  <dependencies>
    <dependency>
      <groupId>org.apache.kafka</groupId>
      <artifactId>connect-api</artifactId>
      <version>1.1.0</version>
    </dependency>
  </dependencies>
</project>

Running Java 1.8 and Apache Maven 3.6.3

LukeG
  • 117
  • 8

0 Answers0