I have been tearing my hair out with this error. I am using Maven to get the dependencies for a project where I believe it is the org.eclipse.paho.client.mqttv3 which has the ECLIPSE.RSA and ECLIPSE.SF signature files in the maven pull.
I am using IntelliJ community edition 2016.2 and Build Artificats to try to get a single executable JAR for use on a PI (as you may have guessed from com.pi4j lib).
The error I am getting is:
Error: A JNI error has occurred, please check your installation and try again Exception in thread "main" java.lang.SecurityException: Invalid signature file digest for Manifest main attributes
I have tried the links I have found to no avail but it is most likely my lack of understanding here and here.
POM.XML:
<groupId>piGroup</groupId>
<artifactId>Pi4JTrigger</artifactId>
<version>1.0-SNAPSHOT</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<filters>
<filter>
<artifact>org.bouncycastle:*</artifact>
<excludes>
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
</excludes>
</filter>
</filters>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>com.futuredecisions.parkingpi</mainClass>
</transformer>
</transformers>
<shadedArtifactAttached>true</shadedArtifactAttached>
</configuration>
</execution>
</executions>
<repositories>
<repository>
<id>Eclipse Paho Repo</id>
<url>https://repo.eclipse.org/content/repositories/paho-releases/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>com.pi4j</groupId>
<artifactId>pi4j-core</artifactId>
<version>1.1</version>
</dependency>
<dependency>
<groupId>org.eclipse.paho</groupId>
<artifactId>org.eclipse.paho.client.mqttv3</artifactId>
<version>1.0.2</version>
</dependency>
</dependencies>
</project>
Please if you know how to solve this assume im a 4 year old. As 1 I have no hair left from pulling it out and 2, why would you ever create a an automated cool way to manage dependencies and then go and make it impossible to use in any kind of friendly way ?