cas5 rebuild and restart for every change??

43 views
Skip to first unread message

Yan Zhou

unread,
Apr 9, 2020, 3:16:32 PM4/9/20
to CAS Community
Hi there,

CAS5.3.x overlay.  It looks like we have to build it into a WAR file first, then either run it as an executable WAR or deploy to external container. 

There is also a way to run CAS as an executable WAR via Spring Boot's maven plugin, but that requires NO change to CAS dependencies, which is not my use case (I have made a lot changes in CAS dependencies).

Is there some way that I can do a hot swap, e.g., see the static HTML/CSS change with the refresh of a browser?

Even in standalone mode, it takes several minutes for CAS 5.3 to startup. 
Thanks,
Yan

Richard Frovarp

unread,
Apr 9, 2020, 3:28:37 PM4/9/20
to cas-...@apereo.org
If you deploy to an external container like Tomcat, you can instead of
using the war, explode it into the webapp directory. Wars and jars are
just zip files. Or let Tomcat explode it for you the first time, stop
Tomcat, then delete war. You can edit content without having to
rebuild.

I think that the HTML / CSS can be updated live enough if you use the
method above. If nothing else it saves you the build step even if you
have to bounce Tomcat.

David Curry

unread,
Apr 9, 2020, 3:35:34 PM4/9/20
to CAS Community
Just to add to what Richard said, you'll also want to put

spring.thymeleaf.cache: false

in your cas.properties so that you can edit the files and see the changes "immediately" without having to bounce Tomcat. Note that it seems to only refresh every 60 seconds though; so my usual approach was to save the files you've changed, run "date" and see what time it is, and then wait until the seconds reach ":00" before refreshing the browser. Annoying, but still a lot faster than rebuilding/redeploying.

Once you've changed everything, copy the files back into your maven repo, take the cache line from about out of cas.properties, rebuild and redeploy.

--

DAVID A. CURRY, CISSP
DIRECTOR • INFORMATION SECURITY & PRIVACY
THE NEW SCHOOL  INFORMATION TECHNOLOGY

71 FIFTH AVE., 9TH FL., NEW YORK, NY 10003
+1 646 909-4728david...@newschool.edu



--
- 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+u...@apereo.org.
To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/cas-user/bb3e28f3ade53f5c94ca10aea400869a577a8e00.camel%40ndsu.edu.

Ray Bon

unread,
Apr 9, 2020, 3:51:16 PM4/9/20
to cas-...@apereo.org
Yan,

In addition to exploding the war, you can create a link to the exploded war from within tomcat webapps
$ ll Applications/tomcat/webapps/
lrwxrwxrwx 1 rbon rbon   51 Apr  1 19:20 cas -> /home/rbon/workspace/cas-overlay-template/build/cas

Ray

On Thu, 2020-04-09 at 19:28 +0000, Richard Frovarp wrote:
Notice: This message was sent from outside the University of Victoria email system. Please be cautious with links and sensitive information.
--
- 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+u...@apereo.org
.
To view this discussion on the web visit 
https://groups.google.com/a/apereo.org/d/msgid/cas-user/bb3e28f3ade53f5c94ca10aea400869a577a8e00.camel%40ndsu.edu
.
-- 
Ray Bon
Programmer Analyst
Development Services, University Systems

I respectfully acknowledge that my place of work is located within the ancestral, traditional and unceded territory of the Songhees, Esquimalt and WSÁNEĆ Nations.
Reply all
Reply to author
Forward
0 new messages