で使用するjxb:class
とannox:annotate
、次の例外が発生します。
com.sun.istack.SAXParseException2; systemId: file:/usr/workspace/project/package/file.xjb; lineNumber: 16; columnNumber: 35; the compiler failed to honor this customization annox: annotate. He was attached to an incorrect location or is inconsistent with other binds.
at com.sun.tools.xjc.ErrorReceiver.error(ErrorReceiver.java:86)
at com.sun.tools.xjc.model.Model.generateCode(Model.java:310)
at com.sun.tools.xjc.Driver.run(Driver.java:363)
at org.codehaus.mojo.jaxb2.AbstractXjcMojo.execute(AbstractXjcMojo.java:316)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:133)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:108)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:76)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:116)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:361)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:213)
私はこの構成を使用しました:
<jxb:bindings node="xs:complexType[@name='MyType']//xs:element[@name='property']">
<jxb:class ref="org.project.model.MyType" />
</jxb:bindings>