/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


On Friday, December 22, 2017 at 2:36:10 AM UTC-8, Francis wrote:
>
> 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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/a/apereo.org/d/msgid/cas-user/15445994-f117-40fb-8c52-e04c5a963043%40apereo.org.

Reply via email to