Heres the subproject build.gradle:
apply plugin: ‘shadow’ import org.gradle.api.plugins.shadow.transformers.AppendingTransfomer
buildscript {
repositories {
maven {
name ‘Gradle Shadow’
url ‘http://dl.bintray.com/content/johnrengelman/gradle-plugins’
}
}
dependencies {
classpath group: ‘org.gradle.plugins’, name: ‘shadow’, version: ‘0.7.4’
} }
dependencies {
compile project(’:cdm’)
compile project(’:grib’)
compile project(’:tdcommon’)
compile ‘log4j:log4j:1.2.17’
runtime ‘org.slf4j:slf4j-log4j12:1.7.5’
compile (‘org.springframework:spring-core:3.1.1.RELEASE’)
compile (‘org.springframework:spring-context:3.1.1.RELEASE’)
compile (‘org.springframework:spring-beans:3.1.1.RELEASE’) }
ext {
tdmJar = ‘tdm-’+version+’.jar’ }
shadow {
exclude ‘com/sleepycat/**’
exclude ‘net/sf/**’
exclude ‘org/jsoup/**’
exclude ‘org/quartz/**’
exclude ‘META-INF/*.DSA’
exclude ‘META-INF/*.RSA’
manifest {
attributes ‘Implementation-Title’: tdmJar,
‘Implementation-Version’: version,
‘Implementation-Vendor’: ‘UCAR/Unidata’,
‘Implementation-Vendor-Id’: ‘edu.ucar’,
‘Built-On’: new Date(),
‘Main-Class’: ‘thredds.tdm.TdmRunner’
}
transformer(AppendingTransfomer) {
resource = ‘META-INF/spring.handlers’
}
transformer(AppendingTransfomer) {
resource = ‘META-INF/spring.schemas’
} }
and the main project:
subprojects {
apply plugin: ‘java’
sourceCompatibility = 1.6
version = ‘4.4.0’
repositories {
maven {
url “https://artifacts.unidata.ucar.edu/content/groups/unidata/”
}
mavenCentral()
}
ext {
springVersion = “3.2.3.RELEASE”
}
// import fatJar
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath ‘eu.appsatori:gradle-fatjar-plugin:0.2-rc1’
}
}
jar {
manifest {
attributes ‘Implementation-Version’: version,
‘Implementation-Vendor’: ‘UCAR/Unidata’,
‘Implementation-Vendor-Id’: ‘edu.ucar’,
‘Built-On’: new Date()
}
}
}