Hi,
On the cas v5.2 with gradle, the command ./gradlew clean run explodeWar doesn't seem to do anything.
After investigation, the problem is that the cas.war is not working properly, and the command zipTree in gradle doesn't create the fileTree that is used by the command explodeWar.
When trying to extract with the command "jar xvf cas.war", nothing happen. When extracting with "unzip cas.war" it is working, but the command "zip -sf cas.war" signal that the zip/war is malformed
$ zip -sf cas.war
zip warning: expected 653 entries but found 80
zip error: Zip file structure invalid (cas.war)
I found another file cas.war.original, generated by gradle, the difference between both is the tomcat inside.
So I modified temporarily the explodeWar command :
I replaced into explodeWar in cas/build.gradle
from zipTree(project.war.outputs.files.singleFile)
by this :
from zipTree(project.war.outputs.files.singleFile.toString() + ".original")
At the same time, the copy function is not working either:
task explodeWar(type: Copy, group: "build", description: "Explodes the cas.war") {
from zipTree(project.war.outputs.files.singleFile.toString() + ".original")
into "${buildDir}/cas"
doLast{
logger.info "CAS web application artifact exploded into [cas/build/cas]"
}
}
It is said:
A Copy task only gets executed if it has something to copy. Telling it what to copy is part of configuring the task, and therefore needs to be done in the configuration phase, rather than the execution phase.