Quantcast
Channel: Apache Timeline
Viewing all articles
Browse latest Browse all 5648

CXF XJC Maven Plugin (xsdtojava) Maven plugin usage

$
0
0
I want to get Java classes from an XSD document. I want to use CXF XJC
Maven Plugin, but I'm experiencing some problems. I have followed the
documentation here: http://cxf.apache.org/cxf-xjc-plugin.html.

I have this POM (more or less):

...
<plugin>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-xjc-plugin</artifactId>
<version>2.6.1</version>
<executions>
<execution>
<id>generate-sources</id>
<phase>generate-sources</phase>
<goals>
<goal>xsdtojava</goal>
</goals>
<configuration>
<sourceRoot>${basedir}/target/generated/src/main/java</sourceRoot>
<xsdOptions>
<xsdOption>
<xsd>classpath:/path/to/xsd/document.xsd</xsd>
<packagename>org.company.package.whatever</packagename>
</xsdOption>
</xsdOptions>
</configuration>
</execution>
</executions>
</plugin>
...

When I execute the goal I'm getting:

Failed to execute goal org.apache.cxf:cxf-xjc-plugin:2.6.1:xsdtojava
(generate-sources) on project org.company.myproject: null:
MojoExecutionException: NullPointerException -> [Help 1]

Am I Missing any parameter in the configuration?

Viewing all articles
Browse latest Browse all 5648

Trending Articles