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
## # Build
# 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
sourceCompatibility=10 sourceCompatibility=10
targetCompatibility=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.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 #!/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() { function copy() {
echo -e "Creating configuration directory under /etc/cas" echo -e "Creating configuration directory under /etc/cas"
mkdir -p /etc/cas/config mkdir -p /etc/cas/config
...@@ -11,26 +20,28 @@ function copy() { ...@@ -11,26 +20,28 @@ function copy() {
function help() { function help() {
clear clear
echo "******************************************************************" echo "******************************************************************"
echo "Apereo CAS" tput setaf 2
echo "Apereo CAS ${casVersion}"
echo "Enterprise Single SignOn for all earthlings and beyond" echo "Enterprise Single SignOn for all earthlings and beyond"
tput sgr 0
echo "- https://github.com/apereo/cas" echo "- https://github.com/apereo/cas"
echo "- https://apereo.github.io/cas" echo "- https://apereo.github.io/cas"
echo "******************************************************************" echo "******************************************************************"
echo -e "Usage: build.sh [maven|gradle] [copy|clean|package|run|update|debug|tomcat|gencert]\n" echo -e "Usage: build.sh [maven|gradle] [copy|clean|package|run|dependencies|update|debug|tomcat|gencert]\n"
echo " clean: Clean Maven build directory" echo -e "\tclean: \t\tClean Maven build directory"
echo " cli: Run the CAS command line shell and pass commands" echo -e "\tcli: \t\tRun 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 -e "\tcopy: \t\tCopy 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 -e "\tdebug: \t\tRun cas.war and listen for Java debugger on port 5000"
echo " dependencies: Get a report of all dependencies configured in the build" echo -e "\tdependencies: \tGet a report of all dependencies configured in the build"
echo " gencert: Create keystore with SSL certificate in location where CAS looks by default" echo -e "\tgencert: \tCreate 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 -e "\tgetview: \tAsk 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 -e "\tlistviews: \tList all CAS views that ship with the web application and can be customized in the overlay"
echo " package: Clean and build CAS war" echo -e "\tpackage: \tClean and build CAS war"
echo " run: Build and run cas.war via Java as an executable war" echo -e "\trun: \t\tBuild 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 -e "\trunalone: \tBuild 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 -e "\ttomcat: \tDeploy 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 "\tupdate: \tPackage the CAS overlay by force-updating dependencies and SNAPSHOT versions"
} }
function clean() { function clean() {
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
<plugin> <plugin>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId> <artifactId>spring-boot-maven-plugin</artifactId>
<version>${springboot.version}</version> <version>${springBootVersion}</version>
<configuration> <configuration>
<mainClass>${startClass}</mainClass> <mainClass>${startClass}</mainClass>
<addResources>true</addResources> <addResources>true</addResources>
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
<excludes> <excludes>
<exclude> <exclude>
<groupId>org.apereo.cas</groupId> <groupId>org.apereo.cas</groupId>
<artifactId>cas-server-webapp${app.server}</artifactId> <artifactId>cas-server-webapp${appServer}</artifactId>
</exclude> </exclude>
</excludes> </excludes>
</configuration> </configuration>
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
<overlays> <overlays>
<overlay> <overlay>
<groupId>org.apereo.cas</groupId> <groupId>org.apereo.cas</groupId>
<artifactId>cas-server-webapp${app.server}</artifactId> <artifactId>cas-server-webapp${appServer}</artifactId>
</overlay> </overlay>
</overlays> </overlays>
</configuration> </configuration>
...@@ -77,19 +77,13 @@ ...@@ -77,19 +77,13 @@
</build> </build>
<properties> <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> <isExecutable>false</isExecutable>
<startClass>org.apereo.cas.web.CasWebApplication</startClass> <startClass>org.apereo.cas.web.CasWebApplication</startClass>
<mainClass>org.springframework.boot.loader.WarLauncher</mainClass> <mainClass>org.springframework.boot.loader.WarLauncher</mainClass>
<maven.compiler.source>10</maven.compiler.source> <maven.compiler.source>${sourceCompatibility}</maven.compiler.source>
<maven.compiler.target>10</maven.compiler.target> <maven.compiler.target>${targetCompatibility}</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties> </properties>
...@@ -150,8 +144,8 @@ ...@@ -150,8 +144,8 @@
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>org.apereo.cas</groupId> <groupId>org.apereo.cas</groupId>
<artifactId>cas-server-webapp${app.server}</artifactId> <artifactId>cas-server-webapp${appServer}</artifactId>
<version>${cas.version}</version> <version>${casVersion}</version>
<type>war</type> <type>war</type>
<scope>runtime</scope> <scope>runtime</scope>
</dependency> </dependency>
...@@ -177,15 +171,14 @@ ...@@ -177,15 +171,14 @@
</activation> </activation>
<id>external</id> <id>external</id>
<properties> <properties>
<app.server></app.server>
<isExecutable>false</isExecutable> <isExecutable>false</isExecutable>
<mainClass>${startClass}</mainClass> <mainClass>${startClass}</mainClass>
</properties> </properties>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>org.apereo.cas</groupId> <groupId>org.apereo.cas</groupId>
<artifactId>cas-server-webapp${app.server}</artifactId> <artifactId>cas-server-webapp</artifactId>
<version>${cas.version}</version> <version>${casVersion}</version>
<type>war</type> <type>war</type>
<scope>compile</scope> <scope>compile</scope>
</dependency> </dependency>
...@@ -204,7 +197,7 @@ ...@@ -204,7 +197,7 @@
<goal>wget</goal> <goal>wget</goal>
</goals> </goals>
<configuration> <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> <unpack>true</unpack>
<outputDirectory>${project.basedir}</outputDirectory> <outputDirectory>${project.basedir}</outputDirectory>
</configuration> </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