Here is a small Example of what I would like to achieve:
Maven Artifact A is one of many Webservices and defines a XSD Schema with definitions for Requests and Responses. (src/main/resources/xsd)
Artifact A depends on Artifact B wich is a simple JAR Project and contains a multitude of Master XSDs with low level Type descriptions. (src/main/resources/xsd)
The XSDs in Artifact A use the type definitions (include) that are specified once in Artifact B.
If at all possible I would really like to know how to include xsd files that are located in a jar which is loaded as as a maven dependency and how to resolve the webservice xsd (and wsdl) in IDEs like Netbeans and Eclipse.
If this approach seems to exotic - are there better practices for a clean design?
update
First here is a simple example of how I would expect the schema include to work....
Artifact A (WAR Module)
POM:
...
<artifactId>A</artifactId>
...
<dependency>
<artifactId>B</artifactId>
...
</dependency>
Schema:
....
<xs:include schemaLocation="classpath://net/elfwyn/xsd/schema.xsd"/>
....
Artifact B (JAR Module)
Schema Location:
src/main/resources/net/elfwyn/xsd/schema.xsd
There seem to be several sollutions for a problem like this, but I do not know how to implement them in my environment:
I know of Catalog Resolvers embedded in the (netbeans7.1) IDE (for dev environemnt) and available as Maven Plugins (for productive environment), that should be able to specify an alias on the location of the schema file. This alias should then be used as the schema location.
However I do not know how to specify a Catalog.xml that accesses schemas inside a JAR File. To me it seems to be the same problem as specifying it in the schema location directly. Also there is the overhead of maintaining the catalog for each WAR - project wich I would rather not take if at all possible.
Concerning the Maven plugin I haven't found out anything conclusive yet.
Other sources are implementing a custom catalog resolver in the context of jax-b, but I cannot yet see a possible hook for implementing such a resolver in a Java-WS environment, and how it should work in conjunction with the maven-plugin mentioned above or the IDE Catalog resolver...