[ https://issues.apache.org/jira/browse/CXF-7620?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16347723#comment-16347723 ]
Martin Gainty commented on CXF-7620: ------------------------------------ i found 2 workarounds to create java from xsd the first is maven-jaxb2-plugin: <plugin> <groupId>org.jvnet.jaxb2.maven2</groupId> <artifactId>maven-jaxb2-plugin</artifactId> <version>0.12.3</version> <!-- version>0.8.2</version --> <executions> <execution> <id>generate</id> <phase>generate-sources</phase> <goals> <goal>generate</goal> </goals> <configuration> <bindingDirectory>${basedir}</bindingDirectory> <bindingIncludes> <bindingInclude>bindings.xjb</bindingInclude> </bindingIncludes> <generateDirectory>${basedir}/generated/src/main/java/</generateDirectory> <schemas> <schema> <fileset> <directory>${basedir}</directory> <includes> <include>po.xsd</include> </includes> </fileset> </schema> </schemas> <strict>true</strict> <extension>true</extension> <verbose>true</verbose> <forceRegenerate>true</forceRegenerate> </configuration> </execution> </executions> <dependencies> <dependency> <groupId>org.glassfish.jaxb</groupId> <artifactId>jaxb-runtime</artifactId> <!-- version>${jaxb22.version}</version --> <!-- version>2.2.10</version This is the 2015 version that works API version [2.2] --> <version>2.2.11</version> <!-- API version [2.2] --> </dependency> <dependency> <groupId>org.glassfish.jaxb</groupId> <artifactId>jaxb-xjc</artifactId> <!-- version>${jaxb22.version}</version --> <!-- version>2.2.11</version This is the experimental version --> <version>2.2.10</version> <!-- this is the 2015 version that works [INFO] Detected JAXB API version [2.2] --> </dependency> </dependencies> </plugin> the other workaround is Ant taskdef name="xjc" classname="com.sun.tools.xjc.XJCTask : <mkdir dir="generatedsrc/main/java" /> <xjc schema="po.xsd" destdir="generated/src/main/java" package="org.acme.foo"> <classpath refid="classpath" /> <produces dir="generated/src/main/java/org/acme/foo" includes="**/*"/> </xjc> *if anybody can supply URL containing latest version* I will test Thanks Andrei Martin > 3.0.11 cxf-xjc-plugin generate goal wont generate .java files > ------------------------------------------------------------- > > Key: CXF-7620 > URL: https://issues.apache.org/jira/browse/CXF-7620 > Project: CXF > Issue Type: Bug > Components: JAXB Databinding > Affects Versions: 3.0.11 > Environment: Maven home: C:\maven\maven333 > Java version: 1.8.0_40, vendor: Oracle Corporation > Java home: C:\Java\jdk1.8\jre > Reporter: Martin Gainty > Priority: Major > > <plugin> > <groupId>org.apache.cxf</groupId> > <artifactId>cxf-xjc-plugin</artifactId> > <executions> > <execution> > <id>xsd-generate-java</id> > <phase>generate-sources</phase> > <goals> > <goal>xsdtojava</goal> > </goals> > </execution> > </executions> > <configuration> > <args> > <arg>-XautoNameResolution</arg> > </args> > <extensions> > <extension>org.jvnet.jaxb2_commons:jaxb2-basics:0.6.4</extension> > </extensions> > <xsdOptions> > <xsdOption> > <xsd>${basedir}/po.xsd</xsd> > <bindingFile>${basedir}/bindings.xjb</bindingFile> > <extensionArgs> > <extensionArgs>-XtoString</extensionArgs> > <extensionArgs>-XhashCode</extensionArgs> > <extensionArgs>-Xequals</extensionArgs> > > <extensionArgs>-Xequals-equalsStrategyClass=org.apache.activemq.plugin.jaxb2_commons.ElementAwareEqualsStrategy</extensionArgs> > </extensionArgs> > </xsdOption> > </xsdOptions> > </configuration> > </plugin> -- This message was sent by Atlassian JIRA (v7.6.3#76005)