Getting HTML template resources

43 views
Skip to first unread message

Dustin Luck

unread,
Aug 9, 2021, 3:56:21 PM8/9/21
to CAS Community
I updated my overlay template to the latest 6.3.6 and I'm having trouble getting HTML templates using the instructions in the README.md file (./gradlew[.bat] listTemplateViews). When I run the command, I get a 'BUILD SUCCESSFUL' message, but no templates are listed. Trying the getResource command (./gradlew getResource -PresourceName=casLoginView.html), I receive a message that "No resources could be found matching casLoginView.html".

Any help on how to extract the HTML templates would be appreciated.


Here is the full output from both commands

listTemplateViews
> Task :bootBuildInfo
> Task :generateLombokConfig UP-TO-DATE
> Task :compileJava UP-TO-DATE
> Task :processResources UP-TO-DATE
> Task :classes
> Task :bootWarMainClassName
> Task :extractCasBootWarOverlay UP-TO-DATE
> Task :bootWar
> Task :war
> Task :assemble
> Task :compileTestJava NO-SOURCE
> Task :processTestResources NO-SOURCE
> Task :testClasses UP-TO-DATE
> Task :test NO-SOURCE
> Task :check UP-TO-DATE
> Task :build

> Task :unzipWAR
Unzipped WAR into C:\Users\dluck\Documents\Temp\cas-overlay-template\build/app

> Task :listTemplateViews

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See https://docs.gradle.org/7.1.1/userguide/command_line_interface.html#sec:command_line_warnings

BUILD SUCCESSFUL in 16s
10 actionable tasks: 6 executed, 4 up-to-date


getResource
> Task :bootBuildInfo
> Task :generateLombokConfig UP-TO-DATE
> Task :compileJava UP-TO-DATE
> Task :processResources UP-TO-DATE
> Task :classes
> Task :bootWarMainClassName
> Task :extractCasBootWarOverlay UP-TO-DATE
> Task :bootWar
> Task :war
> Task :assemble
> Task :compileTestJava NO-SOURCE
> Task :processTestResources NO-SOURCE
> Task :testClasses UP-TO-DATE
> Task :test NO-SOURCE
> Task :check UP-TO-DATE
> Task :build

> Task :unzipWAR
Unzipped WAR into C:\Users\dluck\Documents\Temp\cas-overlay-template\build/app

> Task :getResource
No resources could be found matching casLoginView.html

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See https://docs.gradle.org/7.1.1/userguide/command_line_interface.html#sec:command_line_warnings

BUILD SUCCESSFUL in 28s
10 actionable tasks: 6 executed, 4 up-to-date

Chris Durham

unread,
Aug 9, 2021, 7:14:46 PM8/9/21
to CAS Community, Dustin Luck
I find explodeWar quite useful as a task - it will create a cas-resources folder in your build directory with all the files in so you can get the correct layout..

Dustin Luck

unread,
Aug 9, 2021, 8:01:24 PM8/9/21
to CAS Community, Chris Durham, Dustin Luck
Thanks, Chris. That was enough of a clue to get me to where I needed to be.

Here's what I found for others having the same problem:

In 3.6.3, the 'explodeWar' task has been renamed to 'unzip'. The 'explodeWarOnly' task has been renamed to 'unzipWar'.

The 'listTemplateViews' & 'getResource' tasks used to depend on 'explodeWar', but in 3.6.3, that was changed to 'unZipWar'. I changed both of them to depend on 'unzip' and now both tasks work fine.
Reply all
Reply to author
Forward
0 new messages