Closed sreekanthp closed 6 years ago
@sreekanthp Did you get this working? Is there a project you can point me at?
u can create a binding file like this
<jaxb:bindings version="1.0"
xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc">
<jaxb:globalBindings generateValueClass="false">
<xjc:superInterface name="com.test.common.jaxb.InputElement" />
<xjc:serializable uid="3099325368888314454" />
<xjc:simple />
</jaxb:globalBindings>
</jaxb:bindings>
and refer this in in to the plugin.
ant.xjc(destdir: project.ext.generatedSrcDir,extension:true){
schema(dir: 'src/main/resources/com/mmi', includes: "**/*.xsd")
binding(dir: "src/main/resources", includes: '*.bnd')
arg(value: '-npa')
}
@sreekanthp
I created a Short, Self Contained, Correct (Compilable), Example or Minimal, Complete, and Verifiable example here:
And I think the line you may be missing in your build is here:
Due to inactivity, this issue is being closed.
I am using a super interface
com.test.xsd.Element
. Using xjb I am configuring the interface. This interface is in my current project src/main/java location. Jaxb classes generating successfully and Implementing the interface. but compilation fails with "com.test.xsd" package does not exist. import com.test.xsd.Element.Element; how we can add this interface to the class path.