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]"
    }
}

How to use copy 
command: 
https://stackoverflow.com/questions/20249194/dynamically-created-task-of-type-copy-is-always-up-to-date?answertab=active#tab-top

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*.


 

-- 
- Website: https://apereo.github.io/cas
- Gitter Chatroom: https://gitter.im/apereo/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
--- 
You received this message because you are subscribed to the Google Groups "CAS 
Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cas-user+unsubscr...@apereo.org.
To view this discussion on the web visit 
https://groups.google.com/a/apereo.org/d/msgid/cas-user/4964baf0-571e-4e2d-a901-e91715c5c54a%40apereo.org.

Reply via email to