Cas 5.2 Cas-gradle-overlay, command explodeWar doesn't work

53 views
Skip to first unread message

Francis

unread,
Dec 22, 2017, 5:36:10 AM12/22/17
to CAS Community
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: 
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.

 

Jac Fitzgerald

unread,
Dec 17, 2018, 6:15:01 PM12/17/18
to CAS Community, cif...@msn.com

/necromancing

I just spent some time trying to use the gradle explodeWar command with 5.3.2, and the below fixes appear to still be needed. When I get a complete working overlay, I plan to try and update the build files for 5.3 - any tips welcome. 

cheers,
Jac
Reply all
Reply to author
Forward
0 new messages