I am trying to create value constructors using xjc inside jaxb2-maven-plugin. Cant get it to create the constructors. Here is what I tried: <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>jaxb2-maven-plugin</artifactId> <version>2.2</version> <executions> <execution> <id>generate-schema-data</id> <phase>generate-sources</phase> <goals> <!-- use the xjc binding compiler to parse the schema, and generated the jaxb java code objects --> <goal>xjc</goal> </goals> <configuration> <verbose>true</verbose> <xjcArgs> <xjcArg>-Xannotate</xjcArg> <xjcArg>-Xvalue-constructor</xjcArg> </xjcArgs> <!-- read the top-level schema docs from the web project. --> <sources> <source>stuff</source> </sources> <outputDirectory>${project.basedir}/src/main/java</outputDirectory> <generateEpisode>true</generateEpisode> <extension>true</extension> <noGeneratedHeaderComments>true</noGeneratedHeaderComments> </configuration> </execution> </executions> <dependencies> <dependency> <groupId>org.jvnet.jaxb2_commons</groupId> <artifactId>jaxb2-value-constructor</artifactId> <version>3.0</version> </dependency> <dependency> <groupId>org.jvnet.jaxb2_commons</groupId> <artifactId>jaxb2-basics</artifactId> <version>0.6.2</version> </dependency> </dependencies> </plugin>
I am trying to create value constructors using xjc inside jaxb2-maven-plugin. Cant get it to create the constructors. Here is what I tried:
org.codehaus.mojo jaxb2-maven-plugin 2.2 generate-schema-data generate-sources xjc true -Xannotate -Xvalue-constructor