This repository has been archived by the owner on Jul 21, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.gradle
141 lines (120 loc) · 5.59 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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
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("fediz.war")
dependencies {
implementation "org.opensaml:opensaml-core:${project.opensamlVersion}"
implementation "org.opensaml:opensaml-profile-api:${project.opensamlVersion}"
implementation "org.opensaml:opensaml-saml-api:${project.opensamlVersion}"
implementation "org.opensaml:opensaml-xmlsec-api:${project.opensamlVersion}"
implementation "org.opensaml:opensaml-xmlsec-impl:${project.opensamlVersion}"
implementation "org.opensaml:opensaml-saml-impl:${project.opensamlVersion}"
implementation "org.opensaml:opensaml-security-api:${project.opensamlVersion}"
implementation "org.opensaml:opensaml-soap-api:${project.opensamlVersion}"
implementation "org.opensaml:opensaml-xacml-api:${project.opensamlVersion}"
implementation "org.opensaml:opensaml-xacml-saml-api:${project.opensamlVersion}"
implementation "org.opensaml:opensaml-xacml-saml-impl:${project.opensamlVersion}"
implementation "org.opensaml:opensaml-security-impl:${project.opensamlVersion}"
implementation "org.opensaml:opensaml-xacml-impl:${project.opensamlVersion}"
implementation "org.slf4j:slf4j-api:${project.slf4jVersion}"
implementation "org.slf4j:slf4j-log4j12:${project.slf4jVersion}"
implementation "org.slf4j:jcl-over-slf4j:${project.slf4jVersion}"
implementation "org.slf4j:jul-to-slf4j:${project.slf4jVersion}"
implementation "org.apache.cxf.fediz:fediz-core:${project.fedizVersion}"
implementation "org.apache.cxf.fediz:fediz-spring:${project.fedizVersion}"
implementation "org.apache.wss4j:wss4j-ws-security-common:${project.wss4jVersion}"
implementation "org.apache.wss4j:wss4j-ws-security-dom:${project.wss4jVersion}"
implementation "org.springframework:spring-web:${project.springVersion}"
implementation "org.springframework:spring-core:${project.springVersion}"
implementation "org.springframework:spring-beans:${project.springVersion}"
implementation "org.springframework:spring-context:${project.springVersion}"
implementation "org.springframework:spring-aop:${project.springVersion}"
implementation "org.springframework:spring-expression:${project.springVersion}"
implementation "org.springframework.security:spring-security-core:${project.springSecurityVersion}"
implementation "org.springframework.security:spring-security-web:${project.springSecurityVersion}"
implementation "org.springframework.security:spring-security-config:${project.springSecurityVersion}"
implementation 'javax.xml.bind:jaxb-api:2.3.1'
implementation "com.sun.xml.bind:jaxb-impl:2.3.1"
implementation 'log4j:log4j:1.2.17'
implementation 'joda-time:joda-time:2.12.0'
implementation 'org.jasypt:jasypt:1.9.3'
implementation 'net.sf.ehcache:ehcache:2.10.9.2'
implementation 'org.codehaus.woodstox:woodstox-core-asl:4.4.1'
implementation 'org.apache.commons:commons-lang3:3.12.0'
implementation "org.glassfish.jaxb:jaxb-runtime:4.0.1"
implementation "se.jiderhamn.classloader-leak-prevention:classloader-leak-prevention-servlet:2.7.0"
}
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')
// }
// }
}
}
war {
webInf { from "${projectDir}/WEB-INF" }
from "${projectDir}/index.html"
}
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")
}
programArgs.add("-Djava.util.logging.config.file=./src/main/resources/logging.properties")
programArgs.add("--add-opens=java.base/java.lang=ALL-UNNAMED")
programArgs.add("--add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED")
programArgs.add("--add-opens=java.base/java.net=ALL-UNNAMED")
println("Program arguments: " + programArgs)
jvmArgs = programArgs
scanInterval = 5
// servletContainer = 'jetty9.4'
contextPath = '/fediz'
httpPort = 8076
def path = System.getProperty("sp.sslKeystorePath", System.getenv("SP_SSL_KEYSTORE_PATH"))
if (path == null) {
path = "/etc/cas/thekeystore"
}
def password = System.getProperty("sp.sslKeystorePassword", System.getenv("SP_SSL_KEYSTORE_PASSWORD"))
if (password == null) {
password = "changeit"
}
println("Using keystore path " + path + " with password " + password)
if (path != null && new java.io.File(path).exists()) {
httpsEnabled = true
httpsPort = 9876
sslKeyStorePath = path
sslKeyStorePassword = password
sslTrustStorePath = path
sslKeyStorePassword = password
} else {
println("Keystore path " + path + " does not exist. HTTPS is disabled")
}
}