Hi,
I have a requirement to compile jsp files for war files.
The compilation of jsp's is rather time consuming so I wish for it only to
execute when the war file it uses as input (or any of the tasks custom
dependencies) has actually changed.
Any tips on what I need to add to input.files (or alternative solutions) to the
below to make this work ?
// ------ setup compile jsp task for wars -----
task compileJsp(dependsOn: 'assemble') {
onlyIf {
project.hasProperty('compile_jsp')
//dependsOnTaskDidWork()
}
inputs.files configurations.jspCompileLibs
doLast {
appcClassPath = "c:/bea_103/wlserver_10.3/server/lib/weblogic.jar"
if (configurations.jspCompileLibs.asPath) {
appcClassPath = appcClassPath + ";" +
configurations.jspCompileLibs.asPath
}
ant.java(classname: 'weblogic.appc', fork: true,
classpath:appcClassPath, failOnError: true) {
arg(line: war.archivePath)
arg(line: "-compiler jdt")
}
}
}
build.dependsOn compileJsp
// ------ end setup compile jsp ---------
PS the jsp compiler takes a war as input, compiles the jsps and packages a new
war file with the same name as the input war
kind regards
Magnus