Running custom JAXB2 plugins using Maven JAXB 2.x Plugin

Posted by nadouani on Stack Overflow See other posts from Stack Overflow or by nadouani
Published on 2011-10-10T13:51:06Z Indexed on 2012/09/02 9:38 UTC
Read the original article Hit count: 451

Filed under:
|
|

I would like to generate JAXB Java classes using the Maven JAXB 2.x plugin http://static.highsource.org/mjiip/maven-jaxb2-plugin/generate-mojo.html

To declare the custom JAXB plugins I would execute during the generate process, I used the "args" element like below:

<plugin>
    <groupId>org.jvnet.jaxb2.maven2</groupId>
    <artifactId>maven-jaxb2-plugin</artifactId>
    <version>0.7.4</version>
    <executions>
        <execution>
            <goals>
                <goal>generate</goal>
            </goals>
        </execution>
    </executions>

    <configuration>
        <extension>true</extension>
        <args>
            <arg>-Xinheritance</arg>
            <arg>-XtoString</arg>
        </args>
        ...
    </configuration>
    ...
</plugin>

The issue is that the maven generate process is failing with the following error:

Failed to execute goal org.jvnet.jaxb2.maven2:maven-jaxb2-plugin:0.7.4:generate (default) on project was: Error parsing the command line [[Ljava.lang.String;@1ad4a1ae]

Any idea on how to specify the args values?

Thanks

© Stack Overflow or respective owner

Related posts about java

Related posts about jaxb2