Skip to content

Commit 0f6fdff

Browse files
committed
Jarring now excludes the manafest files from dependants
1 parent a28a151 commit 0f6fdff

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

build.gradle

+15-5
Original file line numberDiff line numberDiff line change
@@ -59,15 +59,25 @@ dependencies {
5959
compile fileTree (dir: buildDir.getAbsolutePath()+'/javasdk/NRSDK/lib_addons/', includes: ['*.jar'])
6060
}
6161

62-
6362
// create a fat-jar (class files plus dependencies
6463
// excludes VRL.jar (plugin jar files must not start with 'vrl-\\d+')
6564
jar {
6665

67-
// dependencies except VRL
68-
from configurations.runtime.asFileTree.
69-
filter({file->return !file.name.startsWith("vrl-0")}).
70-
files.collect { zipTree(it) }
66+
// remove the security files (from mail.jar / activation.jar) so that the jar will be executable.
67+
68+
doFirst {
69+
// dependencies except VRL
70+
from (configurations.runtime.asFileTree.
71+
filter({file->return !file.name.startsWith("vrl-0")}).
72+
files.collect { zipTree(it) } ){
73+
exclude 'META-INF/MANIFEST.MF'
74+
exclude 'META-INF/*.SF'
75+
exclude 'META-INF/*.DSA'
76+
exclude 'META-INF/*.RSA'
77+
}
78+
}
79+
80+
7181

7282
// project class files compiled from source
7383
from files(sourceSets.main.output.classesDir)

0 commit comments

Comments
 (0)