mojohaus / jaxb2-maven-plugin

JAXB2 Maven Plugin
https://www.mojohaus.org/jaxb2-maven-plugin/
Apache License 2.0
105 stars 76 forks source link

Trying to use value-constructor plugin #170

Open lamikam100 opened 3 years ago

lamikam100 commented 3 years ago

Hi I am trying to use the jaxb2-value-constructor plugin inside jaxb2-maven-plugin for xjc goal, but cannot get the constructors created. Here is example of my configuration pom.xml Any suggestions are appreciated!


 <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>jaxb2-maven-plugin</artifactId>
                <version>2.5.0</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>
                             <args>
        <arg>-B-Xvalue-constructor</arg>
    </args>
                            <xjcArgs>
                                <xjcArg>-Xannotate</xjcArg>
                                <xjcArg>-B-Xvalue-constructor</xjcArg>
                            </xjcArgs>
                            <!-- read the top-level schema docs from the web project. -->
                            <sources>
                                <source>../src/wsdl/HSNLevel1Message.xsd</source>
                            </sources>
                            <outputDirectory>${project.basedir}/src/main/java</outputDirectory>
                            <!-- the episode file is then used in the web project to import the jaxb bindings -->
                            <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>
Rafal1 commented 3 years ago

the same issue...