-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
83 lines (63 loc) · 1.75 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
apply plugin: 'java'
version = '1.0.1'
sourceCompatibility = 1.7
targetCompatibility = 1.7
repositories {
jcenter()
}
dependencies {
compile ('edu.internet2.middleware.grouper:grouper:2.3.0') {
transitive = false
}
compile ('edu.internet2.middleware.grouper:grouper-ui:2.3.0') {
transitive = false
}
compile 'edu.internet2.middleware.grouper:subject:2.3.0'
compile 'org.slf4j:slf4j-api:1.6.2'
compile 'org.hibernate:hibernate-core:5.0.4.Final'
compile 'javax.servlet:javax.servlet-api:3.0.1'
compile 'commons-validator:commons-validator:1.1.3'
}
task copyDocker(type: Copy) {
from 'src/test/docker-compose/'
into 'build/docker-compose/'
}
task copyJspToDocker(type: Copy) {
dependsOn copyDocker
from 'src/main/webapp/'
into 'build/docker-compose/grouper/webapp'
}
task addLib(type: Copy) {
dependsOn jar
from 'build/libs/'
into 'build/docker-compose/grouper/lib/'
}
task buildGrouper(type:Exec) {
dependsOn copyDocker, copyJspToDocker, addLib
doFirst {
logger.lifecycle("Building the initial images may take a long time. Have plenty of bandwidth.")
}
workingDir 'build/docker-compose'
commandLine 'docker-compose', 'build'
}
task runGrouper(type:Exec) {
dependsOn buildGrouper
workingDir 'build/docker-compose'
commandLine 'docker-compose', 'up', '-d'
}
task stopGrouper(type:Exec) {
workingDir 'build/docker-compose'
commandLine 'docker-compose', 'kill'
}
task removeGrouper(type:Exec) {
dependsOn stopGrouper
workingDir 'build/docker-compose'
commandLine 'docker-compose', 'rm', '-f'
}
task logs(type:Exec) {
workingDir 'build/docker-compose'
commandLine 'docker-compose', 'logs'
}
clean {
dependsOn removeGrouper
}