Compare commits
10 Commits
| Author | SHA1 | Date |
|---|---|---|
|
|
8e99c2374e | |
|
|
f4b3dee3ae | |
|
|
1074074f90 | |
|
|
7ff720576b | |
|
|
dd033d6b47 | |
|
|
b87dbbce90 | |
|
|
b93cf9b0e7 | |
|
|
a146b30850 | |
|
|
9021d7e590 | |
|
|
41cf792521 |
|
|
@ -1,7 +0,0 @@
|
|||
target/**
|
||||
build/**
|
||||
bin/**
|
||||
.idea/**
|
||||
.history/**
|
||||
.github/**
|
||||
.git/**
|
||||
|
|
@ -1,6 +1,4 @@
|
|||
# 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
|
||||
*.cmd text eol=crlf
|
||||
|
|
@ -1 +0,0 @@
|
|||
custom: ['https://www.apereo.org/content/apereo-membership']
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
{
|
||||
"extends": [
|
||||
"config:base",
|
||||
":preserveSemverRanges",
|
||||
":rebaseStalePrs",
|
||||
":disableRateLimiting",
|
||||
":semanticCommits",
|
||||
":semanticCommitTypeAll(renovatebot)"
|
||||
],
|
||||
"labels": ["dependencies", "bot"]
|
||||
}
|
||||
|
|
@ -18,5 +18,4 @@ bin/
|
|||
*.log
|
||||
tmp/
|
||||
./apache-tomcat
|
||||
apache-tomcat.zip
|
||||
config-metadata.properties
|
||||
apache-tomcat.zip
|
||||
32
.mergify.yml
32
.mergify.yml
|
|
@ -1,32 +0,0 @@
|
|||
#
|
||||
# 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:
|
||||
62
.travis.yml
62
.travis.yml
|
|
@ -1,62 +0,0 @@
|
|||
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"
|
||||
40
Dockerfile
40
Dockerfile
|
|
@ -1,40 +0,0 @@
|
|||
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"]
|
||||
98
README.md
98
README.md
|
|
@ -1,60 +1,30 @@
|
|||
CAS Overlay Template [](https://travis-ci.org/apereo/cas-overlay-template)
|
||||
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.
|
||||
|
||||
# Versions
|
||||
|
||||
- CAS `6.2.x`
|
||||
- CAS `6.0.x`
|
||||
- JDK `11`
|
||||
|
||||
# Overview
|
||||
|
||||
To build the project, use:
|
||||
You may invoke build commands using the `build.sh` script to work with your chosen overlay using:
|
||||
|
||||
```bash
|
||||
# Use --refresh-dependencies to force-update SNAPSHOT versions
|
||||
./gradlew[.bat] clean build
|
||||
./build.sh [command]
|
||||
```
|
||||
|
||||
To see what commands are available to the build script, run:
|
||||
|
||||
```bash
|
||||
./gradlew[.bat] tasks
|
||||
```
|
||||
|
||||
To launch into the CAS command-line shell:
|
||||
|
||||
```bash
|
||||
./gradlew[.bat] downloadShell runShell
|
||||
```
|
||||
|
||||
To fetch and overlay a CAS resource or view, use:
|
||||
|
||||
```bash
|
||||
./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
|
||||
./build.sh help
|
||||
```
|
||||
|
||||
# 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
|
||||
|
|
@ -68,18 +38,17 @@ dependencies {
|
|||
}
|
||||
```
|
||||
|
||||
To collect the list of all project modules and dependencies:
|
||||
Study material:
|
||||
|
||||
```bash
|
||||
./gradlew[.bat] allDependencies
|
||||
```
|
||||
- https://docs.gradle.org/current/userguide/artifact_dependencies_tutorial.html
|
||||
- https://docs.gradle.org/current/userguide/dependency_management.html
|
||||
|
||||
### Clear Gradle Cache
|
||||
## 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
|
||||
# Only do this when absolutely necessary!
|
||||
rm -rf $HOME/.gradle/caches/
|
||||
```
|
||||
|
||||
|
|
@ -87,12 +56,7 @@ Same strategy applies to Windows too, provided you switch `$HOME` to its equival
|
|||
|
||||
# Deployment
|
||||
|
||||
- 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
|
||||
```
|
||||
|
||||
- Create a keystore file `thekeystore` under `/etc/cas`. Use the password `changeit` for both the keystore and the key/certificate entries.
|
||||
- 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:
|
||||
|
|
@ -101,46 +65,12 @@ On a successful deployment via the following methods, CAS will be available at:
|
|||
|
||||
## Executable WAR
|
||||
|
||||
Run the CAS web application as an executable WAR:
|
||||
Run the CAS web application as an executable WAR.
|
||||
|
||||
```bash
|
||||
./gradlew[.bat] run
|
||||
```
|
||||
|
||||
Debug the CAS web application as an executable WAR:
|
||||
|
||||
```bash
|
||||
./gradlew[.bat] debug
|
||||
```
|
||||
|
||||
Run the CAS web application as a *standalone* executable WAR:
|
||||
|
||||
```bash
|
||||
./gradlew[.bat] clean executable
|
||||
./build.sh run
|
||||
```
|
||||
|
||||
## External
|
||||
|
||||
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
|
||||
```
|
||||
Deploy the binary web application file `cas.war` after a successful build to a servlet container of choice.
|
||||
|
|
@ -0,0 +1,129 @@
|
|||
@echo off
|
||||
|
||||
@set JAVA_ARGS=-Xms500m -Xmx1g
|
||||
@set CAS_DIR=\etc\cas
|
||||
@set CONFIG_DIR=\etc\cas\config
|
||||
@set SHELL_DIR=build\libs
|
||||
@set BUILD_DIR=build\libs
|
||||
@set DOCKER_ORG=org.apereo.cas
|
||||
@if "%PROFILES%" == "" @set PROFILES=standalone
|
||||
|
||||
@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 gradle in path, use it if found, otherwise use gradle wrapper
|
||||
@set GRADLE_CMD=gradle
|
||||
@where /q gradle
|
||||
@if %ERRORLEVEL% neq 0 set GRADLE_CMD=.\gradlew.bat
|
||||
|
||||
@if "%1" == "" call:help
|
||||
@if "%1" == "clean" (
|
||||
call:clean
|
||||
shift
|
||||
)
|
||||
@if "%1" == "copy" call:copy
|
||||
@if "%1" == "package" call:package %2 %3 %4
|
||||
@if "%1" == "debug" call:debug %2 %3 %4
|
||||
@if "%1" == "run" call:run %2 %3 %4 & goto :EOF
|
||||
@if "%1" == "refresh" call:refresh %2 %3 %4
|
||||
@if "%1" == "help" call:help
|
||||
@if "%1" == "gencert" call:gencert
|
||||
@if "%1" == "cli" call:cli
|
||||
@if "%1" == "debugcli" call:debugcli
|
||||
@if "%1" == "dependencies" call:dependencies
|
||||
@if "%1" == "dockerimage" call:dockerimage
|
||||
@if "%1" == "dockerrun" call:dockerrun
|
||||
@if "%1" == "dockerrunsh" call:dockerrunsh
|
||||
@if "%1" == "dockerexecsh" call:dockerexecsh
|
||||
|
||||
@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.cmd [copy|clean|package|refresh|run|debug|gencert|dockerimage|dockerrunsh|dockerexecsh] [optional extra args for gradle]"
|
||||
@echo "To get started on a clean system, run 'build.cmd gencert && build.cmd copy && build.cmd 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 %GRADLE_CMD% clean %1 %2 %3
|
||||
exit /B %ERRORLEVEL%
|
||||
@goto :EOF
|
||||
|
||||
:package
|
||||
call %GRADLE_CMD% build %1 %2 %3
|
||||
exit /B %ERRORLEVEL%
|
||||
@goto :EOF
|
||||
|
||||
:debug
|
||||
call:package %1 %2 %3 & java %JAVA_ARGS% -Xdebug -Xrunjdwp:transport=dt_socket,address=5005,server=y,suspend=n -jar %BUILD_DIR%\cas.war --spring.profiles.active=%PROFILES%
|
||||
@goto :EOF
|
||||
|
||||
:run
|
||||
call:package %1 %2 %3 & java %JAVA_ARGS% -jar %BUILD_DIR%\cas.war --spring.profiles.active=%PROFILES%
|
||||
@goto :EOF
|
||||
|
||||
:refresh
|
||||
call:package --refresh-dependencies %1 %2
|
||||
@goto :EOF
|
||||
|
||||
:dockerimage
|
||||
call %GRADLE_CMD% clean build jibDockerBuild
|
||||
@goto :EOF
|
||||
|
||||
:dockerrun
|
||||
docker stop cas
|
||||
docker rm cas
|
||||
docker run --name cas %DOCKER_ORG%/cas:latest
|
||||
@goto :EOF
|
||||
|
||||
:dockerrunsh
|
||||
@rem run image to look around, delete container on exit
|
||||
docker run --rm -it --entrypoint /bin/sh %DOCKER_ORG%/cas:latest
|
||||
@goto :EOF
|
||||
|
||||
:dockerexecsh
|
||||
@rem exec into runing container to look around, run jstack, check config, etc
|
||||
docker exec -it cas /bin/sh
|
||||
@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
|
||||
|
||||
:cli
|
||||
call %GRADLE_CMD% runShell
|
||||
@goto :EOF
|
||||
|
||||
:debugcli
|
||||
call %GRADLE_CMD% debugShell
|
||||
@goto :EOF
|
||||
|
||||
:dependencies
|
||||
call %GRADLE_CMD% allDependencies
|
||||
@goto :EOF
|
||||
|
||||
124
build.gradle
124
build.gradle
|
|
@ -1,28 +1,16 @@
|
|||
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() }
|
||||
}
|
||||
maven { url "https://repo.spring.io/libs-milestone" }
|
||||
maven { url "https://plugins.gradle.org/m2/" }
|
||||
}
|
||||
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}"
|
||||
classpath "com.boazj.gradle:gradle-log-plugin:${project.gradleLogVersion}"
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -30,26 +18,10 @@ 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"
|
||||
}
|
||||
maven { url "https://oss.sonatype.org/content/repositories/snapshots" }
|
||||
maven { url "https://build.shibboleth.net/nexus/content/repositories/releases/" }
|
||||
maven { url "https://repo.spring.io/milestone/" }
|
||||
maven { url "https://oss.jfrog.org/artifactory/oss-snapshot-local" }
|
||||
}
|
||||
|
||||
def casServerVersion = project.'cas.version'
|
||||
|
|
@ -58,30 +30,24 @@ 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/waroverlay.gradle")
|
||||
apply from: rootProject.file("gradle/tasks.gradle")
|
||||
|
||||
apply plugin: "war"
|
||||
apply plugin: "org.springframework.boot"
|
||||
apply plugin: "eclipse"
|
||||
apply plugin: "idea"
|
||||
|
||||
apply from: rootProject.file("gradle/springboot.gradle")
|
||||
apply from: rootProject.file("gradle/dockerjib.gradle")
|
||||
apply plugin: "com.google.cloud.tools.jib"
|
||||
|
||||
dependencies {
|
||||
compile "org.apereo.cas:cas-server-webapp${project.appServer}:${casServerVersion}"
|
||||
// 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"
|
||||
|
|
@ -108,4 +74,72 @@ idea {
|
|||
downloadJavadoc = true
|
||||
downloadSources = true
|
||||
}
|
||||
}
|
||||
|
||||
war {
|
||||
includeWarJars = true
|
||||
entryCompression = ZipEntryCompression.STORED
|
||||
}
|
||||
|
||||
springBoot {
|
||||
mainClassName = "org.apereo.cas.web.CasWebApplication"
|
||||
}
|
||||
|
||||
bootWar {
|
||||
doFirst {
|
||||
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 = true
|
||||
}
|
||||
}
|
||||
|
||||
bootRun {
|
||||
sourceResources sourceSets.main
|
||||
classpath = sourceSets.main.runtimeClasspath
|
||||
}
|
||||
|
||||
wrapper {
|
||||
distributionType = Wrapper.DistributionType.BIN
|
||||
gradleVersion = "${project.gradleVersion}"
|
||||
}
|
||||
|
||||
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 = [casServerVersion]
|
||||
*/
|
||||
}
|
||||
container {
|
||||
useCurrentTimestamp = true
|
||||
entrypoint = ['docker/entrypoint.sh']
|
||||
ports = ['80', '443', '8080', '8443']
|
||||
labels = [version:casServerVersion, name:project.name, group:project.group]
|
||||
}
|
||||
extraDirectory {
|
||||
path = file('src/main/jib')
|
||||
permissions = [
|
||||
'/docker/entrypoint.sh': '755'
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,160 @@
|
|||
#!/bin/bash
|
||||
|
||||
function copy() {
|
||||
./gradlew copyCasConfiguration "$@"
|
||||
}
|
||||
|
||||
function help() {
|
||||
casVersion=$(./gradlew casVersion --quiet)
|
||||
clear
|
||||
echo "******************************************************************"
|
||||
tput setaf 2
|
||||
echo "Apereo CAS $casVersion"
|
||||
echo "Enterprise Single SignOn for all earthlings and beyond"
|
||||
tput sgr 0
|
||||
echo "- https://github.com/apereo/cas"
|
||||
echo "- https://apereo.github.io/cas"
|
||||
echo "******************************************************************"
|
||||
|
||||
echo -e "Usage: build.sh [command]\n"
|
||||
echo -e "\tThe following commands are available:\n"
|
||||
echo -e "\tclean: \t\tClean Maven build directory"
|
||||
echo -e "\tcli: \t\tRun the CAS command line shell and pass commands"
|
||||
echo -e "\tcopy: \t\tCopy config from the project's local etc/cas/config directory to the root /etc/cas/config"
|
||||
echo -e "\tdebug: \t\tRun cas.war and listen for Java debugger on port 5000"
|
||||
echo -e "\tdependencies: \tGet a report of all dependencies configured in the build"
|
||||
echo -e "\tdocker: \tBuild a Docker image based on the current build and configuration"
|
||||
echo -e "\tgencert: \tCreate keystore with SSL certificate in location where CAS looks by default"
|
||||
echo -e "\tgetview: \tAsk for a view name to be included in the overlay for customizations"
|
||||
echo -e "\tgetresource: \tAsk for a resource name (properties/json/etc file) to be included in the overlay for customizations"
|
||||
echo -e "\tlistviews: \tList all CAS views that ship with the web application and can be customized in the overlay"
|
||||
echo -e "\tpackage: \tClean and build CAS war"
|
||||
echo -e "\texplode: \tExplode and unzip and packaged CAS war"
|
||||
echo -e "\trun: \t\tBuild and run cas.war via Java as an executable war"
|
||||
echo -e "\trunalone: \tBuild and run cas.war on its own as a standalone executable"
|
||||
echo -e "\ttomcat: \tDeploy the CAS web application to an external Apache Tomcat server"
|
||||
echo -e "\tupdate: \tPackage the CAS overlay by force-updating dependencies and SNAPSHOT versions"
|
||||
}
|
||||
|
||||
function clean() {
|
||||
./gradlew clean "$@"
|
||||
}
|
||||
|
||||
function package() {
|
||||
./gradlew clean build "$@"
|
||||
}
|
||||
|
||||
function update() {
|
||||
./gradlew clean build --refresh-dependencies "$@"
|
||||
}
|
||||
|
||||
function dependencies() {
|
||||
./gradlew allDependencies
|
||||
}
|
||||
|
||||
function tomcat() {
|
||||
./gradlew tomcatDeploy "$@"
|
||||
}
|
||||
|
||||
function debug() {
|
||||
./gradlew debug "$@"
|
||||
}
|
||||
|
||||
function run() {
|
||||
./gradlew run "$@"
|
||||
}
|
||||
|
||||
function runalone() {
|
||||
./gradlew clean executable
|
||||
}
|
||||
|
||||
function jibdocker() {
|
||||
./gradlew clean build jibDockerBuild "$@"
|
||||
}
|
||||
|
||||
function listviews() {
|
||||
./gradlew listTemplateViews "$@"
|
||||
}
|
||||
|
||||
function explodeApp() {
|
||||
./gradlew explodeWar
|
||||
}
|
||||
|
||||
function getresource() {
|
||||
./gradlew getResource -PresourceName="$@"
|
||||
}
|
||||
|
||||
function getview() {
|
||||
./gradlew getResource -PresourceName="$@"
|
||||
}
|
||||
|
||||
function gencert() {
|
||||
./gradlew createKeystore "$@"
|
||||
}
|
||||
|
||||
function cli() {
|
||||
./gradlew downloadShell runShell "$@"
|
||||
}
|
||||
|
||||
command=$1
|
||||
|
||||
if [ -z "$command" ]; then
|
||||
echo "No commands provided. Defaulting to [run]"
|
||||
command="run"
|
||||
fi
|
||||
|
||||
shift 1
|
||||
|
||||
case "$command" in
|
||||
"copy")
|
||||
copy
|
||||
;;
|
||||
"help")
|
||||
help
|
||||
;;
|
||||
"clean")
|
||||
clean "$@"
|
||||
;;
|
||||
"package"|"build")
|
||||
package "$@"
|
||||
;;
|
||||
"debug")
|
||||
debug "$@"
|
||||
;;
|
||||
"run")
|
||||
run "$@"
|
||||
;;
|
||||
"explode")
|
||||
explodeApp "$@"
|
||||
;;
|
||||
"docker")
|
||||
jibdocker "$@"
|
||||
;;
|
||||
"gencert")
|
||||
gencert "$@"
|
||||
;;
|
||||
"cli")
|
||||
cli "$@"
|
||||
;;
|
||||
"update")
|
||||
update "$@"
|
||||
;;
|
||||
"dependencies")
|
||||
update "$@"
|
||||
;;
|
||||
"runalone")
|
||||
runalone "$@"
|
||||
;;
|
||||
"listviews")
|
||||
listviews "$@"
|
||||
;;
|
||||
"getview")
|
||||
getview "$@"
|
||||
;;
|
||||
"getresource")
|
||||
getresource "$@"
|
||||
;;
|
||||
"tomcat")
|
||||
tomcat
|
||||
;;
|
||||
esac
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
#!/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"
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
version: '3'
|
||||
services:
|
||||
cas:
|
||||
build: .
|
||||
ports:
|
||||
- "8443:8443"
|
||||
- "8080:8080"
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
#!/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.";
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
#!/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 +0,0 @@
|
|||
This directory is references in the Dockerfile so it needs to be here.
|
||||
|
|
@ -1,28 +1,27 @@
|
|||
# Versions
|
||||
cas.version=6.2.0-SNAPSHOT
|
||||
springBootVersion=2.2.5.RELEASE
|
||||
cas.version=6.0.7
|
||||
springBootVersion=2.1.2.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
|
||||
gradleVersion=5.0
|
||||
tomcatVersion=9.0.27
|
||||
|
||||
group=org.apereo.cas
|
||||
sourceCompatibility=11
|
||||
targetCompatibility=11
|
||||
|
||||
jibVersion=2.1.0
|
||||
jibVersion=0.10.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
|
||||
gradleLogVersion=0.1.0
|
||||
|
||||
# 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
|
||||
baseDockerImage=adoptopenjdk/openjdk11:jdk11-alpine-nightly-slim
|
||||
|
|
|
|||
|
|
@ -1,52 +0,0 @@
|
|||
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"
|
||||
}
|
||||
|
|
@ -1,101 +0,0 @@
|
|||
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
|
||||
*/
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,69 +1,66 @@
|
|||
import org.apache.ivy.util.url.ApacheURLLister
|
||||
import org.apache.ivy.util.url.*
|
||||
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
|
||||
import java.nio.file.*
|
||||
import org.gradle.internal.logging.text.StyledTextOutputFactory;
|
||||
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"
|
||||
apply plugin: "com.boazj.log"
|
||||
|
||||
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"
|
||||
def explodedDir="${buildDir}/cas"
|
||||
|
||||
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
|
||||
into "/etc/cas/config"
|
||||
doFirst {
|
||||
new File('/etc/cas/config').mkdirs()
|
||||
mkdir "/etc/cas/config"
|
||||
}
|
||||
}
|
||||
|
||||
task explodeWarOnly(type: Copy, group: "build", description: "Explodes the CAS web application archive") {
|
||||
dependsOn 'build'
|
||||
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"
|
||||
}
|
||||
|
||||
task explodeWar(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'
|
||||
dependsOn build
|
||||
doLast {
|
||||
def casRunArgs = Arrays.asList("-server -noverify -Xmx2048M -XX:+TieredCompilation -XX:TieredStopAtLevel=1".split(" "))
|
||||
def casRunArgs = Arrays.asList("-Xmx2048M -XX:+TieredCompilation -XX:TieredStopAtLevel=1".split(" "))
|
||||
javaexec {
|
||||
main = "-jar"
|
||||
jvmArgs = casRunArgs
|
||||
args = ["build/libs/${casWebApplicationBinaryName}"]
|
||||
systemProperties = System.properties
|
||||
logger.info "Started ${commandLine}"
|
||||
}
|
||||
}
|
||||
|
|
@ -76,8 +73,8 @@ task setExecutable(group: "build", description: "Configure the project to run in
|
|||
}
|
||||
}
|
||||
|
||||
task executable(type: Exec, group: "build", description: "Run the CAS web application in standalone executable mode") {
|
||||
dependsOn setExecutable, 'build'
|
||||
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)) {
|
||||
|
|
@ -89,7 +86,7 @@ task executable(type: Exec, group: "build", description: "Run the CAS web applic
|
|||
}
|
||||
|
||||
task debug(group: "build", description: "Debug the CAS web application in embedded mode on port 5005") {
|
||||
dependsOn 'build'
|
||||
dependsOn build
|
||||
doLast {
|
||||
logger.info "Debugging process is started in a suspended state, listening on port 5005."
|
||||
def casArgs = Arrays.asList("-Xmx2048M".split(" "))
|
||||
|
|
@ -98,13 +95,12 @@ task debug(group: "build", description: "Debug the CAS web application in embedd
|
|||
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") {
|
||||
task downloadShell (group: "shell", description: "Download CAS shell jar from snapshot or release maven repo") {
|
||||
doFirst {
|
||||
mkdir "${project.shellDir}"
|
||||
}
|
||||
|
|
@ -113,7 +109,7 @@ task downloadShell(group: "shell", description: "Download CAS shell jar from sna
|
|||
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 = files.sort{it.path}
|
||||
files.each {
|
||||
if (it.path.endsWith(".jar")) {
|
||||
downloadFile = it
|
||||
|
|
@ -131,14 +127,14 @@ task downloadShell(group: "shell", description: "Download CAS shell jar from sna
|
|||
}
|
||||
}
|
||||
|
||||
task runShell(group: "shell", description: "Run the CAS shell") {
|
||||
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") {
|
||||
task debugShell (group: "shell", description: "Run the CAS shell with debug options, wait for debugger on port 5005") {
|
||||
dependsOn downloadShell
|
||||
doLast {
|
||||
println """
|
||||
|
|
@ -159,7 +155,7 @@ task allDependenciesInsight(group: "build", type: DependencyInsightReportTask, d
|
|||
|
||||
task allDependencies(group: "build", type: DependencyReportTask, description: "Display a graph of all project dependencies") {}
|
||||
|
||||
task casVersion(group: "build", description: "Display the current CAS version") {
|
||||
task casVersion (group: "build", description: "Display the current CAS version") {
|
||||
doFirst {
|
||||
def verbose = project.hasProperty("verbose") && Boolean.valueOf(project.getProperty("verbose"))
|
||||
if (verbose) {
|
||||
|
|
@ -180,7 +176,7 @@ task casVersion(group: "build", description: "Display the current CAS version")
|
|||
}
|
||||
}
|
||||
|
||||
task createKeystore(group: "build", description: "Create CAS keystore") {
|
||||
task createKeystore (group: "build", description: "Create CAS keystore") {
|
||||
doFirst {
|
||||
mkdir "/etc/cas"
|
||||
|
||||
|
|
@ -215,73 +211,18 @@ task createKeystore(group: "build", description: "Create CAS keystore") {
|
|||
}
|
||||
}
|
||||
|
||||
task listTemplateViews(group: "build", description: "List all CAS views") {
|
||||
|
||||
|
||||
task listTemplateViews (group: "build", description: "List all CAS views") {
|
||||
dependsOn explodeWar
|
||||
|
||||
doFirst {
|
||||
fileTree(explodedResourcesDir).matching {
|
||||
fileTree(explodedDir).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}"
|
||||
.collect { it.name }
|
||||
.toSorted()
|
||||
.each { println it }
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -291,9 +232,8 @@ task getResource(group: "build", description: "Fetch a CAS resource and move it
|
|||
doFirst {
|
||||
def resourceName = project.getProperty("resourceName")
|
||||
|
||||
def results = fileTree(explodedResourcesDir).matching {
|
||||
def results = fileTree(explodedDir).matching {
|
||||
include "**/${resourceName}.*"
|
||||
include "**/${resourceName}"
|
||||
}
|
||||
if (results.isEmpty()) {
|
||||
println "No resources could be found matching ${resourceName}"
|
||||
|
|
@ -304,7 +244,7 @@ task getResource(group: "build", description: "Fetch a CAS resource and move it
|
|||
return
|
||||
}
|
||||
|
||||
def fromFile = explodedResourcesDir
|
||||
def fromFile = explodedDir + "/WEB-INF/classes"
|
||||
def resourcesDir = "src/main/resources"
|
||||
mkdir resourcesDir
|
||||
|
||||
|
|
@ -323,9 +263,55 @@ 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}")
|
||||
task downloadTomcat(type: Download) {
|
||||
def tomcatMajorVersion = "${tomcatVersion}".substring(0, "${tomcatVersion}".indexOf("."))
|
||||
def downloadFile = "https://www.apache.org/dist/tomcat/tomcat-${tomcatMajorVersion}/v${tomcatVersion}/bin/apache-tomcat-${tomcatVersion}.zip"
|
||||
logger.info "Downloading file $downloadFile"
|
||||
src downloadFile
|
||||
dest new File("apache-tomcat.zip")
|
||||
overwrite false
|
||||
}
|
||||
|
||||
task unzipTomcat(type: Copy) {
|
||||
from zipTree(downloadTomcat.dest)
|
||||
into buildDir
|
||||
includeEmptyDirs = false
|
||||
}
|
||||
|
||||
task shutdownTomcat(type:Exec) {
|
||||
doFirst {
|
||||
new File("${tomcatDirectory}/bin/catalina.sh").setExecutable(true)
|
||||
new File("${tomcatDirectory}/bin/shutdown.sh").setExecutable(true)
|
||||
environment["CATALINA_HOME"] = "${tomcatDirectory}"
|
||||
commandLine "${tomcatDirectory}/bin/shutdown.sh", "2>/dev/null"
|
||||
ignoreExitValue = true
|
||||
}
|
||||
}
|
||||
|
||||
task tomcatDeploy(type:Exec) {
|
||||
dependsOn build, downloadTomcat, unzipTomcat, shutdownTomcat
|
||||
|
||||
doFirst {
|
||||
Files.copy(Paths.get(bootWar.archivePath.canonicalPath),
|
||||
Paths.get("${tomcatDirectory}/webapps/${casWebApplicationBinaryName}"),
|
||||
StandardCopyOption.REPLACE_EXISTING)
|
||||
new File("${tomcatDirectory}/bin/catalina.sh").setExecutable(true)
|
||||
new File("${tomcatDirectory}/bin/startup.sh").setExecutable(true)
|
||||
mkdir "${tomcatDirectory}/logs"
|
||||
environment["CATALINA_HOME"] = "${tomcatDirectory}"
|
||||
commandLine "${tomcatDirectory}/bin/startup.sh"
|
||||
}
|
||||
}
|
||||
|
||||
tail {
|
||||
log = files("${tomcatDirectory}/logs/catalina.out")
|
||||
showColors = true
|
||||
doFirst {
|
||||
println "Type 'quit' to exit"
|
||||
}
|
||||
}
|
||||
|
||||
build.mustRunAfter(setExecutable)
|
||||
unzipTomcat.mustRunAfter(downloadTomcat)
|
||||
shutdownTomcat.mustRunAfter(unzipTomcat)
|
||||
tomcatDeploy.mustRunAfter(shutdownTomcat).finalizedBy(tail)
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
buildscript {
|
||||
repositories {
|
||||
maven { url "https://dl.bintray.com/scalding/maven" }
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath "org.scaldingspoon.gradle:gradle-waroverlay-plugin:0.9.3"
|
||||
}
|
||||
}
|
||||
|
||||
if (!project.plugins.findPlugin(scaldingspoon.gradle.WarOverlayPlugin)) {
|
||||
project.apply(plugin: scaldingspoon.gradle.WarOverlayPlugin)
|
||||
}
|
||||
Binary file not shown.
|
|
@ -1,5 +1,5 @@
|
|||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.2-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-5.0-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
|
|
|||
|
|
@ -1,21 +1,5 @@
|
|||
#!/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
|
||||
|
|
@ -44,7 +28,7 @@ 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"'
|
||||
DEFAULT_JVM_OPTS=""
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD="maximum"
|
||||
|
|
@ -125,8 +109,8 @@ 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
|
||||
# For Cygwin, switch paths to Windows format before running java
|
||||
if $cygwin ; then
|
||||
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
||||
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
||||
JAVACMD=`cygpath --unix "$JAVACMD"`
|
||||
|
|
@ -154,19 +138,19 @@ if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
|
|||
else
|
||||
eval `echo args$i`="\"$arg\""
|
||||
fi
|
||||
i=`expr $i + 1`
|
||||
i=$((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" ;;
|
||||
(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
|
||||
|
||||
|
|
@ -175,9 +159,14 @@ save () {
|
|||
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
|
||||
echo " "
|
||||
}
|
||||
APP_ARGS=`save "$@"`
|
||||
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"
|
||||
|
||||
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
|
||||
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
|
||||
cd "$(dirname "$0")"
|
||||
fi
|
||||
|
||||
exec "$JAVACMD" "$@"
|
||||
|
|
|
|||
|
|
@ -1,103 +1,84 @@
|
|||
@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
|
||||
@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 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=
|
||||
|
||||
@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
|
||||
|
|
|
|||
|
|
@ -1,2 +0,0 @@
|
|||
# This file is generated by the 'io.freefair.lombok' Gradle plugin
|
||||
config.stopBubbling = true
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
<?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