Reputation: 11659
I am creating a shaded jar with Maven shade plugin:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.1.0</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<source>1.7</source>
<target>1.7</target>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
</excludes>
</filter>
</filters>
</configuration>
</execution>
</executions>
</plugin>
The shade plugin extracts the classes from all jars and pack them in a single jar but I get following warning for 1 jar:
[WARNING] The POM for org.knowhowlab.osgi:sigar:jar:1.6.5_01 is invalid, transitive dependencies (if any) will not be available
and the sigar jar gets added as a jar,unlike others, which I was not expecting.
The sigar jar is my pom is added like this:
<dependency>
<groupId>org.knowhowlab.osgi</groupId>
<artifactId>sigar</artifactId>
<version>1.6.5_01</version>
</dependency>
One difference I see in this sigar jar is that it contains files such as .so, .dll.
How can I make this jar get added like others in shaded jar?
Upvotes: 1
Views: 85