[ 
http://jira.codehaus.org/browse/MJAXB-14?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=194166#action_194166
 ] 

Robert Scholte edited comment on MJAXB-14 at 10/9/09 6:33 AM:
--------------------------------------------------------------

According to the jaxb references dtd support is still experimental. But with a 
small configuration-block it's possible to get these files based on a dtd.
To make use of it, we have to change some default-settings.
* schemaFiles (by default it will search for xsd files in the schemaDirectory)
* dtd (default false)
* xmlschema (default true)

There's a big chance this will become easier in a future release, but for now 
it'll do. 

{code:xml}
<plugin>
  <groupId>org.codehaus.mojo</groupId>
  <artifactId>jaxb2-maven-plugin</artifactId>
  <version>@pom.version@</version>
  <executions>
    <execution>
      <goals>
        <goal>xjc</goal>
      </goals>
    </execution>
  </executions>
  <configuration>
    <packageName>com.example.myschema</packageName> <!-- The name of your 
generated source package -->
    <schemaDirectory>src/main/dtd</schemaDirectory>
    <schemaFiles>library.dtd</schemaFiles>
    <dtd>true</dtd>
    <xmlschema>false</xmlschema>
  </configuration>
</plugin>
{code}

      was (Author: rfscholte):
    According to the jaxb references dtd support is still experimental. But 
with a small configuration-block it's possible to get these files based on a 
dtd.
To make use of it, we have to change some default-settings.
* schemaFiles (by default it will search for xsd files in the schemaDirectory)
* dtd (default false)
* xmlschema (default true)

There's a big chance this will become easier in a future release, but for now 
it'll do. 

{code:xml}
<plugin>
  <groupId>org.codehaus.mojo</groupId>
  <artifactId>jaxb2-maven-plugin</artifactId>
  <version>@pom.version@</version>
  <executions>
    <execution>
      <goals>
        <goal>xjc</goal>
      </goals>
    </execution>
  </executions>
  <configuration>
    <packageName>com.example.myschema</packageName> <!-- The name of your 
generated source package -->
    <schemaDirectory>src/main/dtd</schemaDirectory>
    <schemaFiles>library.dtd</schemaFiles>
    <dtd>true</dtd>
    <xmlschema>false</xmlschema>
  </configuration>
</plugin>
{code:xml}
  
> Support generation from DTDs
> ----------------------------
>
>                 Key: MJAXB-14
>                 URL: http://jira.codehaus.org/browse/MJAXB-14
>             Project: Maven 2.x JAXB 2.0 Plugin
>          Issue Type: Improvement
>    Affects Versions: 1.2
>         Environment: N/A
>            Reporter: David J. M. Karlsen
>            Assignee: Robert Scholte
>             Fix For: 1.3
>
>
> Support generation from DTDs - this is currently unsupported.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to