forked from etf-validator/etf-bsxtd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
193 lines (162 loc) · 5.98 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
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
///////////////////////////////////////////////////////////////////////////////////////
//
// ETF-BsxTD
//
///////////////////////////////////////////////////////////////////////////////////////
buildscript {
repositories {
maven {
url "https://services.interactive-instruments.de/etfdev-af/plugins-releases-local"
credentials {
// Our repository requires authenticating
username 'ii-bda'
password 'AP7mb4WA6F1ckdZkaE8Qx8GSowt'
}}
}
dependencies {
classpath group: 'de.interactive_instruments.bda', name: 'etf-bda', version: '[1.0.29,1.0.99]'
}
dependencies {
ant.unjar src: configurations.classpath.files.find {it.path.contains('etf')}, dest: 'build/gradle'
}
}
apply from: 'build/gradle/ii-bda.gradle'
///////////////////////////////////////////////////////////////////////////////////////
group = 'de.interactive_instruments.etf.testdriver'
description = "ETF BaseX test driver"
ext.testDeploymentDir = project.file('./build/tmp/td')
ext.deploymentDir = project.hasProperty('etf.td.deployment.dir') ?
project.getProperty('etf.td.deployment.dir') :
testDeploymentDir
ext.testDataStorageDir = project.hasProperty('etf.ds.dir') ?
project.getProperty('etf.ds.dir') :
project.file('./build/tmp/etf-ds').absolutePath
repositories {
maven {
url "http://files.basex.org/maven"
}
maven {
url "https://services.interactive-instruments.de/etfdev-af/ext-deegree-cache"
credentials {
username gradle.rootProject.ext.r_user
password gradle.rootProject.ext.r_pwd
}
}
}
ext.basexVersion = '8.6.7'
ext.deegreeVersion = '3.3.20'
ext.gmlGeoXVersion = '1.2.2'
configurations {
api
bsxPlugins
integrationTest
}
dependencies {
compileOnly group: 'de.interactive_instruments', name: 'ii-commons-util', version:'3.0.0'+project.snapshotSuffix
compileOnly group: 'de.interactive_instruments.etf', name: 'etf-core', version:'1.1.0'+project.snapshotSuffix
compileOnly group: 'de.interactive_instruments.etf', name: 'etf-spi', version:'1.0.1'+project.snapshotSuffix
api group: 'org.basex', name: 'basex', version: basexVersion
bsxPlugins group: 'de.interactive_instruments.etf.bsxm', name: 'etf-gmlgeox', version: "$gmlGeoXVersion"+project.snapshotSuffix
compile group: 'commons-logging', name: 'commons-logging', version:'1.1.1'
compile group: 'commons-io', name: 'commons-io', version: etf_commonsIoVersion
compileOnly group: 'net.sf.saxon', name: 'Saxon-HE', version: etf_saxonHe
compileOnly group: 'org.slf4j', name: 'slf4j-api', version: etf_slf4jApiVersion
// Degree core for geometry validation
compile("org.deegree:deegree-core-base:$deegreeVersion") {
exclude group: 'org.slf4j'
exclude group: 'xerces'
exclude group: 'xml-apis'
exclude group: 'com.h2database'
exclude group: 'org.postgis'
exclude group: 'postgresql'
exclude group: 'commons-logging'
}
// Required by BaseX extensions, must be placed in the lib folder or
// the extension class loader will not initialize 3rd party libraries correctly
compileOnly group: 'xerces', name: 'xercesImpl', version: etf_xercesVersion
compileOnly group: 'xml-apis', name: 'xml-apis', version: etf_xmlApisVersion
compileOnly('dom4j:dom4j:1.6.1') {
exclude group: 'xml-apis'
}
integrationTest group: 'ch.qos.logback', name: 'logback-classic', version: etf_logbackVersion
integrationTest group: 'junit', name: 'junit', version: etf_junitTestVersion
integrationTest group: 'de.interactive_instruments.etf', name: 'etf-bsxds', version: '2.0.1' + project.snapshotSuffix
integrationTest group: 'de.interactive_instruments.etf', name: 'etf-spi', version: '1.0.1' + project.snapshotSuffix
integrationTest group: 'de.interactive_instruments.etf', name: 'etf-stdtot', version: '1.0.1' + project.snapshotSuffix
integrationTest group: 'de.interactive_instruments.etf.test', name: 'etf-unittest', version: '1.1.1' + project.snapshotSuffix
}
configurations {
compile.exclude group:'xalan'
runtime.exclude group: "org.slf4j", module: "slf4j-nop"
compile.extendsFrom api
testCompile.extendsFrom integrationTest
}
def allLibs = configurations.runtime + configurations.compile -
configurations.compile.filter { it.name.startsWith('etf-core') } -
configurations.compile.filter { it.name.startsWith('etf-spi') } -
configurations.compile.filter { it.name.startsWith('ii-commons-util') } -
configurations.compile.filter { it.name.startsWith('slf4j-api') } -
configurations.compile.filter { it.name.startsWith('log4j') && !it.name.startsWith('log4j-over-slf4j') } -
configurations.compile.filter { it.name.startsWith('jetty') } -
configurations.compile.filter { it.name.startsWith('xml-apis') } -
configurations.compile.filter { it.name.startsWith('commons-lang3') } -
configurations.compile.filter { it.name.startsWith('xercesImpl') }
jar.doFirst {
manifest {
attributes(
'Test-Engine-Title': 'BaseX',
'Test-Engine-Vendor': 'BaseX GmbH',
'Test-Engine-Version': basexVersion
)
}
}
jar {
into('lib') {
from allLibs
}
}
jar {
into('plugins') {
from configurations.bsxPlugins.copy().setTransitive(false)
rename { String fileName ->
fileName.replaceAll('-(\\d+)\\.(\\d+)\\.(\\d+)(-SNAPSHOT)?', "")
}
}
}
task deployTestDriver(dependsOn: jar) {
doLast {
copy {
from jar
into "$deploymentDir"
}
println "Copied test driver to $deploymentDir"
}
}
install {
dependsOn = ["deployTestDriver"]
}
// INTEGRATION TESTS
///////////////////////////////////////////////////////////////////////////////////////
task deployTestDriverForIntegrationTesting(dependsOn: jar) {
group 'verification'
doLast {
copy {
from jar
into "$testDeploymentDir"
}
println "Copied test driver to $testDeploymentDir"
}
}
// Drop classloader for integration tests
sourceSets {
test {
java {
compileClasspath += main.output
runtimeClasspath = configurations.api + test.output + configurations.integrationTest
}
}
}
test {
dependsOn = ["testClasses", "compileTestJava", "deployTestDriverForIntegrationTesting"]
}
///////////////////////////////////////////////////////////////////////////////////////