if you use the maven maven-jaxb2-plugin, then you can use collection-setter-
<plugin>
<groupId>org.jvnet.jaxb2.maven2</groupId>
<artifactId>maven-jaxb2-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
<phase>generate-sources</phase>
</execution>
</executions>
<configuration>
<!-- This helps generate setter methods-->
<args>
<arg>-npa</arg>
<arg>-Xcollection-setter-injector</arg>
</args>
<extension>true</extension>
<episode>true</episode>
<plugins>
<!-- plugin to generate setter for collection-->
<plugin>
<groupId>net.java.dev.vcc.thirdparty</groupId>
<artifactId>collection-setter-injector</artifactId>
<version>0.5.0-1</version>
</plugin>
</plugins>
</configuration>
</plugin>
0 comments:
Post a Comment