jaxbannox

jaxb annox plugin not working


I am getting the following error on the annox plugin for jaxb generation

[ERROR] file:/Users/dhiller/Space/ifp-core/framework/src/main/resources/schemas/common_2012_04.xsd[5,136]
org.xml.sax.SAXParseException: Unsupported binding namespace "http://annox.dev.java.net". Perhaps you meant "http://java.sun.com/xml/ns/jaxb/xjc"?

Here is the code I have. The versions must be screwed up somehow? Anyone have some working example with all the version numbers

            <plugin>
            <groupId>org.jvnet.jaxb2.maven2</groupId>
            <artifactId>maven-jaxb21-plugin</artifactId>
            <version>0.8.1</version>
            <executions>
                <execution>
                    <goals>
                        <goal>generate</goal>
                    </goals>
                </execution>
            </executions>
            <configuration>
                <args>
                    <arg>-XtoString</arg>
                    <arg>-Xequals</arg>
                    <arg>-XhashCode</arg>
                    <arg>-Xcopyable</arg>
                </args>
                <plugins>
                    <plugin>
                        <groupId>org.jvnet.jaxb2_commons</groupId>
                        <artifactId>jaxb2-basics</artifactId>
                        <version>0.6.3</version>
                    </plugin>
                </plugins>
            </configuration>
        </plugin>       
        <plugin>
           <groupId>org.codehaus.mojo</groupId>
           <artifactId>jaxb2-maven-plugin</artifactId>
           <version>1.3.1</version>
           <executions>
              <execution>
                 <goals>
                    <goal>xjc</goal>
                 </goals>
              </execution>
           </executions>
           <configuration>
              <clearOutputDir>false</clearOutputDir>
              <schemaDirectory>${basedir}/src/main/resources/schemas</schemaDirectory>
              <schemaFiles>externalaction_2012_03.xsd,common_2012_04.xsd,utilities_2012_03.xsd</schemaFiles>
              <outputDirectory>${project.build.directory}/generated-sources</outputDirectory>
              <bindingDirectory>${basedir}/src/main/xjb</bindingDirectory>
              <bindingFiles>bindings.xjb.xml</bindingFiles>
              <extension>true</extension>
           </configuration>
        </plugin>

Solution

  • why is this posting as a comment. Trying to post the answer which I posted here

    JAXB External Custom Binding XJC Issue - Parsing results in empty node