Commit 205be64c authored by Misagh Moayyed's avatar Misagh Moayyed

working on overlay

parent 5e274c5f
cas.version=6.0.0-RC1-SNAPSHOT
# Versions
app.server=-tomcat
casVersion=6.0.0-RC1-SNAPSHOT
appServer=-tomcat
springBootVersion=2.0.3.RELEASE
tomcatVersion=9
tomcatFullVersion=${tomcat.version}.0.10
##
# Only modify below this line if you know what you're doing!
##
cas.run.jvmArgs=-Xmx2048M
cas.debug.jvmArgs=-Xmx2048M -XX:+TieredCompilation -XX:TieredStopAtLevel=1 -Xdebug -Xrunjdwp:transport=dt_socket,address=5005,server=y,suspend=y
gradle.version=4.9
# Build
sourceCompatibility=10
targetCompatibility=10
springboot.version=2.0.3.RELEASE
# Maven
# ...
# Gradle
gradle.version=4.9
cas.run.jvmArgs=-Xmx2048M
cas.debug.jvmArgs=-Xmx2048M -XX:+TieredCompilation -XX:TieredStopAtLevel=1 -Xdebug -Xrunjdwp:transport=dt_socket,address=5005,server=y,suspend=y
# For debug, increase speed when executing gradle many times
# Daemon will keep running a daemon for 3h hours on each gradle run, improves speed
org.gradle.daemon=true
org.gradle.jvmargs=-Xmx2048M -XX:+TieredCompilation -XX:TieredStopAtLevel=1
org.gradle.jvmargs=-Xmx2048M -XX:+TieredCompilation -XX:TieredStopAtLevel=1
\ No newline at end of file
#!/bin/bash
while IFS='' read -r line || [[ -n "$line" ]]; do
if [ -n "$line" ] && [[ $line != \#* ]] ; then
IFS='=' read -r -a array <<< "$line"
varName=${array[0]}
varValue=${array[1]}
export "$varName"="$varValue" 2>/dev/null
fi
done < ./build.properties
function copy() {
echo -e "Creating configuration directory under /etc/cas"
mkdir -p /etc/cas/config
......@@ -11,26 +20,28 @@ function copy() {
function help() {
clear
echo "******************************************************************"
echo "Apereo CAS"
tput setaf 2
echo "Apereo CAS ${casVersion}"
echo "Enterprise Single SignOn for all earthlings and beyond"
tput sgr 0
echo "- https://github.com/apereo/cas"
echo "- https://apereo.github.io/cas"
echo "******************************************************************"
echo -e "Usage: build.sh [maven|gradle] [copy|clean|package|run|update|debug|tomcat|gencert]\n"
echo " clean: Clean Maven build directory"
echo " cli: Run the CAS command line shell and pass commands"
echo " copy: Copy config from the project's local etc/cas/config directory to the root /etc/cas/config"
echo " debug: Run cas.war and listen for Java debugger on port 5000"
echo " dependencies: Get a report of all dependencies configured in the build"
echo " gencert: Create keystore with SSL certificate in location where CAS looks by default"
echo " getview: Ask for a view name to be included in the overlay for customizations"
echo " listviews: List all CAS views that ship with the web application and can be customized in the overlay"
echo " package: Clean and build CAS war"
echo " run: Build and run cas.war via Java as an executable war"
echo " runalone: Build and run cas.war on its own as a standalone executable"
echo " tomcat: Deploy the CAS web application to an external Apache Tomcat server"
echo " update: Package the CAS overlay by force-updating dependencies and SNAPSHOT versions"
echo -e "Usage: build.sh [maven|gradle] [copy|clean|package|run|dependencies|update|debug|tomcat|gencert]\n"
echo -e "\tclean: \t\tClean Maven build directory"
echo -e "\tcli: \t\tRun the CAS command line shell and pass commands"
echo -e "\tcopy: \t\tCopy config from the project's local etc/cas/config directory to the root /etc/cas/config"
echo -e "\tdebug: \t\tRun cas.war and listen for Java debugger on port 5000"
echo -e "\tdependencies: \tGet a report of all dependencies configured in the build"
echo -e "\tgencert: \tCreate keystore with SSL certificate in location where CAS looks by default"
echo -e "\tgetview: \tAsk for a view name to be included in the overlay for customizations"
echo -e "\tlistviews: \tList all CAS views that ship with the web application and can be customized in the overlay"
echo -e "\tpackage: \tClean and build CAS war"
echo -e "\trun: \t\tBuild and run cas.war via Java as an executable war"
echo -e "\trunalone: \tBuild and run cas.war on its own as a standalone executable"
echo -e "\ttomcat: \tDeploy the CAS web application to an external Apache Tomcat server"
echo -e "\tupdate: \tPackage the CAS overlay by force-updating dependencies and SNAPSHOT versions"
}
function clean() {
......
......@@ -22,7 +22,7 @@
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>${springboot.version}</version>
<version>${springBootVersion}</version>
<configuration>
<mainClass>${startClass}</mainClass>
<addResources>true</addResources>
......@@ -32,7 +32,7 @@
<excludes>
<exclude>
<groupId>org.apereo.cas</groupId>
<artifactId>cas-server-webapp${app.server}</artifactId>
<artifactId>cas-server-webapp${appServer}</artifactId>
</exclude>
</excludes>
</configuration>
......@@ -62,7 +62,7 @@
<overlays>
<overlay>
<groupId>org.apereo.cas</groupId>
<artifactId>cas-server-webapp${app.server}</artifactId>
<artifactId>cas-server-webapp${appServer}</artifactId>
</overlay>
</overlays>
</configuration>
......@@ -77,19 +77,13 @@
</build>
<properties>
<cas.version>6.0.0-RC1-SNAPSHOT</cas.version>
<springboot.version>2.0.3.RELEASE</springboot.version>
<tomcat.version>9</tomcat.version>
<tomcat.fullversion>${tomcat.version}.0.10</tomcat.fullversion>
<!-- app.server could be -jetty, -undertow, -tomcat, or blank if you plan to provide appserver -->
<app.server>-tomcat</app.server>
<isExecutable>false</isExecutable>
<startClass>org.apereo.cas.web.CasWebApplication</startClass>
<mainClass>org.springframework.boot.loader.WarLauncher</mainClass>
<maven.compiler.source>10</maven.compiler.source>
<maven.compiler.target>10</maven.compiler.target>
<maven.compiler.source>${sourceCompatibility}</maven.compiler.source>
<maven.compiler.target>${targetCompatibility}</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
......@@ -150,8 +144,8 @@
<dependencies>
<dependency>
<groupId>org.apereo.cas</groupId>
<artifactId>cas-server-webapp${app.server}</artifactId>
<version>${cas.version}</version>
<artifactId>cas-server-webapp${appServer}</artifactId>
<version>${casVersion}</version>
<type>war</type>
<scope>runtime</scope>
</dependency>
......@@ -177,15 +171,14 @@
</activation>
<id>external</id>
<properties>
<app.server></app.server>
<isExecutable>false</isExecutable>
<mainClass>${startClass}</mainClass>
</properties>
<dependencies>
<dependency>
<groupId>org.apereo.cas</groupId>
<artifactId>cas-server-webapp${app.server}</artifactId>
<version>${cas.version}</version>
<artifactId>cas-server-webapp</artifactId>
<version>${casVersion}</version>
<type>war</type>
<scope>compile</scope>
</dependency>
......@@ -204,7 +197,7 @@
<goal>wget</goal>
</goals>
<configuration>
<url>http://www-eu.apache.org/dist/tomcat/tomcat-${tomcat.version}/v${tomcat.fullversion}/bin/apache-tomcat-${tomcat.fullversion}.zip</url>
<url>http://www-eu.apache.org/dist/tomcat/tomcat-${tomcatVersion}/v${tomcatFullVersion}/bin/apache-tomcat-${tomcatFullVersion}.zip</url>
<unpack>true</unpack>
<outputDirectory>${project.basedir}</outputDirectory>
</configuration>
......
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