Commit 666059c0 authored by Misagh Moayyed's avatar Misagh Moayyed

working on external tomcat setup

parent e63fc60f
......@@ -12,3 +12,4 @@ build/
......@@ -10,14 +10,14 @@ function copy() {
function help() {
echo "Usage: [copy|clean|package|run|debug|bootrun|gencert]"
echo "Usage: [copy|clean|package|run|debug|tomcat|gencert]"
echo " copy: Copy config from ./etc/cas/config to /etc/cas/config"
echo " clean: Clean Maven build directory"
echo " package: Clean and build CAS war"
echo " run: Build and run cas.war via Java (i.e. java -jar target/cas.war)"
echo " runalone: Build and run cas.war on its own as a standalone executable (target/cas.war)"
echo " debug: Run CAS.war and listen for Java debugger on port 5000"
echo " bootrun: Run with maven spring boot plugin"
echo " tomcat: Deploy the CAS web application to an external Apache Tomcat server"
echo " listviews: List all CAS views that ship with the web application and can be customized in the overlay"
echo " getview: Ask for a view name to be included in the overlay for customizations"
echo " gencert: Create keystore with SSL certificate in location where CAS looks by default"
......@@ -35,9 +35,19 @@ function package() {
# copy
function bootrun() {
function tomcat() {
./mvnw clean package spring-boot:run -P bootiful -T 5 "$@"
export CATALINA_HOME=./apache-tomcat/
echo "Attempting to shutdown Apache Tomcat..."
./apache-tomcat/bin/ 2>/dev/null
ps -ef | grep tomcat
rm -Rf ./apache-tomcat
./mvnw clean package -P external -T 5 "$@" && cp target/cas.war apache-tomcat/webapps/
chmod +x ./apache-tomcat/bin/*.sh
tail -F ./apache-tomcat/logs/catalina.out
function debug() {
......@@ -92,7 +102,6 @@ function getview() {
function gencert() {
if [[ ! -d /etc/cas ]] ; then
......@@ -159,9 +168,9 @@ case "$1" in
package "$@"
bootrun "$@"
tomcat "$@"
debug "$@"
......@@ -7,7 +7,7 @@
......@@ -79,7 +79,9 @@
<!-- app.server could be -jetty, -undertow, -tomcat, or blank if you plan to provide appserver -->
......@@ -173,10 +175,11 @@
......@@ -184,10 +187,51 @@
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment