Compare commits
217 Commits
| Author | SHA1 | Date |
|---|---|---|
|
|
fad84305ee | |
|
|
75828fb101 | |
|
|
4d26b4cc87 | |
|
|
cd8ff40c8c | |
|
|
37d40bddac | |
|
|
a9137ac532 | |
|
|
9e88707343 | |
|
|
5113450681 | |
|
|
b6cd25a9e5 | |
|
|
794331ff63 | |
|
|
fbdcb23696 | |
|
|
93ef556b98 | |
|
|
c658edcef8 | |
|
|
70097b86bf | |
|
|
fee67b81e3 | |
|
|
71889cfe5f | |
|
|
57d82dc57e | |
|
|
5ad1e9e254 | |
|
|
9b4a5db948 | |
|
|
bbf788fd6e | |
|
|
704908dfae | |
|
|
2466fbe872 | |
|
|
aa08664f70 | |
|
|
37db128082 | |
|
|
4ba7fc6bed | |
|
|
742b6cee08 | |
|
|
2a0dab938e | |
|
|
3a159a043a | |
|
|
f3b7a4d9fc | |
|
|
b3d8698cba | |
|
|
e9105bf459 | |
|
|
ce08720a1e | |
|
|
3ebfa1da19 | |
|
|
e9ec69cd1b | |
|
|
e9aeca1d8f | |
|
|
cff2009b9a | |
|
|
ea89c4aabf | |
|
|
d5ce5bc656 | |
|
|
e043d0fcdf | |
|
|
423502ba4e | |
|
|
15d4ac2dd0 | |
|
|
ca8b564ecc | |
|
|
1d71225bb5 | |
|
|
a8ecb1af62 | |
|
|
cad6f23f1b | |
|
|
bd648186dc | |
|
|
64f9d49f96 | |
|
|
c947c95e08 | |
|
|
3a88eb7b60 | |
|
|
da223a962f | |
|
|
211152bc61 | |
|
|
59b733919c | |
|
|
13385e89d4 | |
|
|
d325eb92cd | |
|
|
fddaafe9ec | |
|
|
b32c12bc25 | |
|
|
c040eb4ab0 | |
|
|
bd6878f104 | |
|
|
c3c681c737 | |
|
|
334366b110 | |
|
|
696d8b33de | |
|
|
6d7f6aa22e | |
|
|
266f753dfe | |
|
|
1bc49127f8 | |
|
|
b0456082e7 | |
|
|
03bd838c51 | |
|
|
4692d6be14 | |
|
|
b4a96555ae | |
|
|
c5cc2c1c96 | |
|
|
42a5c5a877 | |
|
|
1cd95f9145 | |
|
|
a0ec436e86 | |
|
|
d5634ace29 | |
|
|
334eab93ab | |
|
|
f90d732090 | |
|
|
6232ee897c | |
|
|
59bcba0803 | |
|
|
2ed6ad4c7a | |
|
|
076c4f23f7 | |
|
|
40004b70ca | |
|
|
c383a79d47 | |
|
|
74ccdabc89 | |
|
|
6d0b20e80c | |
|
|
ae967be9e4 | |
|
|
edaef20bcc | |
|
|
c07c86f661 | |
|
|
7b3154af41 | |
|
|
904adc76bc | |
|
|
759b507a36 | |
|
|
d970f4e952 | |
|
|
c19351980f | |
|
|
424641c37b | |
|
|
09c0bd027e | |
|
|
840e7d4d37 | |
|
|
b96b3db05e | |
|
|
f77549d64b | |
|
|
175d7a3d9b | |
|
|
80cef534af | |
|
|
f7d5eae228 | |
|
|
cae64f40f8 | |
|
|
f730d23aea | |
|
|
ec1eea8e65 | |
|
|
90a6e4f0a4 | |
|
|
b4ec82704c | |
|
|
aa10044d87 | |
|
|
1f8d2ccae5 | |
|
|
981c39b72b | |
|
|
67571dbeda | |
|
|
45f49df69f | |
|
|
979a3ddc99 | |
|
|
7d6ad46a42 | |
|
|
fe611f38c9 | |
|
|
78a6ea50f5 | |
|
|
8204594416 | |
|
|
564cb84a26 | |
|
|
939ea48bff | |
|
|
87a6b1ff49 | |
|
|
95510177f5 | |
|
|
a98d4dd1c1 | |
|
|
859453e55a | |
|
|
fa0054ceb2 | |
|
|
418c05b928 | |
|
|
f2191a2978 | |
|
|
68a9324f06 | |
|
|
339888eec7 | |
|
|
c73c4d5f9e | |
|
|
9611bf66d0 | |
|
|
1896a3e4ed | |
|
|
2f925473e7 | |
|
|
3bc68d73f7 | |
|
|
363d2ddd3f | |
|
|
dc5fa2a9e6 | |
|
|
2a9b5ff10c | |
|
|
ed4865b4ea | |
|
|
fed401ccd7 | |
|
|
40d272cc70 | |
|
|
0e66796f59 | |
|
|
13e4160536 | |
|
|
74d22f49a1 | |
|
|
c70e8f489f | |
|
|
2163b41b49 | |
|
|
b5e8930322 | |
|
|
d6d07bdaac | |
|
|
a914a60f5e | |
|
|
22aa439621 | |
|
|
f0e5b5a384 | |
|
|
bbb727782f | |
|
|
e5e6705303 | |
|
|
73c9cf236a | |
|
|
e22fccf9d3 | |
|
|
f0c1217884 | |
|
|
593b5ec0f3 | |
|
|
7554252b75 | |
|
|
a20b42d654 | |
|
|
52de522927 | |
|
|
27ef23f422 | |
|
|
2bd7ba2643 | |
|
|
67510e190a | |
|
|
40a9be8190 | |
|
|
20d467c026 | |
|
|
f67e043370 | |
|
|
4f62d08336 | |
|
|
0e68c6789e | |
|
|
7da2ab3f71 | |
|
|
abab408c95 | |
|
|
205be64cac | |
|
|
5e274c5fc6 | |
|
|
a0d8be8780 | |
|
|
666059c029 | |
|
|
e63fc60f82 | |
|
|
268e6b7a7e | |
|
|
ae6af09c33 | |
|
|
69825ebc01 | |
|
|
90bebc2e38 | |
|
|
4a7bb5c4d9 | |
|
|
5f1ad42aab | |
|
|
da2b9db68e | |
|
|
e9af57c1c9 | |
|
|
8471742648 | |
|
|
4f65e4cff2 | |
|
|
eb5b55fa4d | |
|
|
b472b7bc80 | |
|
|
93f1806979 | |
|
|
3c345ccc67 | |
|
|
c480f2506e | |
|
|
bb727cad8f | |
|
|
2b86ee7683 | |
|
|
de380ea991 | |
|
|
ffe33a7956 | |
|
|
f468697f9e | |
|
|
7678a822a4 | |
|
|
0bd0c62188 | |
|
|
c1af16d023 | |
|
|
d9275f38e6 | |
|
|
e9243640d2 | |
|
|
675771bcbd | |
|
|
2f88e97160 | |
|
|
e2c3b103b7 | |
|
|
cf8a33bb34 | |
|
|
6c8d86cb1f | |
|
|
fdd9e2afbd | |
|
|
ddc9b3b65d | |
|
|
2bb1f36069 | |
|
|
8d9344e0c0 | |
|
|
af2621f315 | |
|
|
7ebb59ba67 | |
|
|
ab00755c49 | |
|
|
3237953c33 | |
|
|
e17382edc1 | |
|
|
ab1ca81571 | |
|
|
87d1f8adc8 | |
|
|
7c0155d504 | |
|
|
9043ebed4d | |
|
|
c0e592ca3c | |
|
|
dfbee02c3d | |
|
|
ed647d0e15 | |
|
|
005042b351 |
|
|
@ -0,0 +1,7 @@
|
|||
target/**
|
||||
build/**
|
||||
bin/**
|
||||
.idea/**
|
||||
.history/**
|
||||
.github/**
|
||||
.git/**
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
# Set line endings to LF, even on Windows. Otherwise, execution within Docker fails.
|
||||
# See https://help.github.com/articles/dealing-with-line-endings/
|
||||
*.sh text eol=lf
|
||||
gradlew text eol=lf
|
||||
*.cmd text eol=crlf
|
||||
*.bat text eol=crlf
|
||||
|
|
@ -0,0 +1 @@
|
|||
custom: ['https://www.apereo.org/content/apereo-membership']
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"extends": [
|
||||
"config:base",
|
||||
":preserveSemverRanges",
|
||||
":rebaseStalePrs",
|
||||
":disableRateLimiting",
|
||||
":semanticCommits",
|
||||
":semanticCommitTypeAll(renovatebot)"
|
||||
],
|
||||
"labels": ["dependencies", "bot"]
|
||||
}
|
||||
|
|
@ -2,6 +2,8 @@
|
|||
!/.project
|
||||
.project
|
||||
.settings
|
||||
.history
|
||||
.vscode
|
||||
target/
|
||||
.idea/
|
||||
.DS_Store
|
||||
|
|
@ -9,6 +11,12 @@ target/
|
|||
overlays/
|
||||
.gradle/
|
||||
build/
|
||||
log/
|
||||
bin/
|
||||
*.war
|
||||
*.iml
|
||||
*.log
|
||||
tmp/
|
||||
./apache-tomcat
|
||||
apache-tomcat.zip
|
||||
config-metadata.properties
|
||||
|
|
|
|||
|
|
@ -0,0 +1,32 @@
|
|||
#
|
||||
# Licensed to Apereo under one or more contributor license
|
||||
# agreements. See the NOTICE file distributed with this work
|
||||
# for additional information regarding copyright ownership.
|
||||
# Apereo licenses this file to you under the Apache License,
|
||||
# Version 2.0 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a
|
||||
# copy of the License at the following location:
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
#
|
||||
|
||||
pull_request_rules:
|
||||
- name: automatic merge by dependabot
|
||||
conditions:
|
||||
- status-success=continuous-integration/travis-ci/pr
|
||||
- status-success=WIP
|
||||
- "#changes-requested-reviews-by=0"
|
||||
- base=master
|
||||
- label=dependencies
|
||||
actions:
|
||||
merge:
|
||||
method: merge
|
||||
strict: true
|
||||
delete_head_branch:
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
language: java
|
||||
sudo: required
|
||||
dist: trusty
|
||||
services:
|
||||
- docker
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
before_cache:
|
||||
- rm -rf $HOME/.gradle/caches/5.*/
|
||||
- rm -rf $HOME/.gradle/caches/4.*/
|
||||
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
|
||||
- find ~/.gradle/caches/ -name "*.lock" -type f -delete
|
||||
cache:
|
||||
bundler: false
|
||||
cargo: false
|
||||
directories:
|
||||
- $HOME/.m2
|
||||
- $HOME/.npm/
|
||||
- $HOME/.gradle/caches/
|
||||
- $HOME/.gradle/wrapper/
|
||||
env:
|
||||
global:
|
||||
- JAVA_OPTS="-Xms512m -Xmx4048m -Xss128m -XX:ReservedCodeCacheSize=512m -XX:+UseG1GC -Xverify:none -server"
|
||||
- GRADLE_OPTS="-Xms512m -Xmx1024m -Xss128m -XX:ReservedCodeCacheSize=512m -XX:+UseG1GC -Xverify:none -server"
|
||||
jdk:
|
||||
- openjdk11
|
||||
before_install:
|
||||
- echo -e "Configuring Gradle wrapper...\n"
|
||||
- mkdir -p ~/.gradle && echo "org.gradle.daemon=false" >> ~/.gradle/gradle.properties
|
||||
- chmod -R 777 ./gradlew
|
||||
- chmod -R 777 *.sh
|
||||
install: true
|
||||
stages:
|
||||
- build
|
||||
- validate
|
||||
- docker
|
||||
jobs:
|
||||
include:
|
||||
- stage: build
|
||||
script: ./gradlew clean build --stacktrace --no-daemon --refresh-dependencies -Dorg.gradle.internal.http.socketTimeout=600000 -Dorg.gradle.internal.http.connectionTimeout=600000
|
||||
name: "Build CAS"
|
||||
############################################
|
||||
- stage: validate
|
||||
script: ./gradlew downloadShell
|
||||
name: "Download CAS Shell"
|
||||
- stage: validate
|
||||
script: ./gradlew listTemplateViews
|
||||
name: "List CAS Template Views"
|
||||
- stage: validate
|
||||
script: ./gradlew explodeWar
|
||||
name: "Unzip CAS Web Application"
|
||||
############################################
|
||||
- stage: docker
|
||||
script: ./gradlew build jibDockerBuild --stacktrace --no-daemon --refresh-dependencies
|
||||
name: "Build Docker Image via Jib"
|
||||
- stage: docker
|
||||
script: docker-compose build
|
||||
name: "Build Docker Image via Docker Compose"
|
||||
- stage: docker
|
||||
script: ./docker-build.sh
|
||||
name: "Build Docker Image"
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
FROM adoptopenjdk/openjdk11:alpine-slim AS overlay
|
||||
|
||||
RUN mkdir -p cas-overlay
|
||||
COPY ./src cas-overlay/src/
|
||||
COPY ./gradle/ cas-overlay/gradle/
|
||||
COPY ./gradlew ./settings.gradle ./build.gradle ./gradle.properties /cas-overlay/
|
||||
|
||||
RUN mkdir -p ~/.gradle \
|
||||
&& echo "org.gradle.daemon=false" >> ~/.gradle/gradle.properties \
|
||||
&& echo "org.gradle.configureondemand=true" >> ~/.gradle/gradle.properties \
|
||||
&& cd cas-overlay \
|
||||
&& chmod 750 ./gradlew \
|
||||
&& ./gradlew --version;
|
||||
|
||||
RUN cd cas-overlay \
|
||||
&& ./gradlew clean build --parallel --no-daemon;
|
||||
|
||||
FROM adoptopenjdk/openjdk11:alpine-jre AS cas
|
||||
|
||||
LABEL "Organization"="Apereo"
|
||||
LABEL "Description"="Apereo CAS"
|
||||
|
||||
RUN cd / \
|
||||
&& mkdir -p /etc/cas/config \
|
||||
&& mkdir -p /etc/cas/services \
|
||||
&& mkdir -p /etc/cas/saml \
|
||||
&& mkdir -p cas-overlay;
|
||||
|
||||
COPY etc/cas/ /etc/cas/
|
||||
COPY etc/cas/config/ /etc/cas/config/
|
||||
COPY etc/cas/services/ /etc/cas/services/
|
||||
COPY etc/cas/saml/ /etc/cas/saml/
|
||||
COPY --from=overlay cas-overlay/build/libs/cas.war cas-overlay/
|
||||
|
||||
EXPOSE 8080 8443
|
||||
|
||||
ENV PATH $PATH:$JAVA_HOME/bin:.
|
||||
|
||||
WORKDIR cas-overlay
|
||||
ENTRYPOINT ["java", "-server", "-noverify", "-Xmx2048M", "-jar", "cas.war"]
|
||||
150
README.md
150
README.md
|
|
@ -1,88 +1,146 @@
|
|||
CAS Overlay Template
|
||||
============================
|
||||
CAS Overlay Template [](https://travis-ci.org/apereo/cas-overlay-template)
|
||||
=======================
|
||||
|
||||
Generic CAS WAR overlay to exercise the latest versions of CAS. This overlay could be freely used as a starting template for local CAS war overlays. The CAS services management overlay is available [here](https://github.com/apereo/cas-services-management-overlay).
|
||||
Generic CAS WAR overlay to exercise the latest versions of CAS. This overlay could be freely used as a starting template for local CAS war overlays.
|
||||
|
||||
# Versions
|
||||
|
||||
```xml
|
||||
<cas.version>5.1.x</cas.version>
|
||||
- CAS `6.2.x`
|
||||
- JDK `11`
|
||||
|
||||
# Overview
|
||||
|
||||
To build the project, use:
|
||||
|
||||
```bash
|
||||
# Use --refresh-dependencies to force-update SNAPSHOT versions
|
||||
./gradlew[.bat] clean build
|
||||
```
|
||||
|
||||
# Requirements
|
||||
* JDK 1.8+
|
||||
|
||||
# Configuration
|
||||
|
||||
The `etc` directory contains the configuration files and directories that need to be copied to `/etc/cas/config`.
|
||||
|
||||
# Build
|
||||
|
||||
To see what commands are available to the build script, run:
|
||||
|
||||
```bash
|
||||
./build.sh help
|
||||
./gradlew[.bat] tasks
|
||||
```
|
||||
|
||||
To package the final web application, run:
|
||||
To launch into the CAS command-line shell:
|
||||
|
||||
```bash
|
||||
./build.sh package
|
||||
./gradlew[.bat] downloadShell runShell
|
||||
```
|
||||
|
||||
To update `SNAPSHOT` versions run:
|
||||
To fetch and overlay a CAS resource or view, use:
|
||||
|
||||
```bash
|
||||
./build.sh package -U
|
||||
./gradlew[.bat] getResource -PresourceName=[resource-name]
|
||||
```
|
||||
|
||||
To list all available CAS views and templates:
|
||||
|
||||
```bash
|
||||
./gradlew[.bat] listTemplateViews
|
||||
```
|
||||
|
||||
To unzip and explode the CAS web application file and the internal resources jar:
|
||||
|
||||
```bash
|
||||
./gradlew[.bat] explodeWar
|
||||
```
|
||||
|
||||
# Configuration
|
||||
|
||||
- The `etc` directory contains the configuration files and directories that need to be copied to `/etc/cas/config`.
|
||||
|
||||
```bash
|
||||
./gradlew[.bat] copyCasConfiguration
|
||||
```
|
||||
|
||||
- The specifics of the build are controlled using the `gradle.properties` file.
|
||||
|
||||
## Adding Modules
|
||||
|
||||
CAS modules may be specified under the `dependencies` block of the [Gradle build script](build.gradle):
|
||||
|
||||
```gradle
|
||||
dependencies {
|
||||
compile "org.apereo.cas:cas-server-some-module:${project.casVersion}"
|
||||
...
|
||||
}
|
||||
```
|
||||
|
||||
To collect the list of all project modules and dependencies:
|
||||
|
||||
```bash
|
||||
./gradlew[.bat] allDependencies
|
||||
```
|
||||
|
||||
### Clear Gradle Cache
|
||||
|
||||
If you need to, on Linux/Unix systems, you can delete all the existing artifacts (artifacts and metadata) Gradle has downloaded using:
|
||||
|
||||
```bash
|
||||
# Only do this when absolutely necessary
|
||||
rm -rf $HOME/.gradle/caches/
|
||||
```
|
||||
|
||||
Same strategy applies to Windows too, provided you switch `$HOME` to its equivalent in the above command.
|
||||
|
||||
# Deployment
|
||||
|
||||
- Create a keystore file `thekeystore` under `/etc/cas`. Use the password `changeit` for both the keystore and the key/certificate entries.
|
||||
- Create a keystore file `thekeystore` under `/etc/cas`. Use the password `changeit` for both the keystore and the key/certificate entries. This can either be done using the JDK's `keytool` utility or via the following command:
|
||||
|
||||
```bash
|
||||
./gradlew[.bat] createKeystore
|
||||
```
|
||||
|
||||
- Ensure the keystore is loaded up with keys and certificates of the server.
|
||||
|
||||
On a successful deployment via the following methods, CAS will be available at:
|
||||
|
||||
* `http://cas.server.name:8080/cas`
|
||||
* `https://cas.server.name:8443/cas`
|
||||
|
||||
## Executable WAR
|
||||
|
||||
Run the CAS web application as an executable WAR.
|
||||
Run the CAS web application as an executable WAR:
|
||||
|
||||
```bash
|
||||
./build.sh run
|
||||
./gradlew[.bat] run
|
||||
```
|
||||
|
||||
## Spring Boot
|
||||
|
||||
Run the CAS web application as an executable WAR via Spring Boot. This is most useful during development and testing.
|
||||
Debug the CAS web application as an executable WAR:
|
||||
|
||||
```bash
|
||||
./build.sh bootrun
|
||||
./gradlew[.bat] debug
|
||||
```
|
||||
|
||||
### Warning!
|
||||
Run the CAS web application as a *standalone* executable WAR:
|
||||
|
||||
Be careful with this method of deployment. `bootRun` is not designed to work with already executable WAR artifacts such that CAS server web application. YMMV. Today, uses of this mode ONLY work when there is **NO OTHER** dependency added to the build script and the `cas-server-webapp` is the only present module. See [this issue](https://github.com/apereo/cas/issues/2334) and [this issue](https://github.com/spring-projects/spring-boot/issues/8320) for more info.
|
||||
|
||||
|
||||
## Spring Boot App Server Selection
|
||||
There is an app.server property in the pom.xml that can be used to select a spring boot application server.
|
||||
It defaults to "-tomcat" but "-jetty" and "-undertow" are supported.
|
||||
It can also be set to an empty value (nothing) if you want to deploy CAS to an external application server of your choice and you don't want the spring boot libraries included.
|
||||
|
||||
```xml
|
||||
<app.server>-tomcat<app.server>
|
||||
```
|
||||
|
||||
## Windows Build
|
||||
If you are building on windows, try build.cmd instead of build.sh. Arguments are similar but for usage, run:
|
||||
|
||||
```
|
||||
build.cmd help
|
||||
```bash
|
||||
./gradlew[.bat] clean executable
|
||||
```
|
||||
|
||||
## External
|
||||
|
||||
Deploy resultant `target/cas.war` to a servlet container of choice.
|
||||
Deploy the binary web application file `cas.war` after a successful build to a servlet container of choice.
|
||||
|
||||
## Docker
|
||||
|
||||
The following strategies outline how to build and deploy CAS Docker images.
|
||||
|
||||
### Jib
|
||||
|
||||
The overlay embraces the [Jib Gradle Plugin](https://github.com/GoogleContainerTools/jib) to provide easy-to-use out-of-the-box tooling for building CAS docker images. Jib is an open-source Java containerizer from Google that lets Java developers build containers using the tools they know. It is a container image builder that handles all the steps of packaging your application into a container image. It does not require you to write a Dockerfile or have Docker installed, and it is directly integrated into the overlay.
|
||||
|
||||
```bash
|
||||
./gradlew build jibDockerBuild
|
||||
```
|
||||
|
||||
### Dockerfile
|
||||
|
||||
You can also use the native Docker tooling and the provided `Dockerfile` to build and run CAS.
|
||||
|
||||
```bash
|
||||
chmod +x *.sh
|
||||
./docker-build.sh
|
||||
./docker-run.sh
|
||||
```
|
||||
|
|
|
|||
82
build.cmd
82
build.cmd
|
|
@ -1,82 +0,0 @@
|
|||
@echo off
|
||||
|
||||
@set JAVA_ARGS=-Xms500m -Xmx1g
|
||||
@set CAS_DIR=\etc\cas
|
||||
@set CONFIG_DIR=\etc\cas\config
|
||||
|
||||
@rem Call this script with DNAME and CERT_SUBJ_ALT_NAMES already set to override
|
||||
@if "%DNAME%" == "" set DNAME=CN=cas.example.org,OU=Example,OU=Org,C=US
|
||||
@rem List other host names or ip addresses you want in your certificate, may help with host name verification,
|
||||
@rem if client apps make https connection for ticket validation and compare name in cert (include sub. alt. names)
|
||||
@rem to name used to access CAS
|
||||
@if "%CERT_SUBJ_ALT_NAMES%" == "" set CERT_SUBJ_ALT_NAMES=dns:example.org,dns:localhost,dns:%COMPUTERNAME%,ip:127.0.0.1
|
||||
|
||||
@rem Check for mvn in path, use it if found, otherwise use maven wrapper
|
||||
@set MAVEN_CMD=mvn
|
||||
@where /q mvn
|
||||
@if %ERRORLEVEL% neq 0 set MAVEN_CMD=.\mvnw.bat
|
||||
|
||||
@if "%1" == "" call:help
|
||||
@if "%1" == "copy" call:copy
|
||||
@if "%1" == "clean" call:clean %2 %3 %4
|
||||
@if "%1" == "package" call:package %2 %3 %4
|
||||
@if "%1" == "bootrun" call:bootrun %2 %3 %4
|
||||
@if "%1" == "debug" call:debug %2 %3 %4
|
||||
@if "%1" == "run" call:run %2 %3 %4
|
||||
@if "%1" == "help" call:help
|
||||
@if "%1" == "gencert" call:gencert
|
||||
|
||||
@rem function section starts here
|
||||
@goto:eof
|
||||
|
||||
:copy
|
||||
@echo "Creating configuration directory under %CONFIG_DIR%"
|
||||
if not exist %CONFIG_DIR% mkdir %CONFIG_DIR%
|
||||
|
||||
@echo "Copying configuration files from etc/cas to /etc/cas"
|
||||
xcopy /S /Y etc\cas\* \etc\cas
|
||||
@goto:eof
|
||||
|
||||
:help
|
||||
@echo "Usage: build.bat [copy|clean|package|run|debug|bootrun|gencert] [optional extra args for maven]"
|
||||
@echo "To get started on a clean system, run "build.bat copy" and "build.bat gencert", then "build.bat run"
|
||||
@echo "Note that using the copy or gencert arguments will create and/or overwrite the %CAS_DIR% which is outside this project"
|
||||
@goto:eof
|
||||
|
||||
:clean
|
||||
call %MAVEN_CMD% clean %1 %2 %3
|
||||
exit /B %ERRORLEVEL%
|
||||
@goto:eof
|
||||
|
||||
:package
|
||||
call %MAVEN_CMD% clean package -T 5 %1 %2 %3
|
||||
exit /B %ERRORLEVEL%
|
||||
@goto:eof
|
||||
|
||||
:bootrun
|
||||
call %MAVEN_CMD% clean package spring-boot:run -T 5 %1 %2 %3
|
||||
exit /B %ERRORLEVEL%
|
||||
@goto:eof
|
||||
|
||||
:debug
|
||||
call:package %1 %2 %3 & java %JAVA_ARGS% -Xdebug -Xrunjdwp:transport=dt_socket,address=5000,server=y,suspend=n -jar target/cas.war
|
||||
@goto:eof
|
||||
|
||||
:run
|
||||
call:package %1 %2 %3 & java %JAVA_ARGS% -jar target/cas.war
|
||||
@goto:eof
|
||||
|
||||
:gencert
|
||||
where /q keytool
|
||||
if ERRORLEVEL 1 (
|
||||
@echo Java keytool.exe not found in path.
|
||||
exit /b 1
|
||||
) else (
|
||||
if not exist %CAS_DIR% mkdir %CAS_DIR%
|
||||
@echo on
|
||||
@echo Generating self-signed SSL cert for %DNAME% in %CAS_DIR%\thekeystore
|
||||
keytool -genkeypair -alias cas -keyalg RSA -keypass changeit -storepass changeit -keystore %CAS_DIR%\thekeystore -dname %DNAME% -ext SAN=%CERT_SUBJ_ALT_NAMES%
|
||||
@echo Exporting cert for use in trust store (used by cas clients)
|
||||
keytool -exportcert -alias cas -storepass changeit -keystore %CAS_DIR%\thekeystore -file %CAS_DIR%\cas.cer
|
||||
)
|
||||
@goto:eof
|
||||
|
|
@ -0,0 +1,111 @@
|
|||
buildscript {
|
||||
repositories {
|
||||
mavenLocal()
|
||||
gradlePluginPortal()
|
||||
mavenCentral()
|
||||
jcenter()
|
||||
maven {
|
||||
url "https://repo.spring.io/libs-milestone"
|
||||
mavenContent { releasesOnly() }
|
||||
}
|
||||
maven {
|
||||
url "https://repo.spring.io/libs-snapshot"
|
||||
mavenContent { snapshotsOnly() }
|
||||
}
|
||||
maven {
|
||||
url "https://plugins.gradle.org/m2/"
|
||||
mavenContent { releasesOnly() }
|
||||
}
|
||||
}
|
||||
dependencies {
|
||||
classpath "de.undercouch:gradle-download-task:${project.gradleDownloadTaskVersion}"
|
||||
classpath "org.springframework.boot:spring-boot-gradle-plugin:${project.springBootVersion}"
|
||||
classpath "gradle.plugin.com.google.cloud.tools:jib-gradle-plugin:${project.jibVersion}"
|
||||
classpath "io.freefair.gradle:maven-plugin:${project.gradleMavenPluginVersion}"
|
||||
classpath "io.freefair.gradle:lombok-plugin:${project.gradleLombokPluginVersion}"
|
||||
}
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenLocal()
|
||||
mavenCentral()
|
||||
jcenter()
|
||||
maven {
|
||||
url "https://oss.sonatype.org/content/repositories/snapshots"
|
||||
mavenContent { snapshotsOnly() }
|
||||
}
|
||||
maven {
|
||||
mavenContent { releasesOnly() }
|
||||
url "https://build.shibboleth.net/nexus/content/repositories/releases/"
|
||||
}
|
||||
maven {
|
||||
mavenContent { releasesOnly() }
|
||||
url "https://repo.spring.io/milestone/"
|
||||
}
|
||||
maven {
|
||||
url "https://repo.spring.io/snapshot/"
|
||||
mavenContent { snapshotsOnly() }
|
||||
}
|
||||
maven {
|
||||
mavenContent { snapshotsOnly() }
|
||||
url "https://oss.jfrog.org/artifactory/oss-snapshot-local"
|
||||
}
|
||||
}
|
||||
|
||||
def casServerVersion = project.'cas.version'
|
||||
def casWebApplicationBinaryName = "cas.war"
|
||||
|
||||
project.ext."casServerVersion" = casServerVersion
|
||||
project.ext."casWebApplicationBinaryName" = casWebApplicationBinaryName
|
||||
|
||||
apply plugin: "io.freefair.war-overlay"
|
||||
apply plugin: "io.freefair.lombok"
|
||||
apply from: rootProject.file("gradle/tasks.gradle")
|
||||
|
||||
apply plugin: "war"
|
||||
apply plugin: "eclipse"
|
||||
apply plugin: "idea"
|
||||
|
||||
apply from: rootProject.file("gradle/springboot.gradle")
|
||||
apply from: rootProject.file("gradle/dockerjib.gradle")
|
||||
|
||||
dependencies {
|
||||
// Other CAS dependencies/modules may be listed here...
|
||||
// implementation "org.apereo.cas:cas-server-support-json-service-registry:${casServerVersion}"
|
||||
}
|
||||
|
||||
tasks.findByName("jibDockerBuild")
|
||||
.dependsOn(copyWebAppIntoJib, copyConfigIntoJib)
|
||||
.finalizedBy(deleteWebAppFromJib)
|
||||
|
||||
tasks.findByName("jib")
|
||||
.dependsOn(copyWebAppIntoJib, copyConfigIntoJib)
|
||||
.finalizedBy(deleteWebAppFromJib)
|
||||
|
||||
configurations.all {
|
||||
resolutionStrategy {
|
||||
cacheChangingModulesFor 0, "seconds"
|
||||
cacheDynamicVersionsFor 0, "seconds"
|
||||
|
||||
preferProjectModules()
|
||||
|
||||
def failIfConflict = project.hasProperty("failOnVersionConflict") && Boolean.valueOf(project.getProperty("failOnVersionConflict"))
|
||||
if (failIfConflict) {
|
||||
failOnVersionConflict()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
eclipse {
|
||||
classpath {
|
||||
downloadSources = true
|
||||
downloadJavadoc = true
|
||||
}
|
||||
}
|
||||
|
||||
idea {
|
||||
module {
|
||||
downloadJavadoc = true
|
||||
downloadSources = true
|
||||
}
|
||||
}
|
||||
97
build.sh
97
build.sh
|
|
@ -1,97 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
|
||||
function copy() {
|
||||
echo -e "Creating configuration directory under /etc/cas"
|
||||
mkdir -p /etc/cas/config
|
||||
|
||||
echo -e "Copying configuration files from etc/cas to /etc/cas"
|
||||
cp -rfv etc/cas/* /etc/cas
|
||||
}
|
||||
|
||||
function help() {
|
||||
echo "Usage: build.sh [copy|clean|package|run|debug|bootrun|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, also call copy"
|
||||
echo " run: Build and run CAS.war via spring boot (java -jar target/cas.war)"
|
||||
echo " debug: Run CAS.war and listen for Java debugger on port 5000"
|
||||
echo " bootrun: Run with maven spring boot plugin, doesn't work with multiple dependencies"
|
||||
echo " gencert: Create keystore with SSL certificate in location where CAS looks by default"
|
||||
}
|
||||
|
||||
function clean() {
|
||||
./mvnw clean "$@"
|
||||
}
|
||||
|
||||
function package() {
|
||||
./mvnw clean package -T 5 "$@"
|
||||
copy
|
||||
}
|
||||
|
||||
function bootrun() {
|
||||
./mvnw clean package spring-boot:run -T 5 "$@"
|
||||
}
|
||||
|
||||
function debug() {
|
||||
package && java -Xdebug -Xrunjdwp:transport=dt_socket,address=5000,server=y,suspend=n -jar target/cas.war
|
||||
}
|
||||
|
||||
function run() {
|
||||
package && java -jar target/cas.war
|
||||
}
|
||||
|
||||
function gencert() {
|
||||
if [[ ! -d /etc/cas ]] ; then
|
||||
copy
|
||||
fi
|
||||
which keytool
|
||||
if [[ $? -ne 0 ]] ; then
|
||||
echo Error: Java JDK \'keytool\' is not installed or is not in the path
|
||||
exit 1
|
||||
fi
|
||||
# override DNAME and CERT_SUBJ_ALT_NAMES before calling or use dummy values
|
||||
DNAME="${DNAME:-CN=cas.example.org,OU=Example,OU=Org,C=US}"
|
||||
CERT_SUBJ_ALT_NAMES="${CERT_SUBJ_ALT_NAMES:-dns:example.org,dns:localhost,ip:127.0.0.1}"
|
||||
echo "Generating keystore for CAS with DN ${DNAME}"
|
||||
keytool -genkeypair -alias cas -keyalg RSA -keypass changeit -storepass changeit -keystore /etc/cas/thekeystore -dname ${DNAME} -ext SAN=${CERT_SUBJ_ALT_NAMES}
|
||||
keytool -exportcert -alias cas -storepass changeit -keystore /etc/cas/thekeystore -file /etc/cas/cas.cer
|
||||
}
|
||||
|
||||
if [ $# -eq 0 ]; then
|
||||
echo -e "No commands provided. Defaulting to [run]\n"
|
||||
run
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
||||
case "$1" in
|
||||
"copy")
|
||||
copy
|
||||
;;
|
||||
"clean")
|
||||
shift
|
||||
clean "$@"
|
||||
;;
|
||||
"package")
|
||||
shift
|
||||
package "$@"
|
||||
;;
|
||||
"bootrun")
|
||||
shift
|
||||
bootrun "$@"
|
||||
;;
|
||||
"debug")
|
||||
debug "$@"
|
||||
;;
|
||||
"run")
|
||||
run "$@"
|
||||
;;
|
||||
"gencert")
|
||||
gencert "$@"
|
||||
;;
|
||||
*)
|
||||
help
|
||||
;;
|
||||
esac
|
||||
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
#!/bin/bash
|
||||
|
||||
image_tag=(`cat gradle.properties | grep "cas.version" | cut -d= -f2`)
|
||||
|
||||
echo "Building CAS docker image tagged as [v$image_tag]"
|
||||
# read -p "Press [Enter] to continue..." any_key;
|
||||
|
||||
docker build --tag="org.apereo.cas/cas:v$image_tag" . \
|
||||
&& echo "Built CAS image successfully tagged as org.apereo.cas/cas:v$image_tag" \
|
||||
&& docker images "org.apereo.cas/cas:v$image_tag"
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
version: '3'
|
||||
services:
|
||||
cas:
|
||||
build: .
|
||||
ports:
|
||||
- "8443:8443"
|
||||
- "8080:8080"
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
#!/bin/bash
|
||||
|
||||
read -p "Docker username: " docker_user
|
||||
read -s -p "Docker password: " docker_psw
|
||||
|
||||
echo "$docker_psw" | docker login --username "$docker_user" --password-stdin
|
||||
|
||||
image_tag=(`cat gradle.properties | grep "cas.version" | cut -d= -f2`)
|
||||
|
||||
echo "Pushing CAS docker image tagged as v$image_tag to org.apereo.cas/cas..."
|
||||
docker push org.apereo.cas/cas:"v$image_tag" \
|
||||
&& echo "Pushed org.apereo.cas/cas:v$image_tag successfully.";
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
#!/bin/bash
|
||||
|
||||
docker stop cas > /dev/null 2>&1
|
||||
docker rm cas > /dev/null 2>&1
|
||||
image_tag=(`cat gradle.properties | grep "cas.version" | cut -d= -f2`)
|
||||
docker run -d -p 8080:8080 -p 8443:8443 --name="cas" org.apereo.cas/cas:"v${image_tag}"
|
||||
docker logs -f cas
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
info:
|
||||
description: CAS Configuration
|
||||
|
|
@ -1,7 +1,6 @@
|
|||
cas.server.name: https://cas.example.org:8443
|
||||
cas.server.prefix: https://cas.example.org:8443/cas
|
||||
|
||||
cas.adminPagesSecurity.ip=127\.0\.0\.1
|
||||
cas.server.name=https://cas.example.org:8443
|
||||
cas.server.prefix=${cas.server.name}/cas
|
||||
|
||||
logging.config: file:/etc/cas/config/log4j2.xml
|
||||
# cas.serviceRegistry.config.location: classpath:/services
|
||||
|
||||
# cas.authn.accept.users=
|
||||
|
|
|
|||
|
|
@ -2,20 +2,26 @@
|
|||
<!-- Specify the refresh internal in seconds. -->
|
||||
<Configuration monitorInterval="5" packages="org.apereo.cas.logging">
|
||||
<Properties>
|
||||
<!--
|
||||
Default log directory is the current directory but that can be overridden with -Dcas.log.dir=<logdir>
|
||||
Or you can change this property to a new default
|
||||
-->
|
||||
<Property name="cas.log.dir" >.</Property>
|
||||
<!-- To see more CAS specific logging, adjust this property to info or debug or run server with -Dcas.log.leve=debug -->
|
||||
<Property name="cas.log.level" >warn</Property>
|
||||
<Property name="baseDir">/var/log</Property>
|
||||
|
||||
<Property name="cas.log.level">info</Property>
|
||||
<Property name="spring.webflow.log.level">warn</Property>
|
||||
<Property name="spring.security.log.level">info</Property>
|
||||
<Property name="spring.cloud.log.level">warn</Property>
|
||||
<Property name="spring.boot.admin.log.level">debug</Property>
|
||||
<Property name="spring.web.log.level">warn</Property>
|
||||
<Property name="spring.boot.log.level">warn</Property>
|
||||
<Property name="ldap.log.level">warn</Property>
|
||||
<Property name="pac4j.log.level">warn</Property>
|
||||
<Property name="opensaml.log.level">warn</Property>
|
||||
<Property name="hazelcast.log.level">warn</Property>
|
||||
</Properties>
|
||||
<Appenders>
|
||||
<Console name="console" target="SYSTEM_OUT">
|
||||
<PatternLayout pattern="%d %p [%c] - <%m>%n"/>
|
||||
<PatternLayout pattern="%highlight{%d %p [%c] - <%m>}%n"/>
|
||||
</Console>
|
||||
<RollingFile name="file" fileName="${sys:cas.log.dir}/cas.log" append="true"
|
||||
filePattern="${sys:cas.log.dir}/cas-%d{yyyy-MM-dd-HH}-%i.log">
|
||||
<RollingFile name="file" fileName="${baseDir}/cas.log" append="true"
|
||||
filePattern="${baseDir}/cas-%d{yyyy-MM-dd-HH}-%i.log">
|
||||
<PatternLayout pattern="%d %p [%c] - <%m>%n"/>
|
||||
<Policies>
|
||||
<OnStartupTriggeringPolicy />
|
||||
|
|
@ -23,8 +29,8 @@
|
|||
<TimeBasedTriggeringPolicy />
|
||||
</Policies>
|
||||
</RollingFile>
|
||||
<RollingFile name="auditlogfile" fileName="${sys:cas.log.dir}/cas_audit.log" append="true"
|
||||
filePattern="${sys:cas.log.dir}/cas_audit-%d{yyyy-MM-dd-HH}-%i.log">
|
||||
<RollingFile name="auditlogfile" fileName="${baseDir}/cas_audit.log" append="true"
|
||||
filePattern="${baseDir}/cas_audit-%d{yyyy-MM-dd-HH}-%i.log">
|
||||
<PatternLayout pattern="%d %p [%c] - %m%n"/>
|
||||
<Policies>
|
||||
<OnStartupTriggeringPolicy />
|
||||
|
|
@ -33,16 +39,6 @@
|
|||
</Policies>
|
||||
</RollingFile>
|
||||
|
||||
<RollingFile name="perfFileAppender" fileName="${sys:cas.log.dir}/perfStats.log" append="true"
|
||||
filePattern="${sys:cas.log.dir}/perfStats-%d{yyyy-MM-dd-HH}-%i.log">
|
||||
<PatternLayout pattern="%m%n"/>
|
||||
<Policies>
|
||||
<OnStartupTriggeringPolicy />
|
||||
<SizeBasedTriggeringPolicy size="10 MB"/>
|
||||
<TimeBasedTriggeringPolicy />
|
||||
</Policies>
|
||||
</RollingFile>
|
||||
|
||||
<CasAppender name="casAudit">
|
||||
<AppenderRef ref="auditlogfile" />
|
||||
</CasAppender>
|
||||
|
|
@ -52,52 +48,58 @@
|
|||
<CasAppender name="casConsole">
|
||||
<AppenderRef ref="console" />
|
||||
</CasAppender>
|
||||
<CasAppender name="casPerf">
|
||||
<AppenderRef ref="perfFileAppender" />
|
||||
</CasAppender>
|
||||
</Appenders>
|
||||
<Loggers>
|
||||
<!-- If adding a Logger with level set higher than warn, make category as selective as possible -->
|
||||
<!-- Loggers inherit appenders from Root Logger unless additivity is false -->
|
||||
<AsyncLogger name="org.apereo" level="${sys:cas.log.level}" includeLocation="true"/>
|
||||
<AsyncLogger name="org.apereo.services.persondir" level="${sys:cas.log.level}" includeLocation="true"/>
|
||||
<AsyncLogger name="org.apereo.cas.web.flow" level="info" includeLocation="true"/>
|
||||
<AsyncLogger name="org.apereo.cas.web.flow" level="${sys:cas.log.level}" includeLocation="true"/>
|
||||
<AsyncLogger name="org.apereo.spring" level="${sys:cas.log.level}" includeLocation="true"/>
|
||||
|
||||
<AsyncLogger name="org.apache" level="warn" />
|
||||
<AsyncLogger name="org.apache.http" level="error" />
|
||||
<AsyncLogger name="org.springframework" level="warn" />
|
||||
<AsyncLogger name="org.springframework.cloud.server" level="warn" />
|
||||
<AsyncLogger name="org.springframework.cloud.client" level="warn" />
|
||||
<AsyncLogger name="org.springframework.cloud.bus" level="warn" />
|
||||
<AsyncLogger name="org.springframework.aop" level="warn" />
|
||||
<AsyncLogger name="org.springframework.boot" level="warn" />
|
||||
<AsyncLogger name="org.springframework.boot.actuate.autoconfigure" level="warn" />
|
||||
<AsyncLogger name="org.springframework.webflow" level="warn" />
|
||||
<AsyncLogger name="org.springframework.session" level="warn" />
|
||||
<AsyncLogger name="org.springframework.amqp" level="error" />
|
||||
<AsyncLogger name="org.springframework.integration" level="warn" />
|
||||
<AsyncLogger name="org.springframework.messaging" level="warn" />
|
||||
<AsyncLogger name="org.springframework.web" level="warn" />
|
||||
<AsyncLogger name="org.springframework.orm.jpa" level="warn" />
|
||||
<AsyncLogger name="org.springframework.scheduling" level="warn" />
|
||||
<AsyncLogger name="org.springframework.context.annotation" level="error" />
|
||||
<AsyncLogger name="org.springframework.boot.devtools" level="error" />
|
||||
<AsyncLogger name="org.springframework.web.socket" level="warn" />
|
||||
<AsyncLogger name="org.thymeleaf" level="warn" />
|
||||
<AsyncLogger name="org.pac4j" level="warn" />
|
||||
<AsyncLogger name="org.opensaml" level="warn"/>
|
||||
<AsyncLogger name="net.sf.ehcache" level="warn" />
|
||||
<AsyncLogger name="com.couchbase" level="warn" includeLocation="true"/>
|
||||
<AsyncLogger name="com.ryantenney.metrics" level="warn" />
|
||||
<AsyncLogger name="net.jradius" level="warn" />
|
||||
<AsyncLogger name="org.openid4java" level="warn" />
|
||||
<AsyncLogger name="org.ldaptive" level="warn" />
|
||||
<AsyncLogger name="com.hazelcast" level="warn" />
|
||||
<AsyncLogger name="org.jasig.spring" level="warn" />
|
||||
|
||||
<!-- Log perf stats only to perfStats.log -->
|
||||
<AsyncLogger name="perfStatsLogger" level="info" additivity="false" includeLocation="true">
|
||||
<AppenderRef ref="casPerf"/>
|
||||
</AsyncLogger>
|
||||
<AsyncLogger name="org.springframework.boot" level="${sys:spring.boot.log.level" includeLocation="true"/>
|
||||
<AsyncLogger name="org.springframework.boot.context.embedded" level="info" includeLocation="true" />
|
||||
<AsyncLogger name="org.springframework.boot.autoconfigure.security.servlet.UserDetailsServiceAutoConfiguration"
|
||||
level="${sys:spring.security.log.level}" includeLocation="true" />
|
||||
<AsyncLogger name="org.springframework.boot.autoconfigure.security" level="${sys:spring.security.log.level}" includeLocation="true"/>
|
||||
<AsyncLogger name="org.springframework.boot.devtools" level="off" includeLocation="true"/>
|
||||
|
||||
<AsyncLogger name="org.springframework" level="warn" includeLocation="true" />
|
||||
<AsyncLogger name="org.springframework.webflow" level="${sys:spring.webflow.log.level}" includeLocation="true"/>
|
||||
<AsyncLogger name="org.springframework.aop" level="warn" includeLocation="true" />
|
||||
<AsyncLogger name="org.springframework.web" level="warn" includeLocation="true"/>
|
||||
<AsyncLogger name="org.springframework.session" level="warn" includeLocation="true"/>
|
||||
<AsyncLogger name="org.springframework.scheduling" level="info" includeLocation="true"/>
|
||||
<AsyncLogger name="org.springframework.cloud.vault" level="warn" includeLocation="true" />
|
||||
<AsyncLogger name="org.springframework.web.client" level="warn" includeLocation="true" />
|
||||
<AsyncLogger name="org.springframework.security" level="${sys:spring.security.log.level}" includeLocation="true"/>
|
||||
<AsyncLogger name="org.springframework.cloud" level="${sys:spring.cloud.log.level}" includeLocation="true"/>
|
||||
<AsyncLogger name="org.springframework.amqp" level="error" />
|
||||
<AsyncLogger name="org.springframework.integration" level="warn" includeLocation="true"/>
|
||||
<AsyncLogger name="org.springframework.messaging" level="warn" includeLocation="true"/>
|
||||
<AsyncLogger name="org.springframework.web" level="${sys:spring.web.log.level}" includeLocation="true"/>
|
||||
<AsyncLogger name="org.springframework.orm.jpa" level="warn" includeLocation="true"/>
|
||||
<AsyncLogger name="org.springframework.scheduling" level="warn" includeLocation="true"/>
|
||||
<AsyncLogger name="org.springframework.context.annotation" level="off" includeLocation="true"/>
|
||||
<AsyncLogger name="org.springframework.web.socket" level="warn" includeLocation="true"/>
|
||||
|
||||
<AsyncLogger name="org.thymeleaf" level="warn" includeLocation="true"/>
|
||||
|
||||
<AsyncLogger name="org.pac4j" level="${sys:pac4j.log.level}" includeLocation="true"/>
|
||||
|
||||
<AsyncLogger name="org.opensaml" level="${sys:opensaml.log.level}" includeLocation="true"/>
|
||||
<AsyncLogger name="PROTOCOL_MESSAGE" level="${sys:opensaml.log.level}" includeLocation="true" />
|
||||
|
||||
<AsyncLogger name="net.sf.ehcache" level="warn" includeLocation="true"/>
|
||||
<AsyncLogger name="com.couchbase" level="warn" includeLocation="true"/>
|
||||
<AsyncLogger name="de.codecentric" level="${sys:spring.boot.admin.log.level}" includeLocation="true"/>
|
||||
<AsyncLogger name="net.jradius" level="warn" includeLocation="true" />
|
||||
<AsyncLogger name="org.openid4java" level="warn" includeLocation="true" />
|
||||
<AsyncLogger name="org.ldaptive" level="${sys:ldap.log.level}" includeLocation="true"/>
|
||||
<AsyncLogger name="com.hazelcast" level="${sys:hazelcast.log.level}" includeLocation="true"/>
|
||||
|
||||
<!-- Log audit to all root appenders, and also to audit log (additivity is not false) -->
|
||||
<AsyncLogger name="org.apereo.inspektr.audit.support" level="info" includeLocation="true" >
|
||||
|
|
|
|||
|
|
@ -0,0 +1 @@
|
|||
This directory is references in the Dockerfile so it needs to be here.
|
||||
Binary file not shown.
|
|
@ -0,0 +1,28 @@
|
|||
# Versions
|
||||
cas.version=6.2.0-SNAPSHOT
|
||||
springBootVersion=2.2.5.RELEASE
|
||||
|
||||
# Use -jetty, -undertow to other containers
|
||||
# Or blank if you want to deploy to an external container
|
||||
appServer=-tomcat
|
||||
executable=false
|
||||
|
||||
tomcatVersion=9.0.33
|
||||
|
||||
group=org.apereo.cas
|
||||
sourceCompatibility=11
|
||||
targetCompatibility=11
|
||||
|
||||
jibVersion=2.1.0
|
||||
|
||||
# Location of the downloaded CAS shell JAR
|
||||
shellDir=build/libs
|
||||
ivyVersion=2.4.0
|
||||
gradleDownloadTaskVersion=3.4.3
|
||||
gradleMavenPluginVersion=4.1.5
|
||||
gradleLombokPluginVersion=4.1.5
|
||||
|
||||
# use without "-slim" in tag name if you want tools like jstack, adds about 100MB to image size
|
||||
# (https://hub.docker.com/r/adoptopenjdk/openjdk11/tags/)
|
||||
baseDockerImage=adoptopenjdk/openjdk11:alpine-jre
|
||||
allowInsecureRegistries=false
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
apply plugin: "com.google.cloud.tools.jib"
|
||||
|
||||
jib {
|
||||
from {
|
||||
image = project.baseDockerImage
|
||||
}
|
||||
to {
|
||||
image = "${project.group}/${project.name}"
|
||||
/**
|
||||
ecr-login: Amazon Elastic Container Registry (ECR)
|
||||
gcr: Google Container Registry (GCR)
|
||||
osxkeychain: Docker Hub
|
||||
*/
|
||||
credHelper = "osxkeychain"
|
||||
/**
|
||||
auth {
|
||||
username = "*******"
|
||||
password = "*******"
|
||||
}
|
||||
*/
|
||||
tags = ["v" + casServerVersion]
|
||||
}
|
||||
container {
|
||||
creationTime = "USE_CURRENT_TIMESTAMP"
|
||||
entrypoint = ['docker/entrypoint.sh']
|
||||
ports = ['80', '443', '8080', '8443']
|
||||
labels = [version:casServerVersion, name:project.name, group:project.group]
|
||||
}
|
||||
extraDirectories {
|
||||
paths = 'src/main/jib'
|
||||
permissions = [
|
||||
'/docker/entrypoint.sh': '755'
|
||||
]
|
||||
}
|
||||
allowInsecureRegistries = project.allowInsecureRegistries
|
||||
}
|
||||
|
||||
task copyWebAppIntoJib(type: Copy, group: "Docker", description: "Copy the web application into Docker image") {
|
||||
dependsOn build
|
||||
from "build/libs/${casWebApplicationBinaryName}"
|
||||
into "src/main/jib/docker/cas/war"
|
||||
}
|
||||
|
||||
task copyConfigIntoJib(type: Copy, group: "Docker", description: "Copy the CAS configuration into Docker image") {
|
||||
dependsOn build
|
||||
from "etc/cas"
|
||||
into "src/main/jib/docker/cas"
|
||||
}
|
||||
|
||||
task deleteWebAppFromJib(type: Delete, group: "Docker", description: "Explodes the CAS web application archive") {
|
||||
delete "src/main/jib/docker/cas"
|
||||
}
|
||||
|
|
@ -0,0 +1,101 @@
|
|||
apply plugin: "org.springframework.boot"
|
||||
|
||||
configurations {
|
||||
bootRunConfig.extendsFrom compileClasspath
|
||||
}
|
||||
|
||||
dependencies {
|
||||
bootRunConfig "org.apereo.cas:cas-server-webapp-init:${casServerVersion}"
|
||||
bootRunConfig "org.apereo.cas:cas-server-webapp-tomcat:${casServerVersion}"
|
||||
bootRunConfig "org.springframework.boot:spring-boot-devtools:${project.springBootVersion}"
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
bootRunSources {
|
||||
resources {
|
||||
srcDirs new File("//etc/cas/templates/"),
|
||||
new File("${project.getProjectDir()}/src/main/resources/")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bootRun {
|
||||
classpath = configurations.bootRunConfig + sourceSets.main.compileClasspath + sourceSets.main.runtimeClasspath
|
||||
doFirst {
|
||||
sourceResources sourceSets.bootRunSources
|
||||
systemProperties = System.properties
|
||||
}
|
||||
|
||||
def list = []
|
||||
list.add("-XX:TieredStopAtLevel=1")
|
||||
list.add("-Xverify:none")
|
||||
list.add("--add-modules")
|
||||
list.add("java.se")
|
||||
list.add("--add-exports")
|
||||
list.add("java.base/jdk.internal.ref=ALL-UNNAMED")
|
||||
list.add("--add-opens")
|
||||
list.add("java.base/java.lang=ALL-UNNAMED")
|
||||
list.add("--add-opens")
|
||||
list.add("java.base/java.nio=ALL-UNNAMED")
|
||||
list.add("--add-opens")
|
||||
list.add("java.base/sun.nio.ch=ALL-UNNAMED")
|
||||
list.add("--add-opens")
|
||||
list.add("java.management/sun.management=ALL-UNNAMED")
|
||||
list.add("--add-opens")
|
||||
list.add("jdk.management/com.sun.management.internal=ALL-UNNAMED")
|
||||
|
||||
list.add("-XX:+UnlockExperimentalVMOptions")
|
||||
list.add("-XX:+EnableJVMCI")
|
||||
list.add("-XX:+UseJVMCICompiler")
|
||||
|
||||
list.add("-Xrunjdwp:transport=dt_socket,address=5000,server=y,suspend=n")
|
||||
|
||||
jvmArgs = list
|
||||
|
||||
def appArgList = []
|
||||
args = appArgList
|
||||
}
|
||||
|
||||
springBoot {
|
||||
buildInfo()
|
||||
mainClassName = "org.apereo.cas.web.CasWebApplication"
|
||||
}
|
||||
|
||||
bootWar {
|
||||
def executable = project.hasProperty("executable") && Boolean.valueOf(project.getProperty("executable"))
|
||||
if (executable) {
|
||||
logger.info "Including launch script for executable WAR artifact"
|
||||
launchScript()
|
||||
} else {
|
||||
logger.info "WAR artifact is not marked as an executable"
|
||||
}
|
||||
archiveName "${casWebApplicationBinaryName}"
|
||||
baseName "cas"
|
||||
excludeDevtools = false
|
||||
|
||||
entryCompression = ZipEntryCompression.STORED
|
||||
/*
|
||||
attachClasses = true
|
||||
classesClassifier = 'classes'
|
||||
archiveClasses = true
|
||||
*/
|
||||
overlays {
|
||||
/*
|
||||
https://docs.freefair.io/gradle-plugins/current/reference/#_io_freefair_war_overlay
|
||||
Note: The "excludes" property is only for files in the war dependency.
|
||||
If a jar is excluded from the war, it could be brought back into the final war as a dependency
|
||||
of non-war dependencies. Those should be excluded via normal gradle dependency exclusions.
|
||||
*/
|
||||
cas {
|
||||
from "org.apereo.cas:cas-server-webapp${project.appServer}:${casServerVersion}@war"
|
||||
provided = false
|
||||
/*
|
||||
excludes = ["WEB-INF/lib/somejar-1.0*"]
|
||||
enableCompilation = true
|
||||
includes = ["*.xyz"]
|
||||
targetPath = "sub-path/bar"
|
||||
skip = false
|
||||
*/
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,331 @@
|
|||
import org.apache.ivy.util.url.ApacheURLLister
|
||||
import org.apache.tools.ant.taskdefs.condition.Os
|
||||
import org.gradle.internal.logging.text.StyledTextOutputFactory
|
||||
|
||||
import java.nio.file.Files
|
||||
import java.nio.file.Paths
|
||||
import java.nio.file.StandardCopyOption
|
||||
|
||||
import static org.gradle.internal.logging.text.StyledTextOutput.Style
|
||||
|
||||
buildscript {
|
||||
repositories {
|
||||
mavenLocal()
|
||||
mavenCentral()
|
||||
jcenter()
|
||||
maven {
|
||||
url "https://oss.sonatype.org/content/repositories/snapshots"
|
||||
mavenContent { snapshotsOnly() }
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
classpath "org.apache.ivy:ivy:${project.ivyVersion}"
|
||||
classpath "org.apereo.cas:cas-server-core-api-configuration-model:${project.'cas.version'}"
|
||||
classpath "org.apereo.cas:cas-server-core-configuration-metadata-repository:${project.'cas.version'}"
|
||||
}
|
||||
}
|
||||
|
||||
apply plugin: "de.undercouch.download"
|
||||
|
||||
def tomcatDirectory = "${buildDir}/apache-tomcat-${tomcatVersion}"
|
||||
project.ext."tomcatDirectory" = tomcatDirectory
|
||||
|
||||
def explodedDir = "${buildDir}/cas"
|
||||
def explodedResourcesDir = "${buildDir}/cas-resources"
|
||||
def resourceJarName = "cas-server-webapp-resources"
|
||||
|
||||
task copyCasConfiguration(type: Copy, group: "build", description: "Copy the CAS configuration from this project to /etc/cas/config") {
|
||||
from "etc/cas/config"
|
||||
into new File('/etc/cas/config').absolutePath
|
||||
doFirst {
|
||||
new File('/etc/cas/config').mkdirs()
|
||||
}
|
||||
}
|
||||
|
||||
task explodeWarOnly(type: Copy, group: "build", description: "Explodes the CAS web application archive") {
|
||||
dependsOn 'build'
|
||||
from zipTree("build/libs/${casWebApplicationBinaryName}")
|
||||
into explodedDir
|
||||
}
|
||||
|
||||
task explodeWar(type: Copy, group: "build", description: "Explodes the CAS archive and resources jar from the CAS web application archive") {
|
||||
dependsOn explodeWarOnly
|
||||
from zipTree("${explodedDir}/WEB-INF/lib/${resourceJarName}-${casServerVersion}.jar")
|
||||
into explodedResourcesDir
|
||||
}
|
||||
|
||||
task run(group: "build", description: "Run the CAS web application in embedded container mode") {
|
||||
dependsOn 'build'
|
||||
doLast {
|
||||
def casRunArgs = Arrays.asList("-server -noverify -Xmx2048M -XX:+TieredCompilation -XX:TieredStopAtLevel=1".split(" "))
|
||||
javaexec {
|
||||
main = "-jar"
|
||||
jvmArgs = casRunArgs
|
||||
args = ["build/libs/${casWebApplicationBinaryName}"]
|
||||
systemProperties = System.properties
|
||||
logger.info "Started ${commandLine}"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
task setExecutable(group: "build", description: "Configure the project to run in executable mode") {
|
||||
doFirst {
|
||||
project.setProperty("executable", "true")
|
||||
logger.info "Configuring the project as executable"
|
||||
}
|
||||
}
|
||||
|
||||
task executable(type: Exec, group: "build", description: "Run the CAS web application in standalone executable mode") {
|
||||
dependsOn setExecutable, 'build'
|
||||
doFirst {
|
||||
workingDir "."
|
||||
if (!Os.isFamily(Os.FAMILY_WINDOWS)) {
|
||||
commandLine "chmod", "+x", bootWar.archivePath
|
||||
}
|
||||
logger.info "Running ${bootWar.archivePath}"
|
||||
commandLine bootWar.archivePath
|
||||
}
|
||||
}
|
||||
|
||||
task debug(group: "build", description: "Debug the CAS web application in embedded mode on port 5005") {
|
||||
dependsOn 'build'
|
||||
doLast {
|
||||
logger.info "Debugging process is started in a suspended state, listening on port 5005."
|
||||
def casArgs = Arrays.asList("-Xmx2048M".split(" "))
|
||||
javaexec {
|
||||
main = "-jar"
|
||||
jvmArgs = casArgs
|
||||
debug = true
|
||||
args = ["build/libs/${casWebApplicationBinaryName}"]
|
||||
systemProperties = System.properties
|
||||
logger.info "Started ${commandLine}"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
task downloadShell(group: "shell", description: "Download CAS shell jar from snapshot or release maven repo") {
|
||||
doFirst {
|
||||
mkdir "${project.shellDir}"
|
||||
}
|
||||
doLast {
|
||||
def downloadFile
|
||||
if (isRunningCasServerSnapshot(casServerVersion)) {
|
||||
def snapshotDir = "https://oss.sonatype.org/content/repositories/snapshots/org/apereo/cas/cas-server-support-shell/${casServerVersion}/"
|
||||
def files = new ApacheURLLister().listFiles(new URL(snapshotDir))
|
||||
files = files.sort { it.path }
|
||||
files.each {
|
||||
if (it.path.endsWith(".jar")) {
|
||||
downloadFile = it
|
||||
}
|
||||
}
|
||||
} else {
|
||||
downloadFile = "https://repo1.maven.org/maven2/org/apereo/cas/cas-server-support-shell/${casServerVersion}/cas-server-support-shell-${casServerVersion}.jar"
|
||||
}
|
||||
logger.info "Downloading file: ${downloadFile}"
|
||||
download {
|
||||
src downloadFile
|
||||
dest new File("${project.shellDir}", "cas-server-support-shell-${casServerVersion}.jar")
|
||||
overwrite false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
task runShell(group: "shell", description: "Run the CAS shell") {
|
||||
dependsOn downloadShell
|
||||
doLast {
|
||||
println "Run the following command to launch the shell:\n\tjava -jar ${project.shellDir}/cas-server-support-shell-${casServerVersion}.jar"
|
||||
}
|
||||
}
|
||||
|
||||
task debugShell(group: "shell", description: "Run the CAS shell with debug options, wait for debugger on port 5005") {
|
||||
dependsOn downloadShell
|
||||
doLast {
|
||||
println """
|
||||
Run the following command to launch the shell:\n\t
|
||||
java -Xrunjdwp:transport=dt_socket,address=5000,server=y,suspend=y -jar ${project.shellDir}/cas-server-support-shell-${casServerVersion}.jar
|
||||
"""
|
||||
}
|
||||
}
|
||||
|
||||
task showConfiguration(group: "build", description: "Show configurations for each dependency, etc") {
|
||||
doLast() {
|
||||
def cfg = project.hasProperty("configuration") ? project.property("configuration") : "compile"
|
||||
configurations.getByName(cfg).each { println it }
|
||||
}
|
||||
}
|
||||
|
||||
task allDependenciesInsight(group: "build", type: DependencyInsightReportTask, description: "Produce insight information for all dependencies") {}
|
||||
|
||||
task allDependencies(group: "build", type: DependencyReportTask, description: "Display a graph of all project dependencies") {}
|
||||
|
||||
task casVersion(group: "build", description: "Display the current CAS version") {
|
||||
doFirst {
|
||||
def verbose = project.hasProperty("verbose") && Boolean.valueOf(project.getProperty("verbose"))
|
||||
if (verbose) {
|
||||
def out = services.get(StyledTextOutputFactory).create("CAS")
|
||||
println "******************************************************************"
|
||||
out.withStyle(Style.Info).println "Apereo CAS $casServerVersion"
|
||||
out.withStyle(Style.Description).println "Enterprise Single SignOn for all earthlings and beyond"
|
||||
out.withStyle(Style.SuccessHeader).println "- GitHub: "
|
||||
out.withStyle(Style.Success).println "https://github.com/apereo/cas"
|
||||
out.withStyle(Style.SuccessHeader).println "- Docs: "
|
||||
out.withStyle(Style.Success).println "https://apereo.github.io/cas"
|
||||
out.withStyle(Style.SuccessHeader).println "- Blog: "
|
||||
out.withStyle(Style.Success).println "https://apereo.github.io"
|
||||
println "******************************************************************"
|
||||
} else {
|
||||
println casServerVersion
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
task createKeystore(group: "build", description: "Create CAS keystore") {
|
||||
doFirst {
|
||||
mkdir "/etc/cas"
|
||||
|
||||
def keystorePath = "/etc/cas/thekeystore"
|
||||
|
||||
def dn = "CN=cas.example.org,OU=Example,OU=Org,C=US"
|
||||
if (project.hasProperty("certificateDn")) {
|
||||
dn = project.getProperty("certificateDn")
|
||||
}
|
||||
def subjectAltName = "dns:example.org,dns:localhost,ip:127.0.0.1"
|
||||
if (project.hasProperty("certificateSubAltName")) {
|
||||
subjectAltName = project.getProperty("certificateSubAltName")
|
||||
}
|
||||
// this will fail if thekeystore exists and has cert with cas alias already (so delete if you want to recreate)
|
||||
logger.info "Generating keystore for CAS with DN ${dn}"
|
||||
exec {
|
||||
workingDir "."
|
||||
commandLine "keytool", "-genkeypair", "-alias", "cas",
|
||||
"-keyalg", "RSA",
|
||||
"-keypass", "changeit", "-storepass", "changeit",
|
||||
"-keystore", keystorePath,
|
||||
"-dname", dn, "-ext", "SAN=${subjectAltName}"
|
||||
}
|
||||
logger.info "Exporting cert from keystore..."
|
||||
exec {
|
||||
workingDir "."
|
||||
commandLine "keytool", "-exportcert", "-alias", "cas",
|
||||
"-storepass", "changeit", "-keystore", keystorePath,
|
||||
"-file", "/etc/cas/cas.cer"
|
||||
}
|
||||
logger.info "Import /etc/cas/cas.cer into your Java truststore (JAVA_HOME/lib/security/cacerts)"
|
||||
}
|
||||
}
|
||||
|
||||
task listTemplateViews(group: "build", description: "List all CAS views") {
|
||||
dependsOn explodeWar
|
||||
|
||||
doFirst {
|
||||
fileTree(explodedResourcesDir).matching {
|
||||
include "**/*.html"
|
||||
}
|
||||
.collect { it.name }
|
||||
.toSorted()
|
||||
.each { println it }
|
||||
}
|
||||
}
|
||||
|
||||
task exportConfigMetadata(group: "build", description: "Export collection of CAS properties") {
|
||||
doLast {
|
||||
def file = new File(project.rootDir, 'config-metadata.properties')
|
||||
file.withWriter('utf-8') { writer ->
|
||||
def metadataRepository = new org.apereo.cas.metadata.CasConfigurationMetadataRepository()
|
||||
def repository = metadataRepository.repository;
|
||||
repository.allGroups
|
||||
.values()
|
||||
.sort { o1, o2 -> o1.id <=> o2.id }
|
||||
.each({ group ->
|
||||
def groupProperties = group.properties
|
||||
if (!groupProperties.isEmpty()) {
|
||||
def groupId = group.id.equalsIgnoreCase("_ROOT_GROUP_") ? "" : group.id + "."
|
||||
|
||||
writer.writeLine("# Group ${group.id}");
|
||||
writer.writeLine("# ====================")
|
||||
groupProperties
|
||||
.values()
|
||||
.sort { o1, o2 -> o1.id <=> o2.id }
|
||||
.each({ property ->
|
||||
def description = property.shortDescription
|
||||
if (!property.shortDescription?.equalsIgnoreCase(property.description) && property.description != null) {
|
||||
description = property.description.replace('\n', '#')
|
||||
}
|
||||
writer.writeLine("# ${description}");
|
||||
writer.writeLine("# Type: ${property.type}");
|
||||
if (property.deprecated) {
|
||||
def deprecation = property.deprecation
|
||||
writer.writeLine("# This setting is deprecated with a severity level of ${deprecation.level}.")
|
||||
if (deprecation.shortReason != null) {
|
||||
writer.writeLine("# because ${deprecation.shortReason}")
|
||||
}
|
||||
if (deprecation.replacement != null) {
|
||||
writer.writeLine("# Replace with: ${deprecation.replacement}")
|
||||
}
|
||||
}
|
||||
property.hints.valueHints.each {
|
||||
if (it.value instanceof Object[]) {
|
||||
if (it.value[0].toString().contains("RequiresModule")) {
|
||||
writer.writeLine("# Required module: org.apereo.cas:${it.description}")
|
||||
writer.writeLine("# Automatically included/available: ${it.value[1]}")
|
||||
}
|
||||
}
|
||||
if (it.value.toString().contains("RequiredProperty")) {
|
||||
writer.writeLine("# Note: This setting is required!")
|
||||
}
|
||||
}
|
||||
writer.writeLine("${groupId}${property.name}=${property.defaultValue}")
|
||||
writer.writeLine("")
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
println "Configuration metadata is available at ${file.absolutePath}"
|
||||
}
|
||||
}
|
||||
|
||||
task getResource(group: "build", description: "Fetch a CAS resource and move it into the overlay") {
|
||||
dependsOn explodeWar
|
||||
|
||||
doFirst {
|
||||
def resourceName = project.getProperty("resourceName")
|
||||
|
||||
def results = fileTree(explodedResourcesDir).matching {
|
||||
include "**/${resourceName}.*"
|
||||
include "**/${resourceName}"
|
||||
}
|
||||
if (results.isEmpty()) {
|
||||
println "No resources could be found matching ${resourceName}"
|
||||
return
|
||||
}
|
||||
if (results.size() > 1) {
|
||||
println "Multiple resources found matching ${resourceName}: ${results}"
|
||||
return
|
||||
}
|
||||
|
||||
def fromFile = explodedResourcesDir
|
||||
def resourcesDir = "src/main/resources"
|
||||
mkdir resourcesDir
|
||||
|
||||
def resourceFile = results[0].canonicalPath
|
||||
def toResourceFile = resourceFile.replace(fromFile, resourcesDir)
|
||||
|
||||
def parent = file(toResourceFile).getParent()
|
||||
mkdir parent
|
||||
|
||||
Files.copy(Paths.get(resourceFile), Paths.get(toResourceFile), StandardCopyOption.REPLACE_EXISTING)
|
||||
println "Copied file ${resourceFile} to ${toResourceFile}"
|
||||
}
|
||||
}
|
||||
|
||||
def isRunningCasServerSnapshot(casServerVersion) {
|
||||
return "${casServerVersion}".contains("-SNAPSHOT")
|
||||
}
|
||||
|
||||
task verifyRequiredJavaVersion {
|
||||
logger.info "Checking current Java version ${JavaVersion.current()} for required Java version ${project.targetCompatibility}"
|
||||
if (!JavaVersion.current().name.equalsIgnoreCase("${project.targetCompatibility}")) {
|
||||
throw new GradleException("Current Java version ${JavaVersion.current()} does not match required Java version ${project.targetCompatibility}")
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
|
@ -0,0 +1,5 @@
|
|||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.2-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
|
@ -0,0 +1,183 @@
|
|||
#!/usr/bin/env sh
|
||||
|
||||
#
|
||||
# Copyright 2015 the original author or authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# https://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
##############################################################################
|
||||
##
|
||||
## Gradle start up script for UN*X
|
||||
##
|
||||
##############################################################################
|
||||
|
||||
# Attempt to set APP_HOME
|
||||
# Resolve links: $0 may be a link
|
||||
PRG="$0"
|
||||
# Need this for relative symlinks.
|
||||
while [ -h "$PRG" ] ; do
|
||||
ls=`ls -ld "$PRG"`
|
||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||
if expr "$link" : '/.*' > /dev/null; then
|
||||
PRG="$link"
|
||||
else
|
||||
PRG=`dirname "$PRG"`"/$link"
|
||||
fi
|
||||
done
|
||||
SAVED="`pwd`"
|
||||
cd "`dirname \"$PRG\"`/" >/dev/null
|
||||
APP_HOME="`pwd -P`"
|
||||
cd "$SAVED" >/dev/null
|
||||
|
||||
APP_NAME="Gradle"
|
||||
APP_BASE_NAME=`basename "$0"`
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD="maximum"
|
||||
|
||||
warn () {
|
||||
echo "$*"
|
||||
}
|
||||
|
||||
die () {
|
||||
echo
|
||||
echo "$*"
|
||||
echo
|
||||
exit 1
|
||||
}
|
||||
|
||||
# OS specific support (must be 'true' or 'false').
|
||||
cygwin=false
|
||||
msys=false
|
||||
darwin=false
|
||||
nonstop=false
|
||||
case "`uname`" in
|
||||
CYGWIN* )
|
||||
cygwin=true
|
||||
;;
|
||||
Darwin* )
|
||||
darwin=true
|
||||
;;
|
||||
MINGW* )
|
||||
msys=true
|
||||
;;
|
||||
NONSTOP* )
|
||||
nonstop=true
|
||||
;;
|
||||
esac
|
||||
|
||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||
|
||||
# Determine the Java command to use to start the JVM.
|
||||
if [ -n "$JAVA_HOME" ] ; then
|
||||
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||
# IBM's JDK on AIX uses strange locations for the executables
|
||||
JAVACMD="$JAVA_HOME/jre/sh/java"
|
||||
else
|
||||
JAVACMD="$JAVA_HOME/bin/java"
|
||||
fi
|
||||
if [ ! -x "$JAVACMD" ] ; then
|
||||
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
else
|
||||
JAVACMD="java"
|
||||
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
|
||||
# Increase the maximum file descriptors if we can.
|
||||
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
|
||||
MAX_FD_LIMIT=`ulimit -H -n`
|
||||
if [ $? -eq 0 ] ; then
|
||||
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
|
||||
MAX_FD="$MAX_FD_LIMIT"
|
||||
fi
|
||||
ulimit -n $MAX_FD
|
||||
if [ $? -ne 0 ] ; then
|
||||
warn "Could not set maximum file descriptor limit: $MAX_FD"
|
||||
fi
|
||||
else
|
||||
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
|
||||
fi
|
||||
fi
|
||||
|
||||
# For Darwin, add options to specify how the application appears in the dock
|
||||
if $darwin; then
|
||||
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
|
||||
fi
|
||||
|
||||
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
|
||||
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
||||
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
||||
JAVACMD=`cygpath --unix "$JAVACMD"`
|
||||
|
||||
# We build the pattern for arguments to be converted via cygpath
|
||||
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
|
||||
SEP=""
|
||||
for dir in $ROOTDIRSRAW ; do
|
||||
ROOTDIRS="$ROOTDIRS$SEP$dir"
|
||||
SEP="|"
|
||||
done
|
||||
OURCYGPATTERN="(^($ROOTDIRS))"
|
||||
# Add a user-defined pattern to the cygpath arguments
|
||||
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
|
||||
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
|
||||
fi
|
||||
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||
i=0
|
||||
for arg in "$@" ; do
|
||||
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
|
||||
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
|
||||
|
||||
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
|
||||
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
|
||||
else
|
||||
eval `echo args$i`="\"$arg\""
|
||||
fi
|
||||
i=`expr $i + 1`
|
||||
done
|
||||
case $i in
|
||||
0) set -- ;;
|
||||
1) set -- "$args0" ;;
|
||||
2) set -- "$args0" "$args1" ;;
|
||||
3) set -- "$args0" "$args1" "$args2" ;;
|
||||
4) set -- "$args0" "$args1" "$args2" "$args3" ;;
|
||||
5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
|
||||
6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
|
||||
7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
|
||||
8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
|
||||
9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
# Escape application args
|
||||
save () {
|
||||
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
|
||||
echo " "
|
||||
}
|
||||
APP_ARGS=`save "$@"`
|
||||
|
||||
# Collect all arguments for the java command, following the shell quoting and substitution rules
|
||||
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
|
||||
|
||||
exec "$JAVACMD" "$@"
|
||||
|
|
@ -0,0 +1,103 @@
|
|||
@rem
|
||||
@rem Copyright 2015 the original author or authors.
|
||||
@rem
|
||||
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@rem you may not use this file except in compliance with the License.
|
||||
@rem You may obtain a copy of the License at
|
||||
@rem
|
||||
@rem https://www.apache.org/licenses/LICENSE-2.0
|
||||
@rem
|
||||
@rem Unless required by applicable law or agreed to in writing, software
|
||||
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
@rem See the License for the specific language governing permissions and
|
||||
@rem limitations under the License.
|
||||
@rem
|
||||
|
||||
@if "%DEBUG%" == "" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem
|
||||
@rem Gradle startup script for Windows
|
||||
@rem
|
||||
@rem ##########################################################################
|
||||
|
||||
@rem Set local scope for the variables with windows NT shell
|
||||
if "%OS%"=="Windows_NT" setlocal
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%" == "" set DIRNAME=.
|
||||
set APP_BASE_NAME=%~n0
|
||||
set APP_HOME=%DIRNAME%
|
||||
|
||||
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
|
||||
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
|
||||
|
||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
|
||||
|
||||
@rem Find java.exe
|
||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||
|
||||
set JAVA_EXE=java.exe
|
||||
%JAVA_EXE% -version >NUL 2>&1
|
||||
if "%ERRORLEVEL%" == "0" goto init
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:findJavaFromJavaHome
|
||||
set JAVA_HOME=%JAVA_HOME:"=%
|
||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||
|
||||
if exist "%JAVA_EXE%" goto init
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:init
|
||||
@rem Get command-line arguments, handling Windows variants
|
||||
|
||||
if not "%OS%" == "Windows_NT" goto win9xME_args
|
||||
|
||||
:win9xME_args
|
||||
@rem Slurp the command line arguments.
|
||||
set CMD_LINE_ARGS=
|
||||
set _SKIP=2
|
||||
|
||||
:win9xME_args_slurp
|
||||
if "x%~1" == "x" goto execute
|
||||
|
||||
set CMD_LINE_ARGS=%*
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
if "%ERRORLEVEL%"=="0" goto mainEnd
|
||||
|
||||
:fail
|
||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||
rem the _cmd.exe /c_ return code!
|
||||
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
|
||||
exit /b 1
|
||||
|
||||
:mainEnd
|
||||
if "%OS%"=="Windows_NT" endlocal
|
||||
|
||||
:omega
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
# This file is generated by the 'io.freefair.lombok' Gradle plugin
|
||||
config.stopBubbling = true
|
||||
Binary file not shown.
|
|
@ -1 +0,0 @@
|
|||
distributionUrl=https\://repository.apache.org/content/repositories/releases/org/apache/maven/apache-maven/3.5.0/apache-maven-3.5.0-bin.zip
|
||||
|
|
@ -1,234 +0,0 @@
|
|||
#!/bin/sh
|
||||
# ----------------------------------------------------------------------------
|
||||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
# ----------------------------------------------------------------------------
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Maven2 Start Up Batch script
|
||||
#
|
||||
# Required ENV vars:
|
||||
# ------------------
|
||||
# JAVA_HOME - location of a JDK home dir
|
||||
#
|
||||
# Optional ENV vars
|
||||
# -----------------
|
||||
# M2_HOME - location of maven2's installed home dir
|
||||
# MAVEN_OPTS - parameters passed to the Java VM when running Maven
|
||||
# e.g. to debug Maven itself, use
|
||||
# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
|
||||
# MAVEN_SKIP_RC - flag to disable loading of mavenrc files
|
||||
# ----------------------------------------------------------------------------
|
||||
|
||||
if [ -z "$MAVEN_SKIP_RC" ] ; then
|
||||
|
||||
if [ -f /etc/mavenrc ] ; then
|
||||
. /etc/mavenrc
|
||||
fi
|
||||
|
||||
if [ -f "$HOME/.mavenrc" ] ; then
|
||||
. "$HOME/.mavenrc"
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
# OS specific support. $var _must_ be set to either true or false.
|
||||
cygwin=false;
|
||||
darwin=false;
|
||||
mingw=false
|
||||
case "`uname`" in
|
||||
CYGWIN*) cygwin=true ;;
|
||||
MINGW*) mingw=true;;
|
||||
Darwin*) darwin=true
|
||||
#
|
||||
# Look for the Apple JDKs first to preserve the existing behaviour, and then look
|
||||
# for the new JDKs provided by Oracle.
|
||||
#
|
||||
if [ -z "$JAVA_HOME" ] && [ -L /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK ] ; then
|
||||
#
|
||||
# Apple JDKs
|
||||
#
|
||||
export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home
|
||||
fi
|
||||
|
||||
if [ -z "$JAVA_HOME" ] && [ -L /System/Library/Java/JavaVirtualMachines/CurrentJDK ] ; then
|
||||
#
|
||||
# Apple JDKs
|
||||
#
|
||||
export JAVA_HOME=/System/Library/Java/JavaVirtualMachines/CurrentJDK/Contents/Home
|
||||
fi
|
||||
|
||||
if [ -z "$JAVA_HOME" ] && [ -L "/Library/Java/JavaVirtualMachines/CurrentJDK" ] ; then
|
||||
#
|
||||
# Oracle JDKs
|
||||
#
|
||||
export JAVA_HOME=/Library/Java/JavaVirtualMachines/CurrentJDK/Contents/Home
|
||||
fi
|
||||
|
||||
if [ -z "$JAVA_HOME" ] && [ -x "/usr/libexec/java_home" ]; then
|
||||
#
|
||||
# Apple JDKs
|
||||
#
|
||||
export JAVA_HOME=`/usr/libexec/java_home`
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -z "$JAVA_HOME" ] ; then
|
||||
if [ -r /etc/gentoo-release ] ; then
|
||||
JAVA_HOME=`java-config --jre-home`
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -z "$M2_HOME" ] ; then
|
||||
## resolve links - $0 may be a link to maven's home
|
||||
PRG="$0"
|
||||
|
||||
# need this for relative symlinks
|
||||
while [ -h "$PRG" ] ; do
|
||||
ls=`ls -ld "$PRG"`
|
||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||
if expr "$link" : '/.*' > /dev/null; then
|
||||
PRG="$link"
|
||||
else
|
||||
PRG="`dirname "$PRG"`/$link"
|
||||
fi
|
||||
done
|
||||
|
||||
saveddir=`pwd`
|
||||
|
||||
M2_HOME=`dirname "$PRG"`/..
|
||||
|
||||
# make it fully qualified
|
||||
M2_HOME=`cd "$M2_HOME" && pwd`
|
||||
|
||||
cd "$saveddir"
|
||||
# echo Using m2 at $M2_HOME
|
||||
fi
|
||||
|
||||
# For Cygwin, ensure paths are in UNIX format before anything is touched
|
||||
if $cygwin ; then
|
||||
[ -n "$M2_HOME" ] &&
|
||||
M2_HOME=`cygpath --unix "$M2_HOME"`
|
||||
[ -n "$JAVA_HOME" ] &&
|
||||
JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
|
||||
[ -n "$CLASSPATH" ] &&
|
||||
CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
|
||||
fi
|
||||
|
||||
# For Migwn, ensure paths are in UNIX format before anything is touched
|
||||
if $mingw ; then
|
||||
[ -n "$M2_HOME" ] &&
|
||||
M2_HOME="`(cd "$M2_HOME"; pwd)`"
|
||||
[ -n "$JAVA_HOME" ] &&
|
||||
JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
|
||||
# TODO classpath?
|
||||
fi
|
||||
|
||||
if [ -z "$JAVA_HOME" ]; then
|
||||
javaExecutable="`which javac`"
|
||||
if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then
|
||||
# readlink(1) is not available as standard on Solaris 10.
|
||||
readLink=`which readlink`
|
||||
if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then
|
||||
if $darwin ; then
|
||||
javaHome="`dirname \"$javaExecutable\"`"
|
||||
javaExecutable="`cd \"$javaHome\" && pwd -P`/javac"
|
||||
else
|
||||
javaExecutable="`readlink -f \"$javaExecutable\"`"
|
||||
fi
|
||||
javaHome="`dirname \"$javaExecutable\"`"
|
||||
javaHome=`expr "$javaHome" : '\(.*\)/bin'`
|
||||
JAVA_HOME="$javaHome"
|
||||
export JAVA_HOME
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -z "$JAVACMD" ] ; then
|
||||
if [ -n "$JAVA_HOME" ] ; then
|
||||
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||
# IBM's JDK on AIX uses strange locations for the executables
|
||||
JAVACMD="$JAVA_HOME/jre/sh/java"
|
||||
else
|
||||
JAVACMD="$JAVA_HOME/bin/java"
|
||||
fi
|
||||
else
|
||||
JAVACMD="`which java`"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ ! -x "$JAVACMD" ] ; then
|
||||
echo "Error: JAVA_HOME is not defined correctly." >&2
|
||||
echo " We cannot execute $JAVACMD" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "$JAVA_HOME" ] ; then
|
||||
echo "Warning: JAVA_HOME environment variable is not set."
|
||||
fi
|
||||
|
||||
CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher
|
||||
|
||||
# For Cygwin, switch paths to Windows format before running java
|
||||
if $cygwin; then
|
||||
[ -n "$M2_HOME" ] &&
|
||||
M2_HOME=`cygpath --path --windows "$M2_HOME"`
|
||||
[ -n "$JAVA_HOME" ] &&
|
||||
JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
|
||||
[ -n "$CLASSPATH" ] &&
|
||||
CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
|
||||
fi
|
||||
|
||||
# traverses directory structure from process work directory to filesystem root
|
||||
# first directory with .mvn subdirectory is considered project base directory
|
||||
find_maven_basedir() {
|
||||
local basedir=$(pwd)
|
||||
local wdir=$(pwd)
|
||||
while [ "$wdir" != '/' ] ; do
|
||||
wdir=$(cd "$wdir/.."; pwd)
|
||||
if [ -d "$wdir"/.mvn ] ; then
|
||||
basedir=$wdir
|
||||
break
|
||||
fi
|
||||
done
|
||||
echo "${basedir}"
|
||||
}
|
||||
|
||||
# concatenates all lines of a file
|
||||
concat_lines() {
|
||||
if [ -f "$1" ]; then
|
||||
echo "$(tr -s '\n' ' ' < "$1")"
|
||||
fi
|
||||
}
|
||||
|
||||
export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-$(find_maven_basedir)}
|
||||
MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS"
|
||||
|
||||
# Provide a "standardized" way to retrieve the CLI args that will
|
||||
# work with both Windows and non-Windows executions.
|
||||
MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@"
|
||||
export MAVEN_CMD_LINE_ARGS
|
||||
|
||||
WRAPPER_LAUNCHER="org.apache.maven.wrapper.MavenWrapperMain"
|
||||
|
||||
exec "$JAVACMD" \
|
||||
$MAVEN_OPTS \
|
||||
"-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
|
||||
-classpath \
|
||||
"$MAVEN_PROJECTBASEDIR/maven/maven-wrapper.jar" \
|
||||
${WRAPPER_LAUNCHER} "$@"
|
||||
174
mvnw.bat
174
mvnw.bat
|
|
@ -1,174 +0,0 @@
|
|||
@REM ----------------------------------------------------------------------------
|
||||
@REM Licensed to the Apache Software Foundation (ASF) under one
|
||||
@REM or more contributor license agreements. See the NOTICE file
|
||||
@REM distributed with this work for additional information
|
||||
@REM regarding copyright ownership. The ASF licenses this file
|
||||
@REM to you under the Apache License, Version 2.0 (the
|
||||
@REM "License"); you may not use this file except in compliance
|
||||
@REM with the License. You may obtain a copy of the License at
|
||||
@REM
|
||||
@REM http://www.apache.org/licenses/LICENSE-2.0
|
||||
@REM
|
||||
@REM Unless required by applicable law or agreed to in writing,
|
||||
@REM software distributed under the License is distributed on an
|
||||
@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
@REM KIND, either express or implied. See the License for the
|
||||
@REM specific language governing permissions and limitations
|
||||
@REM under the License.
|
||||
@REM ----------------------------------------------------------------------------
|
||||
|
||||
@REM ----------------------------------------------------------------------------
|
||||
@REM Maven2 Start Up Batch script
|
||||
@REM
|
||||
@REM Required ENV vars:
|
||||
@REM JAVA_HOME - location of a JDK home dir
|
||||
@REM
|
||||
@REM Optional ENV vars
|
||||
@REM M2_HOME - location of maven2's installed home dir
|
||||
@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands
|
||||
@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a key stroke before ending
|
||||
@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven
|
||||
@REM e.g. to debug Maven itself, use
|
||||
@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
|
||||
@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files
|
||||
@REM ----------------------------------------------------------------------------
|
||||
|
||||
@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on'
|
||||
@echo off
|
||||
@REM enable echoing my setting MAVEN_BATCH_ECHO to 'on'
|
||||
@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO%
|
||||
|
||||
@REM set %HOME% to equivalent of $HOME
|
||||
if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%")
|
||||
|
||||
@REM Execute a user defined script before this one
|
||||
if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre
|
||||
@REM check for pre script, once with legacy .bat ending and once with .cmd ending
|
||||
if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat"
|
||||
if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd"
|
||||
:skipRcPre
|
||||
|
||||
@setlocal
|
||||
|
||||
set ERROR_CODE=0
|
||||
|
||||
@REM To isolate internal variables from possible post scripts, we use another setlocal
|
||||
@setlocal
|
||||
|
||||
@REM ==== START VALIDATION ====
|
||||
if not "%JAVA_HOME%" == "" goto OkJHome
|
||||
|
||||
echo.
|
||||
echo Error: JAVA_HOME not found in your environment. >&2
|
||||
echo Please set the JAVA_HOME variable in your environment to match the >&2
|
||||
echo location of your Java installation. >&2
|
||||
echo.
|
||||
goto error
|
||||
|
||||
:OkJHome
|
||||
if exist "%JAVA_HOME%\bin\java.exe" goto chkMHome
|
||||
|
||||
echo.
|
||||
echo Error: JAVA_HOME is set to an invalid directory. >&2
|
||||
echo JAVA_HOME = "%JAVA_HOME%" >&2
|
||||
echo Please set the JAVA_HOME variable in your environment to match the >&2
|
||||
echo location of your Java installation. >&2
|
||||
echo.
|
||||
goto error
|
||||
|
||||
:chkMHome
|
||||
if not "%M2_HOME%"=="" goto valMHome
|
||||
|
||||
SET "M2_HOME=%~dp0.."
|
||||
if not "%M2_HOME%"=="" goto valMHome
|
||||
|
||||
echo.
|
||||
echo Error: M2_HOME not found in your environment. >&2
|
||||
echo Please set the M2_HOME variable in your environment to match the >&2
|
||||
echo location of the Maven installation. >&2
|
||||
echo.
|
||||
goto error
|
||||
|
||||
:valMHome
|
||||
|
||||
:stripMHome
|
||||
if not "_%M2_HOME:~-1%"=="_\" goto checkMCmd
|
||||
set "M2_HOME=%M2_HOME:~0,-1%"
|
||||
goto stripMHome
|
||||
|
||||
:checkMCmd
|
||||
if exist "%M2_HOME%\bin\mvn.cmd" goto init
|
||||
|
||||
echo.
|
||||
echo Error: M2_HOME is set to an invalid directory. >&2
|
||||
echo M2_HOME = "%M2_HOME%" >&2
|
||||
echo Please set the M2_HOME variable in your environment to match the >&2
|
||||
echo location of the Maven installation >&2
|
||||
echo.
|
||||
goto error
|
||||
@REM ==== END VALIDATION ====
|
||||
|
||||
:init
|
||||
|
||||
set MAVEN_CMD_LINE_ARGS=%*
|
||||
|
||||
@REM Find the project base dir, i.e. the directory that contains the folder ".mvn".
|
||||
@REM Fallback to current working directory if not found.
|
||||
|
||||
set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR%
|
||||
IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir
|
||||
|
||||
set EXEC_DIR=%CD%
|
||||
set WDIR=%EXEC_DIR%
|
||||
:findBaseDir
|
||||
IF EXIST "%WDIR%"\.mvn goto baseDirFound
|
||||
cd ..
|
||||
IF "%WDIR%"=="%CD%" goto baseDirNotFound
|
||||
set WDIR=%CD%
|
||||
goto findBaseDir
|
||||
|
||||
:baseDirFound
|
||||
set MAVEN_PROJECTBASEDIR=%WDIR%
|
||||
cd "%EXEC_DIR%"
|
||||
goto endDetectBaseDir
|
||||
|
||||
:baseDirNotFound
|
||||
set MAVEN_PROJECTBASEDIR=%EXEC_DIR%
|
||||
cd "%EXEC_DIR%"
|
||||
|
||||
:endDetectBaseDir
|
||||
|
||||
IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig
|
||||
|
||||
@setlocal EnableExtensions EnableDelayedExpansion
|
||||
for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a
|
||||
@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS%
|
||||
|
||||
:endReadAdditionalConfig
|
||||
|
||||
SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
|
||||
set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\maven\maven-wrapper.jar"
|
||||
set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
|
||||
%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% %WRAPPER_LAUNCHER% %MAVEN_CMD_LINE_ARGS%
|
||||
|
||||
if ERRORLEVEL 1 goto error
|
||||
goto end
|
||||
|
||||
:error
|
||||
set ERROR_CODE=1
|
||||
|
||||
:end
|
||||
@endlocal & set ERROR_CODE=%ERROR_CODE%
|
||||
|
||||
if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost
|
||||
@REM check for post script, once with legacy .bat ending and once with .cmd ending
|
||||
if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat"
|
||||
if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd"
|
||||
:skipRcPost
|
||||
|
||||
@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on'
|
||||
if "%MAVEN_BATCH_PAUSE%" == "on" pause
|
||||
|
||||
if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE%
|
||||
|
||||
exit /B %ERROR_CODE%
|
||||
143
pom.xml
143
pom.xml
|
|
@ -1,143 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd ">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.apereo.cas</groupId>
|
||||
<artifactId>cas-overlay</artifactId>
|
||||
<packaging>war</packaging>
|
||||
<version>1.0</version>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>com.rimerosolutions.maven.plugins</groupId>
|
||||
<artifactId>wrapper-maven-plugin</artifactId>
|
||||
<version>0.0.4</version>
|
||||
<configuration>
|
||||
<verifyDownload>true</verifyDownload>
|
||||
<checksumAlgorithm>MD5</checksumAlgorithm>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<version>${springboot.version}</version>
|
||||
<configuration>
|
||||
<mainClass>org.springframework.boot.loader.WarLauncher</mainClass>
|
||||
<addResources>true</addResources>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-war-plugin</artifactId>
|
||||
<version>2.6</version>
|
||||
<configuration>
|
||||
<warName>cas</warName>
|
||||
<failOnMissingWebXml>false</failOnMissingWebXml>
|
||||
<recompressZippedFiles>false</recompressZippedFiles>
|
||||
<archive>
|
||||
<compress>false</compress>
|
||||
<manifestFile>${project.build.directory}/war/work/org.apereo.cas/cas-server-webapp${app.server}/META-INF/MANIFEST.MF
|
||||
</manifestFile>
|
||||
</archive>
|
||||
<overlays>
|
||||
<overlay>
|
||||
<groupId>org.apereo.cas</groupId>
|
||||
<artifactId>cas-server-webapp${app.server}</artifactId>
|
||||
</overlay>
|
||||
</overlays>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.3</version>
|
||||
</plugin>
|
||||
</plugins>
|
||||
<finalName>cas</finalName>
|
||||
</build>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apereo.cas</groupId>
|
||||
<artifactId>cas-server-webapp${app.server}</artifactId>
|
||||
<version>${cas.version}</version>
|
||||
<type>war</type>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<properties>
|
||||
<cas.version>5.1.5</cas.version>
|
||||
<springboot.version>1.5.3.RELEASE</springboot.version>
|
||||
<!-- app.server could be -jetty, -undertow, -tomcat, or blank if you plan to provide appserver -->
|
||||
<app.server>-tomcat</app.server>
|
||||
<maven.compiler.source>1.8</maven.compiler.source>
|
||||
<maven.compiler.target>1.8</maven.compiler.target>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>sonatype-releases</id>
|
||||
<url>http://oss.sonatype.org/content/repositories/releases/</url>
|
||||
<snapshots>
|
||||
<enabled>false</enabled>
|
||||
</snapshots>
|
||||
<releases>
|
||||
<enabled>true</enabled>
|
||||
</releases>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>sonatype-snapshots</id>
|
||||
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
|
||||
<snapshots>
|
||||
<enabled>true</enabled>
|
||||
</snapshots>
|
||||
<releases>
|
||||
<enabled>false</enabled>
|
||||
</releases>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>shibboleth-releases</id>
|
||||
<url>https://build.shibboleth.net/nexus/content/repositories/releases</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>spring-milestones</id>
|
||||
<url>https://repo.spring.io/milestone</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
<profiles>
|
||||
<profile>
|
||||
<activation>
|
||||
<activeByDefault>false</activeByDefault>
|
||||
</activation>
|
||||
<id>pgp</id>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>com.github.s4u.plugins</groupId>
|
||||
<artifactId>pgpverify-maven-plugin</artifactId>
|
||||
<version>1.1.0</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>check</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
<pgpKeyServer>hkp://pool.sks-keyservers.net</pgpKeyServer>
|
||||
<pgpKeysCachePath>${settings.localRepository}/pgpkeys-cache</pgpKeysCachePath>
|
||||
<scope>test</scope>
|
||||
<verifyPomFiles>true</verifyPomFiles>
|
||||
<failNoSignature>false</failNoSignature>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
</profiles>
|
||||
</project>
|
||||
|
|
@ -0,0 +1 @@
|
|||
rootProject.name='cas'
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
#!/bin/sh
|
||||
|
||||
#echo -e "\nChecking java..."
|
||||
#java -version
|
||||
|
||||
#echo -e "\nCreating CAS configuration directories..."
|
||||
mkdir -p /etc/cas/config
|
||||
mkdir -p /etc/cas/services
|
||||
|
||||
#echo "Listing provided CAS docker artifacts..."
|
||||
#ls -R docker/cas
|
||||
|
||||
#echo -e "\nMoving CAS configuration artifacts..."
|
||||
mv docker/cas/thekeystore /etc/cas 2>/dev/null
|
||||
mv docker/cas/config/*.* /etc/cas/config 2>/dev/null
|
||||
mv docker/cas/services/*.* /etc/cas/services 2>/dev/null
|
||||
|
||||
#echo -e "\nListing CAS configuration under /etc/cas..."
|
||||
#ls -R /etc/cas
|
||||
|
||||
echo -e "\nRunning CAS..."
|
||||
exec java -Xms512m -Xmx2048M -XX:+TieredCompilation -XX:TieredStopAtLevel=1 -jar docker/cas/war/cas.war
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<web-app version="3.1"
|
||||
metadata-complete="true"
|
||||
xmlns="http://xmlns.jcp.org/xml/ns/javaee"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd">
|
||||
</web-app>
|
||||
Loading…
Reference in New Issue