2021-05-03 20:52:28 +08:00
|
|
|
plugins {
|
|
|
|
id "org.unbroken-dome.xjc"
|
|
|
|
}
|
|
|
|
|
2017-08-21 20:41:55 +08:00
|
|
|
description = "Spring Object/XML Marshalling"
|
|
|
|
|
2012-01-18 01:22:24 +08:00
|
|
|
configurations {
|
2012-12-07 04:56:24 +08:00
|
|
|
jibx
|
2012-01-18 01:22:24 +08:00
|
|
|
}
|
2017-01-17 21:00:15 +08:00
|
|
|
|
2012-01-18 01:22:24 +08:00
|
|
|
dependencies {
|
2020-02-06 01:21:03 +08:00
|
|
|
jibx "org.jibx:jibx-bind:1.3.3"
|
2016-07-25 20:10:46 +08:00
|
|
|
jibx "org.apache.bcel:bcel:6.0"
|
2012-01-18 01:22:24 +08:00
|
|
|
}
|
|
|
|
|
2021-05-03 20:52:28 +08:00
|
|
|
xjc {
|
|
|
|
xjcVersion = '2.2'
|
|
|
|
}
|
|
|
|
sourceSets {
|
|
|
|
test {
|
|
|
|
xjcTargetPackage = 'org.springframework.oxm.jaxb.test'
|
2012-12-07 04:56:24 +08:00
|
|
|
}
|
2012-01-18 01:22:24 +08:00
|
|
|
}
|
|
|
|
|
2017-08-21 20:41:55 +08:00
|
|
|
dependencies {
|
|
|
|
compile(project(":spring-beans"))
|
|
|
|
compile(project(":spring-core"))
|
2019-08-27 03:13:12 +08:00
|
|
|
optional("javax.xml.bind:jaxb-api")
|
|
|
|
optional("javax.activation:javax.activation-api")
|
|
|
|
optional("com.thoughtworks.xstream:xstream")
|
|
|
|
optional("org.jibx:jibx-run")
|
2017-08-21 20:41:55 +08:00
|
|
|
testCompile(project(":spring-context"))
|
2019-12-28 18:44:40 +08:00
|
|
|
testCompile(testFixtures(project(":spring-core")))
|
2019-08-27 03:13:12 +08:00
|
|
|
testCompile("org.ogce:xpp3")
|
|
|
|
testCompile("org.codehaus.jettison:jettison") {
|
2018-08-16 21:32:44 +08:00
|
|
|
exclude group: "stax", module: "stax-api"
|
2017-08-21 20:41:55 +08:00
|
|
|
}
|
2021-05-03 20:52:28 +08:00
|
|
|
//testCompile(files(genJaxb.classesDir).builtBy(genJaxb))
|
2019-08-27 03:13:12 +08:00
|
|
|
testCompile("org.xmlunit:xmlunit-assertj")
|
|
|
|
testCompile("org.xmlunit:xmlunit-matchers")
|
|
|
|
testRuntime("com.sun.xml.bind:jaxb-core")
|
|
|
|
testRuntime("com.sun.xml.bind:jaxb-impl")
|
2017-08-21 20:42:12 +08:00
|
|
|
}
|
|
|
|
|
2020-02-05 22:11:59 +08:00
|
|
|
// JiBX compiler is currently not compatible with JDK 9+.
|
|
|
|
// If customJavaHome has been set, we assume the custom JDK version is 9+.
|
2021-05-03 20:52:28 +08:00
|
|
|
if ((JavaVersion.current() == JavaVersion.VERSION_1_8) && !project.hasProperty("testToolchain")) {
|
2017-08-21 20:42:12 +08:00
|
|
|
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)
|
|
|
|
|
2019-03-31 19:26:38 +08:00
|
|
|
jibx(verbose: false, load: true, binding: bindingXml) {
|
2017-08-21 20:42:12 +08:00
|
|
|
classpathset(dir: sourceSets.test.java.outputDir) {
|
|
|
|
include(name: "**/jibx/**/*")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2017-09-23 17:28:19 +08:00
|
|
|
}
|