Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

-dtd option #214

Open
y2kenny opened this issue Jun 18, 2022 · 1 comment
Open

-dtd option #214

y2kenny opened this issue Jun 18, 2022 · 1 comment

Comments

@y2kenny
Copy link

y2kenny commented Jun 18, 2022

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?

@RayDeCampo
Copy link

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>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants