It was a mistake to run a project with Gradle today, and it used to run with Ant.
The symptoms are as follows: The build is normal, but when run prompts
Exception in thread ' main ' java.lang.SecurityException:Invalid signature file Digest for Manifest main attributes
At first it looks like the signature doesn't match, guess it might be gradle and Ant's bag.
So I searched for a symptom:
Stackoveflow:invalid Signature
IText question
After reading the discussion above I understand that because gradle all the dependency together, different versions of the package may conflict
Then Justin looked at it and immediately pointed out that this was because of the signature conflict, some SF, RSA files were duplicated, and our project didn't actually need these files .
MAVEN Packaging issues
The problem with the above is basically the same.
So I went to change the Gradle.build file under the project directory.
Exclude dependency
With this man's approach, in the Runtime.collect after the sentence add three words exclude on the line
From {configurations.runtime.collect {ziptree (IT)}}//
{
exclude meta-inf/*. SF "
exclude" meta-inf/*. DSA "
exclude" meta-inf/*. RSA "
}
It may not be the same for everyone, but I can solve the problem by doing so.