File tree Expand file tree Collapse file tree 2 files changed +35
-0
lines changed
app/src/main/resources/common Expand file tree Collapse file tree 2 files changed +35
-0
lines changed Original file line number Diff line number Diff line change @@ -125,6 +125,21 @@ Run the CAS web application as a *standalone* executable WAR:
125
125
./gradlew[.bat] clean executable
126
126
```
127
127
128
+ ### CDS Support
129
+
130
+ CDS is a JVM feature that can help reduce the startup time and memory footprint of Java applications. CAS via Spring Boot
131
+ now has support for easy creation of a CDS friendly layout. This layout can be created by extracting the CAS web application file
132
+ with the help of the `tools` jarmode:
133
+
134
+ ```bash
135
+ # Note:
136
+ # You must first build the web application with "executable" turned off
137
+ java -Djarmode=tools -jar build/libs/{ {appName} }.war extract
138
+
139
+ # Run the CAS web application via CDS
140
+ java -jar { {appName} }/{ {appName} }.war
141
+ ```
142
+
128
143
## External
129
144
130
145
Deploy the binary web application file in `build/libs` after a successful build to a servlet container of choice.
Original file line number Diff line number Diff line change @@ -212,6 +212,26 @@ if [[ "$CAS_MAJOR_VERSION" -ge 7 ]]; then
212
212
./gradlew --init-script openrewrite.gradle rewriteDryRun \
213
213
-PtargetVersion=" ${targetVersion} " -DactiveRecipe=" $recipeName "
214
214
[ $? -eq 0 ] && echo " Gradle command ran successfully." || exit 1
215
+
216
+ if [[ " $CAS_MINOR_VERSION " -ge 1 ]]; then
217
+ printgreen " Build CAS web application without executable mode..."
218
+ ./gradlew clean build -Pexecutable=false --no-daemon
219
+
220
+ printgreen " Extracting Uber WAR from CAS to prepare CDS launch..."
221
+ java -Djarmode=tools -jar build/libs/cas.war extract
222
+ java -jar ./cas/cas.war --spring.profiles.active=none --server.ssl.enabled=false --server.port=8091 &
223
+ pid=$!
224
+ sleep 15
225
+ echo " Launched executable CAS with pid ${pid} . Waiting for CAS server to come online..."
226
+ until curl -k -L --output /dev/null --silent --fail http://localhost:8091/cas/login; do
227
+ echo -n ' .'
228
+ sleep 5
229
+ done
230
+ echo -e " \n\nReady!"
231
+ echo " Killing process $pid "
232
+ kill -9 $pid
233
+ [ " $CI " = " true" ] && pkill java
234
+ fi
215
235
fi
216
236
217
237
[ " $CI " = " true" ] && pkill java
You can’t perform that action at this time.
0 commit comments