add jsp-based webui

pull/34/head
Zlatin Balevsky 2019-11-29 16:40:02 +00:00
parent c33b824871
commit 3775f28af7
1 changed files with 46 additions and 0 deletions

46
webui/build.gradle 100644
View File

@ -0,0 +1,46 @@
configurations {
warArtifact
}
apply plugin : 'war'
dependencies {
providedCompile project(':core')
}
war {
webInf {
from "$buildDir/compiledJsps"
into "classes"
}
excludes = new HashSet(['**/*.jsp'])
webXml = file("$buildDir/tmp_jsp/web.xml")
}
task precompileJsp {
doLast {
ant.taskdef (name : 'jasper',
classname: 'org.apache.jasper.JspC',
classpath: configurations.compile.asPath)
def generated = new File("$buildDir/tmp_jsp")
generated.mkdirs()
ant.jasper(package: 'com.muwire.webui',
uriroot: webAppDir,
outputDir: "$buildDir/tmp_jsp",
compilerSourceVM: "1.8",
compilerTargetVM: "1.8",
webXml: "$buildDir/tmp_jsp/web.xml") // maybe change this to a fragment?
def output = new File("$buildDir/compiledJsps")
output.mkdirs()
ant.javac(srcDir: 'build/tmp_jsp',
destDir:file("$buildDir/compiledJsps"),
classpath: configurations.compile.asPath)
}
}
war.dependsOn precompileJsp
artifacts {
warArtifact war
}