This repository has been archived by the owner on Aug 13, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
XMLCatalogueMojo
Andreas Schmitz edited this page Jan 7, 2013
·
1 revision
This mojo is used within deegree to avoid the need for jaxb to fetch schema files from the internet all the time when 'compiling' schemas. It
generates a file called deegree.xmlcatalog
in the target
directory with a list of all schemas located within META-INF/schemas
. The deegree
parent pom.xml
already configures the jaxb plugin to use that catalogue, and the deegree plugin to generate it within the generate-sources
phase (default phase is generate-resources
, unsure if this is not sufficient).
In order to use it in your own modules either use the parent, or configure it like this (you'll probably need to fine-tune the jaxb plugin to work for you):
<plugin>
<groupId>org.deegree</groupId>
<artifactId>deegree-maven-plugin</artifactId>
<executions>
<execution>
<id>buildinfo</id>
<goals>
<goal>generate-buildinfo</goal>
</goals>
</execution>
<execution>
<id>jaxbcatalog</id>
<phase>generate-sources</phase>
<goals>
<goal>generate-jaxb-catalog</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.jvnet.jaxb2.maven2</groupId>
<artifactId>maven-jaxb2-plugin</artifactId>
<version>0.8.0</version>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<schemaIncludes>
<include>**/*xsd</include>
</schemaIncludes>
<schemaDirectory>src/main/resources/META-INF/schemas/</schemaDirectory>
<episode>true</episode>
<catalog>target/deegree.xmlcatalog</catalog>
<catalogResolver>org.jvnet.jaxb2.maven2.resolver.tools.ClasspathCatalogResolver</catalogResolver>
</configuration>
</execution>
</executions>
</plugin>