@@ -34,6 +34,12 @@ ext.junitVintageVersion = '4.12.0-RC3'
3434ext. junitPlatformVersion = ' 1.4.0'
3535ext. junitJupiterVersion = ' 5.4.0'
3636
37+ // This enables including a logging jar in the application artifacts produced by this project - the installer and the client jars
38+ // without that jar ending up in the library artifact.
39+ configurations {
40+ datahubLogging
41+ }
42+
3743dependencies {
3844 // Forcing use of 1.3.71 - which is what OkHttp 4.7.2 wants, which is what Java Client 5.3 uses - so that 1.2.x
3945 // versions don't come onto the classpath
@@ -63,7 +69,7 @@ dependencies {
6369 }
6470 compile ' commons-io:commons-io:2.4'
6571 compile ' org.apache.commons:commons-text:1.1'
66-
72+ datahubLogging ' ch.qos.logback:logback-classic:1.2.3 '
6773 // For installer program
6874 compile " com.beust:jcommander:1.72"
6975
@@ -117,6 +123,11 @@ configurations.all {
117123bootJar {
118124 archiveClassifier = " installer"
119125 mainClassName = " com.marklogic.hub.dhs.installer.Main"
126+ from(configurations. datahubLogging. collect { it. isDirectory() ? it : zipTree(it) }) {
127+ exclude " META-INF/*.SF"
128+ exclude " META-INF/*.DSA"
129+ exclude " META-INF/*.RSA"
130+ }
120131}
121132
122133task clientJar (type : Jar ) {
@@ -125,6 +136,11 @@ task clientJar(type: Jar) {
125136 attributes " Main-Class" : " com.marklogic.hub.cli.client.Main"
126137 }
127138 archiveClassifier = " client"
139+ from(configurations. datahubLogging. collect { it. isDirectory() ? it : zipTree(it) }) {
140+ exclude " META-INF/*.SF"
141+ exclude " META-INF/*.DSA"
142+ exclude " META-INF/*.RSA"
143+ }
128144 from(configurations. compile. collect { it. isDirectory() ? it : zipTree(it) }) {
129145 exclude " META-INF/*.SF"
130146 exclude " META-INF/*.DSA"
0 commit comments