diff --git a/spring-oxm/oxm.gradle b/spring-oxm/oxm.gradle index 6ec966b16c66458f1c59232e09b99c24757bce2b..b467c49f90ea3a078c8d7e201bd139725433d374 100644 --- a/spring-oxm/oxm.gradle +++ b/spring-oxm/oxm.gradle @@ -112,20 +112,23 @@ task genXmlbeans { // add jibx binding to the normal test compilation process // INCOMPATIBLE WITH OPENJDK 8 b89+ -// 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: true, load: true, binding: bindingXml) { -// classpathset(dir: sourceSets.test.output.classesDir) { -// include(name: "**/jibx/**/*") -// } -// } -// } -// } -// } +def jibxEnabled = project.properties.get("testGroups")?.toLowerCase()?.split(",")?.contains("custom_compilation") +if(jibxEnabled) { + 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: true, load: true, binding: bindingXml) { + classpathset(dir: sourceSets.test.output.classesDir) { + include(name: "**/jibx/**/*") + } + } + } + } + } +} \ No newline at end of file