forked from spring-projects/spring-framework
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathspring-oxm.gradle
65 lines (57 loc) · 1.7 KB
/
spring-oxm.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
plugins {
id "org.unbroken-dome.xjc"
}
description = "Spring Object/XML Marshalling"
configurations {
jibx
}
dependencies {
jibx "org.jibx:jibx-bind:1.3.3"
jibx "org.apache.bcel:bcel:6.0"
}
xjc {
xjcVersion = '2.2'
}
sourceSets {
test {
xjcTargetPackage = 'org.springframework.oxm.jaxb.test'
}
}
dependencies {
api(project(":spring-beans"))
api(project(":spring-core"))
optional("javax.xml.bind:jaxb-api")
optional("javax.activation:javax.activation-api")
optional("com.thoughtworks.xstream:xstream")
optional("org.jibx:jibx-run")
testImplementation(project(":spring-context"))
testImplementation(testFixtures(project(":spring-core")))
testImplementation("org.ogce:xpp3")
testImplementation("org.codehaus.jettison:jettison") {
exclude group: "stax", module: "stax-api"
}
//testImplementation(files(genJaxb.classesDir).builtBy(genJaxb))
testImplementation("org.xmlunit:xmlunit-assertj")
testImplementation("org.xmlunit:xmlunit-matchers")
testRuntimeOnly("com.sun.xml.bind:jaxb-core")
testRuntimeOnly("com.sun.xml.bind:jaxb-impl")
}
// JiBX compiler is currently not compatible with JDK 9+.
// If testToolchain has been set, we assume the custom JDK version is 9+.
if ((JavaVersion.current() == JavaVersion.VERSION_1_8) && !project.hasProperty("testToolchain")) {
compileTestJava {
def bindingXml = "${projectDir}/src/test/resources/org/springframework/oxm/jibx/binding.xml"
doLast() {
project.ant {
taskdef(name: "jibx",
classname: "org.jibx.binding.ant.CompileTask",
classpath: configurations.jibx.asPath)
jibx(verbose: false, load: true, binding: bindingXml) {
classpathset(dir: sourceSets.test.java.outputDir) {
include(name: "**/jibx/**/*")
}
}
}
}
}
}