--- /dev/null
+<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">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <artifactId>web-services-spring</artifactId>
+ <groupId>de.spring.webservices</groupId>
+ <version>1.0-SNAPSHOT</version>
+ </parent>
+ <artifactId>web-services-spring-globalxsds</artifactId>
+ <name>web-services-spring-globalxsds</name>
+ <url>http://gumartinm.name</url>
+
+ <properties>
+ <project.xsd.schemas.source.path>src/main/resources</project.xsd.schemas.source.path>
+ <project.xsd.schemas.target.path>${basedir}/target/generated-sources/src/main/java</project.xsd.schemas.target.path>
+ <project.xsd.schemas.package.name>de.spring.webservices.auto</project.xsd.schemas.package.name>
+ <project.bindings.path>src/main/build-resources/bindings</project.bindings.path>
+ </properties>
+
+ <dependencies>
+
+ <!-- Unitary and integration tests -->
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <finalName>${project.artifactId}</finalName>
+ <resources>
+ <resource>
+ <directory>${basedir}/src/main/resources</directory>
+ <includes>
+ <include>**/*.*</include>
+ </includes>
+ </resource>
+ </resources>
+ <plugins>
+ <!-- Generate code from xsd files:
+ We could use maven-jaxb2-plugin in order to generate Java classes from XSD files but
+ this plugin seems more useful so, I keep using it. Besides, it is based on Apache CXF which
+ as well, uses jaxb.
+
+ See: http://cxf.apache.org/cxf-xjc-plugin.html
+ -->
+ <plugin>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-xjc-plugin</artifactId>
+ <version>3.0.3</version>
+ <configuration>
+ <fork>true</fork>
+ <extensions>
+ <extension>org.apache.cxf.xjcplugins:cxf-xjc-dv:3.0.3</extension>
+ </extensions>
+ </configuration>
+ <executions>
+ <execution>
+ <id>generate-sources-from-xsd</id>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>xsdtojava</goal>
+ </goals>
+ <configuration>
+ <sourceRoot>${project.xsd.schemas.target.path}</sourceRoot>
+ <xsdOptions>
+ <xsdOption>
+ <extension>true</extension>
+ <xsd>${project.xsd.schemas.source.path}/parent.xsd</xsd>
+ <bindingFile>${project.bindings.path}/custombinding.xjb</bindingFile>
+ <packagename>${project.xsd.schemas.package.name}</packagename>
+ </xsdOption>
+ </xsdOptions>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <version>1.9.1</version>
+ <executions>
+ <execution>
+ <id>add-source</id>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>add-source</goal>
+ </goals>
+ <configuration>
+ <sources>
+ <source>${project.xsd.schemas.target.path}</source>
+ </sources>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" ?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ elementFormDefault="qualified"
+ targetNamespace="http://gumartinm.name/spring-ws/parent">
+
+ <xs:simpleType name="parentEnumType">
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="FIRST"/>
+ <xs:enumeration value="SECOND"/>
+ <xs:enumeration value="THIRD"/>
+ <xs:enumeration value="FOURTH"/>
+ <xs:enumeration value="FIVETH"/>
+ </xs:restriction>
+ </xs:simpleType>
+
+</xs:schema>