My Maven shade plugin worked well until I started to use MsSQL JDBC
When I add MsSql to pom.xml and I want to run the app I get an error
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
Any suggestion how can I resolve it? However, the Main class is empty just a simple main method is there.
<build>
<plugins>
<!-- Maven Shade Plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.4.3</version>
<executions>
<!-- Run shade goal on package phase -->
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<transformers>
<!-- add Main-Class to manifest file -->
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>mdb.Main</mainClass>
</transformer>
</transformers>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>com.microsoft.sqlserver</groupId>
<artifactId>mssql-jdbc</artifactId>
<version>6.2.2.jre7</version>
</dependency>
</dependencies>
</project>