maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Caradoc-Davies <>
Subject Re: Handle XSDs with Maven and Nexus?
Date Mon, 08 Apr 2013 08:31:35 GMT
Even once XSDs are published at a well-known location (necessary for 
non-Maven validating parsers), I still like bundling XSDs for offline 
Maven builds (why should your CI go down when a web server is offline?). 
JAR bundling is great. Defeat the jar-haters by turning it around: 
publish static XSDs and then bundle them into JARs for Maven.

For example, GeoSciML is published as a bunch of static files on an 
apache instance:

But I needed tests that worked offline, so for GeoTools I bundled some 
artifacts that I pushed onto a Maven repo:

These do not get run as part of the standard build; publication is a 
manual process because the schemas are outside GeoTools governance.

Then the code has some wrappers:
around a resolver that maps the original HTTP URL onto a classpath 
(avoiding jar:file: URLs and enabling relative imports):

Test dependencies on online resources are bad news; JARs are so much better.

Your bigger problems are governance: versioning and change control of 
your XSDs. How does this occur? Are these static committee/ISO-governed 
XSDs, or the representation of a local changeable information model?

If your XSDs change often, you will quickly tire of updating poms and 
repackaging artifacts. Please automate the process and tell me how.  :-)

Kind regards,

On 08/04/13 15:53, Thomas Sundberg wrote:
> Hi!
> We seem to want to publish XSDs (XML Schema Definitions) in a project.
> I have been told that we want to make XSDs available at a well known
> url.
> We are using Maven and I tried to sell the idea that we create a jar
> that contains the XSD and add this as a dependency in a Maven build.
> This wasn't a good enough solution.
> How would you publish a XSD for a project and make it available for
> other Maven builds?
> We are using Nexus so publishing there is an option.
> /Thomas
> --
> Thomas Sundberg
> M. Sc. in Computer Science
> Mobile: +46 70 767 33 15
> Blog:
> Twitter: @thomassundberg
> Better software through faster feedback
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

Ben Caradoc-Davies <>
Software Engineer
CSIRO Earth Science and Resource Engineering
Australian Resources Research Centre

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message