Skip to content

Instantly share code, notes, and snippets.

@joemccall86
Last active December 18, 2015 00:38
Show Gist options
  • Save joemccall86/5697747 to your computer and use it in GitHub Desktop.
Save joemccall86/5697747 to your computer and use it in GitHub Desktop.
configurations {
warUnderlay
pomWorkarounds
}
repositories {
mavenCentral()
}
ext {
casVersion = '3.5.2'
casWebappDependency = "org.jasig.cas:cas-server-webapp:${casVersion}"
}
dependencies {
warUnderlay casWebappDependency + '@war'
pomWorkarounds 'javax.xml:xmldsig:1.0@pom',
'javax.jms:jms:1.1@pom',
'com.sun.jdmk:jmxtools:1.2.1@pom',
'com.sun.jmx:jmxri:1.2.1@pom'
compile(casWebappDependency + ':classes') {
configurations.pomWorkarounds.each {
exclude module: it.name - ~/-[\d.]*.pom/
}
}
runtime configurations.pomWorkarounds
}
war << {
configurations.warUnderlay.each {
logger.info "Unwarring ${it}"
ant.unwar src: it, dest: temporaryDir
logger.info "Done"
}
logger.info "Unwarring ${archivePath}"
ant.unwar src: archivePath, dest: temporaryDir
logger.info "Done"
logger.info "Re-creating ${archivePath} with files from ${temporaryDir}"
ant.war basedir: temporaryDir, destFile: archivePath
logger.info "Done"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment