-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
116 lines (96 loc) · 3.77 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
apply plugin: 'org.springframework.boot'
apply from: 'https://dl.bintray.com/scalding/generic/waroverlay.gradle'
apply from: 'https://raw.githubusercontent.com/apereo/cas/5.2.x/gradle/overrides.gradle'
apply plugin: 'eclipse'
apply plugin: 'idea'
configurations {
compile.exclude group: "org.apache.directory.api", module: "api-ldap-schema-data"
}
eclipse {
classpath {
downloadSources = true
downloadJavadoc = true
}
}
idea {
module {
downloadJavadoc = true
downloadSources = true
}
}
bootRepackage {
//mainClass = "org.apereo.cas.web.CasWebApplication"
mainClass = "org.ow2.proactive.iam.bootstrap.BootstrapApplication"
executable = true
}
bootRun {
addResources = true
}
repositories {
mavenCentral()
jcenter()
maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
maven { url 'https://build.shibboleth.net/nexus/content/repositories/releases/' }
}
dependencies {
//compile "org.apereo.cas:cas-server-webapp-tomcat:${project.'cas.version'}@war"
compile "org.apereo.cas:cas-server-webapp-jetty:${project.'cas.version'}@war"
compile "org.apereo.cas:cas-server-webapp-init:${project.'cas.version'}"
compile "org.apereo.cas:cas-server-support-ldap:${project.'cas.version'}"
compile "org.apereo.cas:cas-server-support-json-service-registry:${project.'cas.version'}"
compile "org.apereo.cas:cas-server-support-rest:${project.'cas.version'}"
compile "org.apereo.cas:cas-server-support-rest-tokens:${project.'cas.version'}"
compile "org.apereo.cas:cas-server-support-token-tickets:${project.'cas.version'}"
//compile group: 'org.apache.directory.server', name: 'apacheds-all', version: '2.0.0-M24'
compile group: 'org.apache.directory.api', name: 'api-all', version: '1.0.0'
compile group: 'org.apache.directory.server', name: 'apacheds-core-api', version: '2.0.0-M24'
compile group: 'org.apache.directory.server', name: 'apacheds-protocol-shared', version: '2.0.0-M24'
compile group: 'org.apache.directory.server', name: 'apacheds-core-annotations', version: '2.0.0-M24'
compile group: 'org.apache.directory.server', name: 'apacheds-protocol-ldap', version: '2.0.0-M24'
compile group: 'javax.servlet', name: 'javax.servlet-api', version: '3.1.0'
compile group: 'org.projectlombok', name: 'lombok', version: '1.16.20'
}
task copyConfig(type: Copy, description: "Copy CAS configuration over to /etc/cas/config") {
doLast {
from "${project.rootDir}/etc/cas/config"
into '/etc/cas/config'
println "Copied configuration files into /etc/cas/config"
}
}
war {
dependsOn copyConfig
baseName 'cas'
includeWarJars = true
entryCompression = ZipEntryCompression.STORED
}
task explodeWar(type: Copy, group: "build", description: "Explodes the cas.war") {
doLast {
from zipTree(project.war.outputs.files.singleFile)
into "${buildDir}/cas"
println "CAS web application artifact exploded into [cas/build/cas]"
}
}
task run(group: "build", description: "Run the CAS web application in embedded container mode") {
dependsOn build
doLast {
def casRunArgs = Arrays.asList(project.'cas.run.jvmArgs'.split(" "))
javaexec {
main = "-jar";
jvmArgs = casRunArgs
args = ["build/libs/cas.war"]
logger.info "Started ${commandLine}"
}
}
}
task debug(group: "build", description: "Debug the CAS web application in embedded mode on port 5005") {
dependsOn build
doLast {
def casDebugArgs = Arrays.asList(project.'cas.debug.jvmArgs'.split(" "))
javaexec {
main = "-jar";
jvmArgs = casDebugArgs
args = ["build/libs/cas.war"]
logger.info "Started ${commandLine}"
}
}
}