jaxb2-maven-plugin
jaxb2-maven-plugin copied to clipboard
-dtd option
When I try to parse a dtd (using sourceType dtd), I get the following error
org.xml.sax.SAXParseException: Are you trying to compile DTD? Support for DTD is experimental. You may enable it by using the -dtd option.
How do I pass the -dtd option to xjc via this plugin?
I think this is a bug in the xjc implementation. When I use version 4.0.3 of xjc, this error no longer occurs.
You can override the version used by the plugin with a dependencies element:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jaxb2-maven-plugin</artifactId>
<executions>
</executions>
<dependencies>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-xjc</artifactId>
<version>4.0.3</version>
</dependency>
</dependencies>
</plugin>