This repository was archived by the owner on Jul 21, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathbuild.gradle
93 lines (79 loc) · 3.05 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
defaultTasks "build", "jettyRunWar"
allprojects {
repositories {
mavenLocal()
mavenCentral()
maven { url 'https://build.shibboleth.net/nexus/content/groups/public' }
}
}
buildscript {
repositories {
mavenLocal()
mavenCentral()
}
dependencies {
classpath "org.gretty:gretty:3.0.5"
}
}
apply plugin: 'war'
apply plugin: 'java'
apply plugin: 'idea'
apply plugin: "org.gretty"
war.archiveName("sp.war")
description = "Spring Security SAML v2 sample webapp"
dependencies {
implementation "org.springframework.security.extensions:spring-security-saml2-core:${project.'spring-security-saml2.version'}",
"org.springframework:spring-core:${project.'spring.version'}",
"org.springframework:spring-beans:${project.'spring.version'}",
"org.springframework:spring-context:${project.'spring.version'}",
"org.springframework:spring-aop:${project.'spring.version'}",
"org.springframework:spring-web:${project.'spring.version'}",
"org.springframework:spring-webmvc:${project.'spring.version'}",
"org.springframework.security:spring-security-config:${project.'spring-security.version'}",
"org.slf4j:slf4j-log4j12:${project.'slf4j.version'}",
"org.slf4j:jul-to-slf4j:${project.'slf4j.version'}",
"commons-io:commons-io:2.11.0",
"javax.servlet:jstl:1.2",
"se.jiderhamn.classloader-leak-prevention:classloader-leak-prevention-servlet:2.7.0"
providedCompile "javax.servlet:jsp-api:2.0"
testImplementation "junit:junit:4.13.2"
}
configurations {
grettyRunnerJetty9 {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
if (details.requested.group == 'org.ow2.asm') {
details.useVersion('5.0.3')
}
if (details.requested.group == 'org.glassfish'
&& details.requested.name == 'javax.el') {
details.useVersion('3.0.0')
}
}
}
}
List<String> programArgs = ["-Dspring.security.strategy=MODE_GLOBAL",
"-Dorg.eclipse.jetty.annotations.maxWait=120"]
gretty {
System.properties.each {
programArgs.add("-D${it.key}=${it.value}")
}
if (System.getProperty("debug") != null) {
programArgs.add("-Xdebug")
programArgs.add("-Xrunjdwp:transport=dt_socket,address=5008,server=y,suspend=n")
}
logger.info("Program arguments: {}", programArgs)
jvmArgs = programArgs
scanInterval = 5
// servletContainer = 'jetty9.4'
contextPath = '/sp'
httpPort = 8076
def path = System.getProperty("sp.sslKeystorePath", "/etc/cas/thekeystore")
if (path != null && new java.io.File(path).exists()) {
httpsEnabled = true
httpsPort = 9876
sslKeyStorePath = path
sslKeyStorePassword = System.getProperty("sp.sslKeystorePassword", "changeit")
sslTrustStorePath = path
sslKeyStorePassword = System.getProperty("sp.sslKeystorePassword", "changeit")
}
}