|
|
|
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 {
|
|
|
|
compile(project(":spring-beans"))
|
|
|
|
compile(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")
|
|
|
|
testCompile(project(":spring-context"))
|
|
|
|
testCompile(testFixtures(project(":spring-core")))
|
|
|
|
testCompile("org.ogce:xpp3")
|
|
|
|
testCompile("org.codehaus.jettison:jettison") {
|
|
|
|
exclude group: "stax", module: "stax-api"
|
|
|
|
}
|
|
|
|
//testCompile(files(genJaxb.classesDir).builtBy(genJaxb))
|
|
|
|
testCompile("org.xmlunit:xmlunit-assertj")
|
|
|
|
testCompile("org.xmlunit:xmlunit-matchers")
|
|
|
|
testRuntime("com.sun.xml.bind:jaxb-core")
|
|
|
|
testRuntime("com.sun.xml.bind:jaxb-impl")
|
|
|
|
}
|
|
|
|
|
|
|
|
// JiBX compiler is currently not compatible with JDK 9+.
|
|
|
|
// If customJavaHome 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/**/*")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|