This repository has been archived on 2024-01-25. You can view files and clone it, but cannot push or open issues or pull requests.
SDi-Servlet/build.gradle

39 lines
942 B
Groovy
Raw Permalink Normal View History

2023-11-15 07:02:37 +00:00
plugins {
id 'war'
id 'java'
id "de.undercouch.download" version "4.1.2"
}
group 'ch.hevs.sdi'
version '1.0-SNAPSHOT'
repositories {
mavenCentral()
}
dependencies {
providedCompile group: 'javax.servlet', name: 'javax.servlet-api', version: '4.0.1'
implementation group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.11.3'
}
task downloadTomcat(type: Download) {
onlyIf { !file('tomcat').exists() && !file('tomcat.zip').exists() }
src "https://archive.apache.org/dist/tomcat/tomcat-9/v9.0.56/bin/apache-tomcat-9.0.56.zip"
dest new File("tomcat.zip")
}
task installTomcat(dependsOn: downloadTomcat, type: Copy) {
onlyIf { !file('tomcat').exists() }
from zipTree(downloadTomcat.dest)
into projectDir
fileMode 0777
doLast {
delete("tomcat.zip")
file("apache-tomcat-9.0.56").renameTo(file("tomcat"))
}
}
clean.doFirst {
delete 'tomcat'
}