Closed stanleyw2014 closed 6 years ago
What you appear to be trying to do will require a bindings file. I created a Short, Self Contained, Correct (Compilable), Example or Minimal, Complete, and Verifiable example project for another issue that should give you a better understanding of how to use this feature.
The project can be found here.
Thanks, William, it works!
Hi, I want to generate different package name for different XSD file(a.xsd->package com.example.a, b.xsd->package com.example.b), I tried to use xsdIncludes, and defined two xjc tasks, but I didn't got what I wanted, below is my xjc tasks: jaxb { xsdDir = "${project.projectDir}/src/main/resources" xsdIncludes.add("a.xsd") xjc { destinationDir = "${project.projectDir}/src/main/java" generateEpisodeFiles = false taskClassname = "org.jvnet.jaxb2_commons.xjc.XJC2Task" generatePackage = "com.example.a"
}
jaxb { xsdDir = "${project.projectDir}/src/main/resources" xsdIncludes.add("b.xsd") xjc { destinationDir = "${project.projectDir}/src/main/java" generateEpisodeFiles = false taskClassname = "org.jvnet.jaxb2_commons.xjc.XJC2Task" generatePackage = "com.example.b"
}