Compare commits

...

217 Commits
5.1 ... master

Author SHA1 Message Date
Misagh Moayyed fad84305ee
update tomcat 2020-03-19 11:02:52 +03:30
Misagh Moayyed 75828fb101
Updated: code cleanup and styling; fixes test cases 2020-03-03 18:59:26 +03:30
Misagh Moayyed 4d26b4cc87
Updated: code cleanup and styling; fixes test cases 2020-02-26 19:36:32 +03:30
Misagh Moayyed cd8ff40c8c
switch to gradle 6.2 2020-02-18 09:55:40 +04:00
Misagh Moayyed 37d40bddac
minor adjustments to build 2020-02-12 12:03:41 +04:00
Misagh Moayyed a9137ac532
clean up build repos 2020-02-11 18:43:08 +04:00
Misagh Moayyed 9e88707343
bring bootRun back 2020-02-10 22:37:01 +04:00
Misagh Moayyed 5113450681
docker refinements 2020-01-31 16:02:49 +04:00
Misagh Moayyed b6cd25a9e5
Upgrade jib plugin (#44) 2020-01-29 13:11:43 +04:00
Hal Deadman 794331ff63
add missing gradle repository (#43)
* add missing gradle repository 

The CAS snapshot repository is needed if building a overlay on a snapshot version if you haven't been building CAS locally.

* Update tasks.gradle

Co-authored-by: Misagh Moayyed <mm1844@gmail.com>
2020-01-29 12:12:22 +04:00
Misagh Moayyed fbdcb23696
Updated: code cleanup and styling; fixes test cases 2020-01-21 18:14:22 +04:00
Misagh Moayyed 93ef556b98
Update gradle.properties 2020-01-21 18:12:49 +04:00
Misagh Moayyed c658edcef8
bump to spring boot 2.2.3 2020-01-18 11:03:31 +04:00
Misagh Moayyed 70097b86bf
Updated: code cleanup and styling; fixes test cases 2020-01-16 10:33:21 +04:00
Misagh Moayyed fee67b81e3
Updated: code cleanup and styling; fixes test cases 2020-01-16 10:29:56 +04:00
Misagh Moayyed 71889cfe5f
support payara micro deployments 2020-01-12 17:23:09 +04:00
Misagh Moayyed 57d82dc57e
fix image tag 2020-01-08 09:57:15 +04:00
Misagh Moayyed 5ad1e9e254
fix docker push scripts
(cherry picked from commit ecb2aa52b188d5a1ed040c4ad332df707f95283c)
2020-01-06 17:09:40 +04:00
Misagh Moayyed 9b4a5db948
workout boot-run in overlay. clean up build 2019-12-31 11:08:28 +04:00
Misagh Moayyed bbf788fd6e
build task for config metadata 2019-12-14 13:46:02 +04:00
Misagh Moayyed 704908dfae
Update gradle.properties 2019-12-08 12:49:17 +04:00
Misagh Moayyed 2466fbe872
switch to implementation from compile 2019-12-01 17:00:48 +04:00
Misagh Moayyed aa08664f70
Merge branch 'master' of github.com:apereo/cas-overlay-template 2019-12-01 16:46:56 +04:00
NgSekLong 37db128082 Feature request: Allow copy resource by name with suffix (#40)
* Update tasks.gradle

* Update tasks.gradle
2019-12-01 16:46:47 +04:00
Misagh Moayyed 4ba7fc6bed
upgrade build; add lombok for comfort 2019-12-01 16:45:39 +04:00
Misagh Moayyed 742b6cee08
switch to gradle 6 2019-12-01 16:28:25 +04:00
Misagh Moayyed 2a0dab938e
Update gradle.properties 2019-11-15 22:41:40 +04:00
Misagh Moayyed 3a159a043a
Update gradle.properties 2019-11-07 13:14:08 +04:00
Misagh Moayyed f3b7a4d9fc
Update gradle.properties 2019-10-30 21:44:23 +04:00
Misagh Moayyed b3d8698cba
update versions 2019-10-28 13:05:51 +04:00
Misagh Moayyed e9105bf459
fix jib issue with registry options 2019-10-20 13:18:40 +04:00
Misagh Moayyed ce08720a1e
upgrade gradle 2019-10-19 01:05:12 +04:00
Misagh Moayyed 3ebfa1da19
Update gradle.properties 2019-10-18 19:54:41 +04:00
Misagh Moayyed e9ec69cd1b
Updated: code cleanup and styling; fixes test cases 2019-10-06 20:21:32 +04:00
Misagh Moayyed e9aeca1d8f
Update gradle.properties 2019-10-06 20:20:13 +04:00
Misagh Moayyed cff2009b9a
Updated: code cleanup and styling; fixes test cases 2019-10-05 11:04:33 +03:30
Misagh Moayyed ea89c4aabf
Update gradle.properties 2019-09-15 15:18:12 +04:30
Misagh Moayyed d5ce5bc656
Update gradle.properties 2019-09-10 20:07:36 +04:30
Hal Deadman e043d0fcdf
fix deprecated jib setting (#35) 2019-09-06 21:46:22 -04:00
Misagh Moayyed 423502ba4e
Update gradle.properties 2019-09-03 21:41:53 +04:30
Misagh Moayyed 15d4ac2dd0 upgrade gradle 2019-09-02 10:07:39 +04:30
Misagh Moayyed ca8b564ecc
Update gradle.properties 2019-09-02 10:06:28 +04:30
Misagh Moayyed 1d71225bb5
updated 2019-08-20 11:49:36 +04:30
Hal Deadman a8ecb1af62 update overlay plugin version and add comment about excludes (#33) 2019-08-19 19:59:08 +04:30
Misagh Moayyed cad6f23f1b
Update jib plugin 2019-08-17 07:59:30 +04:30
Phạm Tiến Thành bd648186dc Remove duplicate repo definition (#32) 2019-08-14 13:17:59 +04:30
Misagh Moayyed 64f9d49f96
updated 2019-08-07 09:01:34 +04:30
Misagh Moayyed c947c95e08
updated 2019-08-06 20:43:54 +04:30
Misagh Moayyed 3a88eb7b60
updated 2019-08-06 20:26:26 +04:30
Misagh Moayyed da223a962f
updated 2019-08-06 20:19:43 +04:30
Misagh Moayyed 211152bc61
added travis ci build 2019-08-06 20:07:45 +04:30
Hal Deadman 59b733919c Use maven war overlay plugin via io.freefair.war-overlay plugin (#31) 2019-08-06 19:50:18 +04:30
Misagh Moayyed 13385e89d4
Update gradle.properties 2019-08-06 19:39:07 +04:30
hdeadman d325eb92cd cleanup for building dockerfile on windows 2019-07-27 23:09:15 -04:00
Misagh Moayyed fddaafe9ec
upgrade jib 2019-07-18 20:17:22 +04:30
Hal Deadman b32c12bc25
update dependencies for cas master, update gradle wrapper (#30) 2019-07-13 23:32:38 -04:00
Misagh Moayyed c040eb4ab0
Create FUNDING.yml 2019-07-13 23:09:06 +04:30
Misagh Moayyed bd6878f104
Merge pull request #29 from ehirsch/patch-1
fixing build for the `jib` task
2019-06-27 13:20:09 +04:30
Eike Hirsch c3c681c737
fixing build for the `jib` task
When `jib` was used without a run of `jibDockerBuild` beforehand the war file was not copied into the docker image. The container failed to run in return.
2019-06-27 10:47:43 +02:00
Misagh Moayyed 334366b110
Merge pull request #28 from apereo/resourcereorg
WIP - resource reorg
2019-06-14 08:36:18 +04:30
Misagh Moayyed 696d8b33de
updated 2019-06-09 20:45:41 -07:00
hdeadman 6d7f6aa22e keep task name the same as before 2019-06-08 15:12:58 -04:00
hdeadman 266f753dfe update readme 2019-06-08 01:26:43 -04:00
hdeadman 1bc49127f8 use resource jar in 6.1.x 2019-06-08 01:20:41 -04:00
Misagh Moayyed b0456082e7
Update gradle.properties 2019-06-07 11:08:11 -07:00
Misagh Moayyed 03bd838c51
add docker compose file 2019-05-20 09:24:41 -07:00
Misagh Moayyed 4692d6be14
version updates 2019-05-16 00:34:51 -07:00
Misagh Moayyed b4a96555ae
updated 2019-05-13 00:37:14 -07:00
Misagh Moayyed c5cc2c1c96
work on docker builds 2019-05-08 03:50:46 -07:00
Misagh Moayyed 42a5c5a877
work on docker builds 2019-05-08 03:49:10 -07:00
Misagh Moayyed 1cd95f9145
work on docker builds 2019-05-08 03:45:42 -07:00
Misagh Moayyed a0ec436e86
work on docker builds 2019-05-08 03:30:28 -07:00
Misagh Moayyed d5634ace29
work on docker builds 2019-05-08 03:23:38 -07:00
Misagh Moayyed 334eab93ab
work on docker builds 2019-05-08 03:17:21 -07:00
Misagh Moayyed f90d732090
work on docker builds 2019-05-08 03:11:42 -07:00
Misagh Moayyed 6232ee897c
work on docker builds 2019-05-08 03:09:42 -07:00
Misagh Moayyed 59bcba0803
work on docker builds 2019-05-08 03:03:32 -07:00
Misagh Moayyed 2ed6ad4c7a Merge branch 'master' of github.com:apereo/cas-overlay-template
# Conflicts:
#	gradle.properties
2019-05-07 13:01:34 -07:00
Misagh Moayyed 076c4f23f7
move dockerfile into overlay project 2019-05-07 13:00:31 -07:00
Misagh Moayyed 40004b70ca
Update gradle.properties 2019-04-29 01:54:51 -07:00
Misagh Moayyed c383a79d47
updated 2019-04-16 08:50:05 -07:00
Misagh Moayyed 74ccdabc89
cleanup 2019-04-16 03:57:52 -07:00
Misagh Moayyed 6d0b20e80c
cleanup 2019-04-16 03:34:20 -07:00
Misagh Moayyed ae967be9e4
cleanup 2019-04-16 03:29:52 -07:00
Misagh Moayyed edaef20bcc
update versions 2019-04-16 03:24:23 -07:00
Misagh Moayyed c07c86f661
Update gradle.properties 2019-03-04 05:32:29 -07:00
Misagh Moayyed 7b3154af41
Update gradle.properties 2019-02-19 00:58:00 -07:00
Misagh Moayyed 904adc76bc
bump gradle and jib 2019-02-13 13:04:49 -07:00
Hal Deadman 759b507a36
Merge pull request #26 from hdeadman/master
fix copyCasConfiguration on windows
2019-02-10 20:21:08 -05:00
hdeadman d970f4e952 fix copyCasConfiguration on windows 2019-02-10 20:18:02 -05:00
Misagh Moayyed c19351980f
bump cas version 2019-02-06 04:08:31 -07:00
Misagh Moayyed 424641c37b
bump gradle version 2019-02-06 04:08:07 -07:00
Misagh Moayyed 09c0bd027e
Update gradle.properties 2019-02-05 00:50:48 -07:00
Misagh Moayyed 840e7d4d37
updated 2019-01-14 11:08:01 -07:00
Misagh Moayyed b96b3db05e
updated 2019-01-03 11:14:58 -07:00
Misagh Moayyed f77549d64b
bump versions to 6.1; up gradle 2019-01-03 11:13:27 -07:00
Misagh Moayyed 175d7a3d9b Merge branch 'master' of github.com:apereo/cas-overlay-template 2019-01-03 11:11:54 -07:00
Misagh Moayyed 80cef534af
remove shell scripts in favor of native gradle 2019-01-03 11:11:50 -07:00
Misagh Moayyed f7d5eae228
Update README.md 2018-12-30 13:45:19 -07:00
Misagh Moayyed cae64f40f8
Update gradle.properties 2018-12-28 17:30:29 -07:00
hdeadman f730d23aea Fix createKeystore
Setting commandLine twice in a task of type Exec was only running
the second command, never running the first one.
2018-12-09 22:53:16 -05:00
hdeadman ec1eea8e65 Allow logging level for spring boot admin client to be adjusted easily
set to warn by default
2018-12-09 20:07:54 -05:00
Misagh Moayyed 90a6e4f0a4
working on dependency exclusions 2018-12-04 07:05:45 -07:00
Misagh Moayyed b4ec82704c Revert "updated keywords"
This reverts commit aa10044d87.
2018-12-03 12:17:39 -07:00
Misagh Moayyed aa10044d87
updated keywords 2018-12-03 12:16:46 -07:00
Misagh Moayyed 1f8d2ccae5
updated 2018-12-01 18:44:47 -07:00
Misagh Moayyed 981c39b72b
Update gradle.properties 2018-12-01 00:24:24 -07:00
Misagh Moayyed 67571dbeda
clean up build 2018-11-29 21:32:44 -07:00
Misagh Moayyed 45f49df69f
clean up dependencies 2018-11-29 21:10:37 -07:00
Misagh Moayyed 979a3ddc99
cleaning up build dependencies 2018-11-29 17:40:42 -07:00
Misagh Moayyed 7d6ad46a42
move commands into gradle build 2018-11-27 16:58:29 -07:00
Misagh Moayyed fe611f38c9
move commands into gradle build 2018-11-27 16:54:37 -07:00
Misagh Moayyed 78a6ea50f5
move commands to gradle 2018-11-27 15:49:32 -07:00
Misagh Moayyed 8204594416
move commands to gradle 2018-11-27 15:38:44 -07:00
Misagh Moayyed 564cb84a26
move commands to gradle 2018-11-27 15:37:10 -07:00
Misagh Moayyed 939ea48bff
move commands to gradle 2018-11-27 15:33:50 -07:00
Misagh Moayyed 87a6b1ff49
move shell commands to gradle 2018-11-27 14:58:08 -07:00
Misagh Moayyed 95510177f5
move shell commands to gradle 2018-11-27 14:44:36 -07:00
Misagh Moayyed a98d4dd1c1
moved copy task to gradle 2018-11-27 13:09:06 -07:00
Misagh Moayyed 859453e55a
externalize versions 2018-11-27 11:05:54 -07:00
mmoayyed fa0054ceb2 update gradle, etc 2018-11-27 10:32:00 -07:00
Hal Deadman 418c05b928 fix reference to casServerVersion variable 2018-11-16 19:48:23 -05:00
Misagh Moayyed f2191a2978
updated 2018-11-14 15:09:19 +03:30
Misagh Moayyed 68a9324f06
minor fixes 2018-11-14 14:47:42 +03:30
Misagh Moayyed 339888eec7 Merge branches 'master' and 'master' of github.com:apereo/cas-overlay-template 2018-11-14 14:32:47 +03:30
Misagh Moayyed c73c4d5f9e
minor updates 2018-11-14 14:32:41 +03:30
hdeadman 9611bf66d0 minor docker updates
exec java in docker entrypoint so java is pid 1
having java be pid 1 allows for stack dump via:
  docker kill --signal=QUIT cas

put docker image in gradle.propertiees so non-slim can be used if tools
like jstack are desired
2018-11-10 15:56:58 -05:00
hdeadman 1896a3e4ed add docker commands to windows build wrapper 2018-11-10 12:26:12 -05:00
hdeadman 2f925473e7 makes sure shell scripts don't have windows crlf 2018-11-10 12:07:20 -05:00
Misagh Moayyed 3bc68d73f7 update list of build commands 2018-11-09 18:11:03 +03:30
Misagh Moayyed 363d2ddd3f update docs 2018-11-09 17:24:07 +03:30
Misagh Moayyed dc5fa2a9e6 finalized docker work based on jib 2018-11-09 17:14:46 +03:30
Misagh Moayyed 2a9b5ff10c
work on native docker imaging 2018-11-09 16:46:54 +03:30
Misagh Moayyed ed4865b4ea
Update gradle.properties 2018-11-07 12:51:46 +03:30
Misagh Moayyed fed401ccd7
update boot; minor fixes to gradle build 2018-10-31 23:19:56 +03:30
hdeadman 40d272cc70 fix property reference in log4j2.xml 2018-10-30 18:06:47 -04:00
hdeadman 0e66796f59 put warOverlay setting back in war plugin config 2018-10-30 13:36:21 -04:00
hdeadman 13e4160536 add windows build.cmd, add tasks to gradle to download/run CAS shell 2018-10-30 01:38:41 -04:00
hdeadman 74d22f49a1 change cas.version to match docs, move debug params to debug task 2018-10-29 23:51:57 -04:00
hdeadman c70e8f489f Merge branch 'master' of https://github.com/apereo/cas-overlay-template 2018-10-29 23:29:27 -04:00
Misagh Moayyed 2163b41b49
updated 2018-10-29 15:05:24 +03:30
Misagh Moayyed b5e8930322
Update gradle.properties 2018-10-26 12:58:33 +03:30
Hal Deadman d6d07bdaac remove reference to overrides.gradle
because spring boot 2 doesn't appear to mess with versions
2018-10-18 16:04:28 -04:00
Misagh Moayyed a914a60f5e
Update gradle.properties 2018-10-18 20:48:30 +03:30
Misagh Moayyed 22aa439621
Merge pull request #24 from hdeadman/gradleupdate
update gradle wrapper config to remove deprecation warning
2018-10-16 21:56:09 +03:30
hdeadman f0e5b5a384 update gradle wrapper config to remove deprecation warning 2018-10-16 08:26:34 -04:00
hdeadman bbb727782f update gradle wrapper config to remove deprecation warning 2018-10-16 08:22:00 -04:00
hdeadman e5e6705303 Merge branch 'master' of https://github.com/apereo/cas-overlay-template 2018-10-16 07:47:53 -04:00
Misagh Moayyed 73c9cf236a
fix issue with external prop 2018-10-14 20:18:43 +03:30
Misagh Moayyed e22fccf9d3
Merge pull request #23 from daramos/daramos-repo-2
Additional Repos needed when adding CAS support dependencies
2018-10-14 11:48:13 +03:30
Daniel Ramos f0c1217884
Additional Repos needed when adding dependencies
When adding additional dependencies Gradle complains about missing spring and groovy packages.
2018-10-12 17:32:59 -04:00
Misagh Moayyed 593b5ec0f3
Merge pull request #22 from daramos/daramos-milestone-repo
Add spring milestone repository
2018-10-13 00:07:27 +03:30
Daniel Ramos 7554252b75
Add spring milestone repository
Gradle build currently relies on spring-boot-gradle-plugin milestone 4 which is missing in the current repositories. 
Add the spring libs-milestone repository so build succeeds.
2018-10-12 13:21:53 -04:00
Hal Deadman a20b42d654
Merge pull request #2 from apereo/master
merge updates
2018-09-25 17:12:55 -04:00
Misagh Moayyed 52de522927
Update gradle.properties 2018-09-25 10:23:38 +03:30
Misagh Moayyed 27ef23f422
Update gradle.properties 2018-09-15 02:08:42 +02:00
Misagh Moayyed 2bd7ba2643
update build 2018-08-04 15:33:35 +04:30
Misagh Moayyed 67510e190a Merge branch '6.0'
# Conflicts:
#	pom.xml
2018-08-04 15:32:45 +04:30
Misagh Moayyed 40a9be8190
clean up overlay for gradle 2018-08-04 15:18:52 +04:30
Misagh Moayyed 20d467c026
Update build.properties 2018-08-03 22:44:43 +04:30
Misagh Moayyed f67e043370
working on overlay 2018-07-30 17:05:44 +04:30
Misagh Moayyed 4f62d08336
working on overlay 2018-07-30 17:01:07 +04:30
Misagh Moayyed 0e68c6789e
working on overlay 2018-07-30 16:59:11 +04:30
Misagh Moayyed 7da2ab3f71
working on overlay 2018-07-30 16:59:01 +04:30
Misagh Moayyed abab408c95
working on overlay 2018-07-30 14:49:10 +04:30
Misagh Moayyed 205be64cac
working on overlay 2018-07-30 14:45:07 +04:30
Misagh Moayyed 5e274c5fc6
working on combining builds 2018-07-30 13:58:49 +04:30
Misagh Moayyed a0d8be8780 merge maven and gradle overlays 2018-07-30 12:26:59 +04:30
Misagh Moayyed 666059c029 working on external tomcat setup 2018-07-29 15:18:20 +04:30
Misagh Moayyed e63fc60f82 bootrun config 2018-07-29 13:39:26 +04:30
Misagh Moayyed 268e6b7a7e update notes 2018-07-29 13:38:55 +04:30
Misagh Moayyed ae6af09c33
Update pom.xml 2018-07-27 19:10:49 +04:30
Misagh Moayyed 69825ebc01 prepping overlay for CAS 6 2018-07-27 19:10:15 +04:30
Misagh Moayyed 90bebc2e38
Update pom.xml 2018-07-26 23:14:02 +04:30
Misagh Moayyed 4a7bb5c4d9
Update pom.xml 2018-07-12 22:15:04 +04:30
Misagh Moayyed 5f1ad42aab
Update pom.xml 2018-06-29 07:07:38 -07:00
Misagh Moayyed da2b9db68e
Update pom.xml 2018-06-20 16:02:00 -07:00
Misagh Moayyed e9af57c1c9
Update cas.properties 2018-06-18 12:06:40 -07:00
Misagh Moayyed 8471742648
Delete application.yml 2018-06-07 10:42:23 -07:00
Misagh Moayyed 4f65e4cff2
Update pom.xml 2018-05-26 15:00:17 -07:00
Misagh Moayyed eb5b55fa4d
update to 5.3 2018-05-21 12:43:42 +04:30
Misagh Moayyed b472b7bc80
Update pom.xml 2018-04-23 22:11:50 +04:30
Misagh Moayyed 93f1806979
Update pom.xml 2018-04-19 01:11:58 +04:30
Misagh Moayyed 3c345ccc67 Add command to create the view in the overlay 2018-03-14 18:02:03 +03:00
Misagh Moayyed c480f2506e
add command to list views 2018-03-14 17:38:38 +03:00
Misagh Moayyed bb727cad8f
Update pom.xml 2018-03-03 21:05:53 +03:00
Misagh Moayyed 2b86ee7683 clean up build profiles 2018-02-21 21:30:34 +03:30
Misagh Moayyed de380ea991
Update pom.xml 2018-01-27 02:18:16 +03:30
Misagh Moayyed ffe33a7956
Update pom.xml 2017-12-21 19:44:14 -07:00
Misagh Moayyed f468697f9e
Update log4j2.xml 2017-12-13 15:28:25 -07:00
Misagh Moayyed 7678a822a4
updated maven version 2017-12-01 21:35:45 -07:00
Misagh Moayyed 0bd0c62188
Update pom.xml 2017-11-27 18:47:35 -07:00
Misagh Moayyed c1af16d023
Merge pull request #19 from hdeadman/command-fix
allow snapshots to be downloaded for command/cli jar
2017-11-18 10:47:47 -07:00
Hal Deadman d9275f38e6 allow snapshots to be downloaded for command/cli jar 2017-11-18 11:01:09 -05:00
Misagh Moayyed e9243640d2 Update pom.xml 2017-10-26 01:19:14 +03:30
Misagh Moayyed 675771bcbd
updated 2017-10-17 20:55:22 +03:30
Misagh Moayyed 2f88e97160
fixed merged conflicts 2017-10-17 11:46:47 +03:30
Misagh Moayyed e2c3b103b7
fixed merged conflicts 2017-10-17 11:44:25 +03:30
Misagh Moayyed cf8a33bb34 Update pom.xml 2017-10-17 01:21:08 +03:30
Misagh Moayyed 6c8d86cb1f
make executable the default 2017-10-09 15:07:58 +03:30
Misagh Moayyed fdd9e2afbd
make executable the default 2017-10-09 15:05:30 +03:30
Misagh Moayyed ddc9b3b65d
ensure executable works 2017-10-09 14:49:15 +03:30
Misagh Moayyed 2bb1f36069 Update README.md 2017-08-28 13:05:15 +04:30
Misagh Moayyed 8d9344e0c0 Update README.md 2017-08-28 13:04:53 +04:30
Misagh Moayyed af2621f315 Update README.md 2017-08-28 13:03:57 +04:30
Misagh Moayyed 7ebb59ba67 Merge pull request #16 from pspaude/IAMSE-422
Add Command Line Shell Info to Readme
2017-08-27 11:11:20 -07:00
pspaude ab00755c49 Add Command Line SHell Info to Readme 2017-08-25 09:15:31 -07:00
Misagh Moayyed 3237953c33 Merge pull request #15 from pspaude/IAMSE-376
Add command shell to overlay
2017-08-21 10:56:06 -07:00
pspaude e17382edc1 Update build.cmd to use command line shell 2017-08-15 18:43:25 -07:00
pspaude ab1ca81571 Update command line shell to be seperate of cas.war 2017-08-15 17:05:37 -07:00
Paul Spaude 87d1f8adc8 Merge branch '5.2' into IAMSE-376 2017-08-15 10:29:34 -07:00
pspaude 7c0155d504 Add command line shell to overlay 2017-08-15 10:21:43 -07:00
Misagh Moayyed 9043ebed4d Update README.md 2017-08-11 14:00:33 +04:30
Misagh Moayyed c0e592ca3c Update pom.xml 2017-08-11 13:56:29 +04:30
Misagh Moayyed dfbee02c3d Merge pull request #14 from pspaude/IAMSE-354
Update CAS version to 5.2.0-RC2
2017-08-10 00:11:14 +04:30
pspaude ed647d0e15 Update CAS version in README to 5.2.0-RC2 2017-08-09 09:38:25 -07:00
pspaude 005042b351 Update CAS version to 5.2.0-RC2 2017-08-09 09:36:57 -07:00
39 changed files with 1319 additions and 843 deletions

7
.dockerignore Normal file
View File

@ -0,0 +1,7 @@
target/**
build/**
bin/**
.idea/**
.history/**
.github/**
.git/**

6
.gitattributes vendored Normal file
View File

@ -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

1
.github/FUNDING.yml vendored Normal file
View File

@ -0,0 +1 @@
custom: ['https://www.apereo.org/content/apereo-membership']

11
.github/renovate.json vendored Normal file
View File

@ -0,0 +1,11 @@
{
"extends": [
"config:base",
":preserveSemverRanges",
":rebaseStalePrs",
":disableRateLimiting",
":semanticCommits",
":semanticCommitTypeAll(renovatebot)"
],
"labels": ["dependencies", "bot"]
}

8
.gitignore vendored
View File

@ -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

32
.mergify.yml Normal file
View File

@ -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:

62
.travis.yml Normal file
View File

@ -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"

40
Dockerfile Normal file
View File

@ -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
View File

@ -1,88 +1,146 @@
CAS Overlay Template
============================
CAS Overlay Template [![Build Status](https://travis-ci.org/apereo/cas-overlay-template.svg?branch=master)](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
```

View File

@ -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

111
build.gradle Normal file
View File

@ -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
}
}

View File

@ -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

10
docker-build.sh Executable file
View File

@ -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"

7
docker-compose.yml Normal file
View File

@ -0,0 +1,7 @@
version: '3'
services:
cas:
build: .
ports:
- "8443:8443"
- "8080:8080"

12
docker-push.sh Executable file
View File

@ -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.";

7
docker-run.sh Executable file
View File

@ -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

View File

@ -1,2 +0,0 @@
info:
description: CAS Configuration

View File

@ -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=

View File

@ -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] - &lt;%m&gt;%n"/>
<PatternLayout pattern="%highlight{%d %p [%c] - &lt;%m&gt;}%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] - &lt;%m&gt;%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" >

1
etc/cas/saml/.gitkeep Normal file
View File

@ -0,0 +1 @@
This directory is references in the Dockerfile so it needs to be here.

View File

BIN
etc/cas/thekeystore Normal file

Binary file not shown.

28
gradle.properties Normal file
View File

@ -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

52
gradle/dockerjib.gradle Normal file
View File

@ -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"
}

101
gradle/springboot.gradle Normal file
View File

@ -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
*/
}
}
}

331
gradle/tasks.gradle Normal file
View File

@ -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}")
}
}

BIN
gradle/wrapper/gradle-wrapper.jar vendored Normal file

Binary file not shown.

View File

@ -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

183
gradlew vendored Executable file
View File

@ -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" "$@"

103
gradlew.bat vendored Normal file
View File

@ -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

2
lombok.config Normal file
View File

@ -0,0 +1,2 @@
# This file is generated by the 'io.freefair.lombok' Gradle plugin
config.stopBubbling = true

Binary file not shown.

View File

@ -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

234
mvnw vendored
View File

@ -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
View File

@ -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
View File

@ -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>

1
settings.gradle Normal file
View File

@ -0,0 +1 @@
rootProject.name='cas'

View File

@ -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

View File

@ -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>