schemas
Used in:
components
- OverviewOverview
- VersionsVersions
- DependentsDependents
- DependenciesDependencies
<dependency> <groupId>uk.org.retep.xmpp.xmpp</groupId> <artifactId>schemas</artifactId> <version>9.11</version> </dependency>
<?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <parent> <groupId>uk.org.retep.xmpp.xmpp</groupId> <artifactId>xmpp</artifactId> <version>9.11</version> </parent> <modelVersion>4.0.0</modelVersion> <groupId>uk.org.retep.xmpp.xmpp</groupId> <artifactId>schemas</artifactId> <version>9.11</version> <packaging>jar</packaging> <name>retepXMPP XMPP Schemas</name> <description> This generates a schema artifact which contains all of the schemas from xmpp.org's subversion repository. Generating this artifact enables a schema to be referenced by jaxb using the ClassPathCatalogResolver and a catalog file. To refresh the content of this artifact, either remove the src/main/resources directory manually or run a clean build from hudson. This is because maven-scm-plugin is set to checkout only if that directory does not exist so that the remote subversion repository is not hit every time a build is performed. </description> <properties> <!-- The url of the remote repository --> <remoteRepositoryUrl>scm:svn:svn://svn.xmpp.org:7938/xmpp/trunk/schemas</remoteRepositoryUrl> <!-- Where the sources are checked out to --> <schemaDirectory>${basedir}/src/main/xmpp</schemaDirectory> <!-- Where the bindings are located --> <bindingsDirectory>${basedir}/src/main/bindings</bindingsDirectory> <patchDirectory>${basedir}/src/main/patches</patchDirectory> <!-- package prefix within the artifact --> <schemaPackage>org/xmpp/schemas</schemaPackage> <!-- The catalog to generate --> <catalogFile>${project.build.directory}/${project.artifactId}-${project.version}.cat</catalogFile> </properties> <build> <plugins> <!-- Checkout the schemas from XMPP.org into src/main/xmpp_schema so we don't run this every time we do a clean build now this should work except their schemas are broken so until we can get them fixed this is commented out and we have a copy in the source --> <plugin> <artifactId>maven-scm-plugin</artifactId> <executions> <execution> <id>checkout-schemas</id> <goals> <goal>checkout</goal> </goals> <phase>generate-sources</phase> </execution> </executions> <configuration> <checkoutDirectory>${schemaDirectory}/${schemaPackage}</checkoutDirectory> <connectionUrl>${remoteRepositoryUrl}</connectionUrl> <skipCheckoutIfExists>true</skipCheckoutIfExists> </configuration> </plugin> <!-- Patch the schemas with known fixes --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-patch-plugin</artifactId> <version>1.1</version> <executions> <execution> <id>patch-schemas</id> <goals> <goal>apply</goal> </goals> <phase>generate-sources</phase> </execution> </executions> <configuration> <targetDirectory>${schemaDirectory}/${schemaPackage}</targetDirectory> <skipApplication>false</skipApplication> <patchDirectory>${patchDirectory}</patchDirectory> <patchTrackingFile>${schemaDirectory}/optimization-files/patches-applied.txt</patchTrackingFile> <naturalOrderProcessing>true</naturalOrderProcessing> </configuration> </plugin> <!-- Generate the catalog file based on the schemas just checked out --> <plugin> <groupId>org.codehaus.groovy.maven</groupId> <artifactId>gmaven-plugin</artifactId> <executions> <execution> <phase>generate-sources</phase> <goals> <goal>execute</goal> </goals> <configuration> <scriptpath> <element>${basedir}/src/main/script</element> </scriptpath> <source> CatGen gen = new CatGen( project ) // This differs to iq-privacy.xsd only in the // latter having documentation present gen.exclude 'privacy.xsd' // Most of the xhtml schemas appear to have the // same namespace so excluding them all for now gen.exclude 'xhtml-blkphras-1.xsd', 'xhtml-blkstruct-1.xsd', 'xhtml-hypertext-1.xsd' gen.exclude 'xhtml-im-driver.xsd', 'xhtml-im-model.xsd', 'xhtml-im-wrapper.xsd' gen.exclude 'xhtml-image-1.xsd' gen.exclude 'xhtml-inlphras-1.xsd', 'xhtml-inlstruct-1.xsd', 'xhtml-inlstyle-1.xsd' gen.exclude 'xhtml-list-1.xsd', 'xhtml-struct-1.xsd' // These don't compile at all //gen.exclude 'component-accept.xsd' //gen.exclude 'component-connect.xsd' gen.exclude 'pubsub-event.xsd', 'pubsub-owner.xsd' gen.exclude 'si.xsd', 'sm.xsd' gen.exclude 'waitinglist.xsd' gen.exclude 'xbosh.xsd' gen.exclude 'xdata-validate.xsd' gen.exclude 'iq-register.xsd' // These cause jaxb problems by trying to parse http://www.w3.org/2001/xml.xsd gen.exclude 'commands.xsd', 'httpbind.xsd', 'langtrans.xsd' // Generate the catalog gen.generate() </source> </configuration> </execution> </executions> </plugin> <!-- Add the generated catalog as an additional artifact --> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>build-helper-maven-plugin</artifactId> <executions> <execution> <id>attach-catalog</id> <phase>package</phase> <goals> <goal>attach-artifact</goal> </goals> <configuration> <artifacts> <artifact> <file>${catalogFile}</file> <type>cat</type> </artifact> </artifacts> </configuration> </execution> </executions> </plugin> </plugins> </build> </project>