diff --git a/README.md b/README.md index 55bd207..4c70191 100644 --- a/README.md +++ b/README.md @@ -45,8 +45,8 @@ mvn package ``` The compiled _jar_ file will be located in the **target** folder -+ java-apex-api-security-.jar -+ java-apex-api-security--jar-with-dependencies.jar (this includes log4j libraries) ++ ApiSecurity-2.1.4.jar ++ ApiSecurity-2.1.4-jar-with-dependencies.jar (this includes log4j libraries) Import this jar file into your java classpath to use the utility class diff --git a/build.gradle b/build.gradle index dfcc270..3750511 100644 --- a/build.gradle +++ b/build.gradle @@ -40,10 +40,11 @@ dependencies { jar { //Evaluate at execution time where all the configurations and dependencies are resolved - from { - configurations.compileClasspath.collect { - it.isDirectory() ? it : zipTree(it) - } + from sourceSets.main.output + duplicatesStrategy = DuplicatesStrategy.EXCLUDE + dependsOn configurations.runtimeClasspath + from (configurations.runtimeClasspath.findAll { it.name.endsWith('jar') }.collect { zipTree(it) }) { + exclude 'META-INF/*.RSA', 'META-INF/*.SF', 'META-INF/*.DSA' } manifest { attributes 'Main-Class': 'ApiSigning'