This repository has been archived by the owner on Jun 28, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
120 lines (96 loc) · 3.26 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
import org.apache.tools.ant.filters.ReplaceTokens
plugins {
id 'war'
// IntelliJ IDEA plugin here to allow integration tests to appear properly in IDEs.
id 'idea'
}
repositories {
mavenLocal()
jcenter()
maven {
url = 'http://www.cadc-ccda.hia-iha.nrc-cnrc.gc.ca/m2repo'
}
}
configurations.all {
resolutionStrategy {
force 'org.apache.commons:commons-configuration2:2.3'
}
}
dependencies {
compile 'org.springframework:spring-beans:4.3.16.RELEASE'
compile 'org.restlet.jee:org.restlet.ext.spring:2.3.+'
compile 'org.opencadc:cadc-gmui-server:[1.2.2, )'
runtime 'jstl:jstl:1.+'
testCompile 'junit:junit:4.+'
testCompile 'org.skyscreamer:jsonassert:1.+'
testCompile 'org.easymock:easymock:3.+'
testCompile 'org.apache.commons:commons-text:[1.3,)'
testCompile 'org.opencadc:cadc-web-test:[1.0.2, )'
testCompile 'org.seleniumhq.selenium:selenium-java:3.+'
}
sourceCompatibility = '1.7'
group = 'ca.nrc.cadc'
version = '1006'
ext {
intTest_user_name = 'CADCtest'
intTest_user_password = 'sywymUL4'
docker_image_name = 'mach378.cadc.dao.nrc.ca:5000/canfar-gmui'
// Change this value to test other locations, such as Production or RC.
intTest_default_web_app_url = 'http://rcapps.canfar.net'
intTest_default_web_app_endpoint = '/gmui'
}
war {
// Trying to fix static file caching on new build.
eachFile {
if (it.name.endsWith('.jsp')) {
filter(ReplaceTokens, tokens: [version: project.version])
}
}
archiveName = 'gmui##' + project.version + '.war'
}
sourceSets {
intTest
}
configurations {
intTestCompile
intTestCompile.extendsFrom(testCompile)
}
idea {
module {
//and some extra test source dirs
testSourceDirs += file('src/intTest/java')
scopes.TEST.plus += [ configurations.intTestCompile ]
}
}
['firefox', 'chrome'].each { driver ->
task "intTest${driver.capitalize()}"(type: Test) { driverTest ->
testClassesDir = sourceSets.intTest.output.classesDir
classpath = sourceSets.intTest.runtimeClasspath
reports {
html.destination = reporting.file("$name/html")
}
dependencies {
intTestCompile 'junit:junit:4.+'
intTestCompile 'ca.nrc.cadc:web-test:1.+'
intTestCompile 'org.seleniumhq.selenium:selenium-java:2.53.1'
// intTestCompile 'org.seleniumhq.selenium:selenium-java:3.+'
}
systemProperty "driver", "${driver}"
if (project.hasProperty('intTest_selenium_server_url')) {
systemProperty 'selenium.server.url', project.intTest_selenium_server_url
logger.info('Running browser tests on ' + project.intTest_selenium_server_url)
}
else {
systemProperty 'selenium.server.url', 'http://cadcint2.cadc.dao.nrc.ca:4444'
}
if (project.hasProperty('intTest_web_app_url')) {
systemProperty 'web.app.url', project.intTest_web_app_url
}
else {
systemProperty 'web.app.url', project.intTest_default_web_app_url
}
systemProperty 'user.name', project.intTest_user_name
systemProperty 'user.password', project.intTest_user_password
maxParallelForks = 1
}
}