users@jaxb.java.net

Re: error with jaxb maven2 plugin and DTD

From: Kohsuke Kawaguchi <Kohsuke.Kawaguchi_at_Sun.COM>
Date: Mon, 30 Jul 2007 14:02:44 -0700

Monika wrote:
> Hello,
>
> I am trying to use the maven2 jaxb plugin at
> https://jaxb.dev.java.net/jaxb-maven2-plugin/ to
> generate java from a dtd.
>
> This is the configuration in my pom:
>
> <plugin>
>
> <groupId>com.sun.tools.xjc.maven2</groupId>
>
> <artifactId>maven-jaxb-plugin</artifactId>
> <version>1.0</version>
> <executions>
> <execution>
> <goals>
> <goal>generate</goal>
> </goals>
> </execution>
> </executions>
> <configuration>
> <args>-dtd</args>
> <includeSchemas>
>
> <includeSchema>**/*.dtd</includeSchema>
> </includeSchemas>
> <excludeSchemas>
>
> <excludeSchema>**/*.xsd</excludeSchema>
> </excludeSchemas>
> <includeBindings>
>
> <includeBinding>*.xjb</includeBinding>
> </includeBindings>
> </configuration>
> </plugin>
>
> And this is the error I am getting:
>
> includeSchemas: 1 : **/*.dtd
> [INFO] Compiling file:/src/main/resources/foo.dtd
> [WARNING] [WARNING] Are you trying to compile DTD?
> Support for DTD is experimental. You may enable it by
> using the -dtd option.
> [WARNING] unknown location
> [WARNING]
> [ERROR] [ERROR] The markup in the document preceding
> the root element must be well-formed.
> [ERROR] line 4 of file:/src/main/resources/foo.dtd
>
>
> Can anybody suggest what I'm doing wrong? Thanks.

Hmm. I don't know. Any chance you can send me a test case?

-- 
Kohsuke Kawaguchi
Sun Microsystems                   kohsuke.kawaguchi_at_sun.com