I am creating Java classes from XSD file using JAXB plugin. My POM file looks like
<groupId>org.jvnet.jaxb2.maven2</groupId>
<artifactId>maven-jaxb2-plugin</artifactId>
<version>0.8.1</version>
<executions>
<execution>
<configuration>
<debug>false</debug>
<verbose>true</verbose>
<schemaDirectory>src/main/resources/xsd</schemaDirectory>
<schemaIncludes>
<include>*.xsd</include>
<include>*.XSD</include>
</schemaIncludes>
<generateDirectory>${project.build.directory}/generated-sources/main/java</generateDirectory>
<generatePackage>com.kaushik.export.bo</generatePackage>
</configuration>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
For one of the XML element I want the values to be wrapped by
I saw few solutions suggesting to use annotation @XmlJavaTypeAdapter
But in my case I have not written classes they are auto generated when project is build.
Is there any was to specify in xsd so that generated classes will have this tag OR get the ability to surround the value by CDATA ?