cas7, how do I load thymeleaf files in Intellij?

100 views
Skip to first unread message

Yan Zhou

unread,
Apr 12, 2024, 2:40:30 PM4/12/24
to CAS Community
Hello,

I am new to Intellij, and is using CAS7 overlay project. I imported it into Intellij. I was unable to load classes and html files in cas-server-support-thymeleaf.

See screen shot, in my project,  thymeleaf is correctly listed on compileClassPath on the right, but not listed in External libraries on the left, that maybe why I cannot locate the files in Intellij.

If I had to add this in buid.gradle, then thymeleaf shows up in external libraries and I also can load the HTML and class files in thymeleaf packages

implementation "org.apereo.cas:cas-server-support-thymeleaf"

i should not have to do that, what am I missing?

Thx,
Yan

Thx!
cas-dependencies.png
cas-dependencies.png

Ray Bon

unread,
Apr 13, 2024, 12:18:06 AM4/13/24
to cas-...@apereo.org
Yan,

The overlay project is a shell that makes deployment simple because it _does not_ include all of the files from cas.
When you build the overlay, it pulls in the cas war file, replacing any files you may want to override with ones from your overlay src folder.

If you want to make changes to the thymeleaf  files, you can bring them into the overlay, see https://fawnoos.com/2023/12/15/cas70x-gettingstarted-overlay/#user-interface-customizations

Ray



On Fri, 2024-04-12 at 11:08 -0700, Yan Zhou wrote:
Notice: This message was sent from outside the University of Victoria email system. Please be cautious with links and sensitive information.

Yan Zhou

unread,
Apr 16, 2024, 12:03:32 PM4/16/24
to CAS Community, Ray Bon
that is good to know!

What we have been asked to do is to use a different look & feel, basically, we will keep the HTML elements, but CSS, layout, look/feel will be different. I suppose we might as well get the entire cas-server-support-thymeleaf directory as we will be modifying every HTML file there, plus adding some more since we have customized flow added.

anyway, I tried this approach, it is fairly slow, took over 3 minutes to get casLoginView.html, and it failed.  The file is correctly copied over in build directory, it is not clear why it failed.  Illegal char <:> at index 49.  Any idea?

Yan

> Task :unzipWAR
Unzipped WAR into C:\gitworkspace\cas7-suite\cas-overlay-template\build/app

> Task :unzip
Exploded WAR resources into C:\gitworkspace\cas7-suite\cas-overlay-template\build/cas-resources

> Task :getResource FAILED

FAILURE: Build failed with an exception.

* Where:
Script 'C:\gitworkspace\cas7-suite\cas-overlay-template\gradle\tasks.gradle' line: 313

* What went wrong:
Execution failed for task ':getResource'.
> Illegal char <:> at index 49: C:\gitworkspace\cas7-suite\cas-overlay-template\C:\gitworkspace\cas7-suite\cas-overlay-template\build\cas-resources\templates\login\casLoginView.html

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.

BUILD FAILED in 3m 9s
10 actionable tasks: 9 executed, 1 up-to-date

Ray Bon

unread,
Apr 16, 2024, 1:24:49 PM4/16/24
to yana...@gmail.com, cas-...@apereo.org
Yan,

The illegal char may be a typo in css, e.g. border: :3px    (a second ':').

Be cautious of modifying pages too much. We had a heavily customized login page and it prevented duo flow (stuck on 'Processing' page).
The UI is becoming more complex. Upgrades and feature additions may be challenging if much of the upstream code is modified.


Ray
Reply all
Reply to author
Forward
0 new messages