After much searching and talking with colleagues we've decided that we will 
stick with un-jaring the parent xsds from the parent project within the maven 
repository using the maven-dependency-plugin.

There seems to be no better way of keeping the XSD in sync with the Pojos that 
are generated from it and to version correctly while also keeping different 
projects independent from each other.

Thanks!

- Joel

-----Original Message-----
From: Jon Paynter [mailto:kittl...@gmail.com] 
Sent: Monday, November 29, 2010 4:07 PM
To: Maven Users List
Subject: Re: XJC/XSD dependancies

Yes thats something we struggle with here as well.  But since a lot of the
XSD files are shared across multiple modules, and the entire project is
released as one unit -- the issues are less than one would expect.

Another suggestion is to break up the xsd files such that files which depend
on each other are in a common module, and those do not have such
dependencies are placed inside their respective java modules.

we are going to be breaking up the large (12MB) xsd module in the near
future -- so please share your experiences if you get something working.

On Mon, Nov 29, 2010 at 2:48 PM, Joel Schuster <jo...@navsys.com> wrote:

> I'm concerned as this means that the XSD is versioned/released separately
> from the POJOs that they create.
>
> - Joel
>
> -----Original Message-----
> From: Jon Paynter [mailto:kittl...@gmail.com]
> Sent: Monday, November 29, 2010 2:43 PM
> To: Maven Users List
> Subject: Re: XJC/XSD dependancies
>
> Our project uses xsd files as well.  before moving to maven, what we did
> was
> to put ALL the xsd files into a single component -- now a maven project.
> Then any project needing the xsd files just adds a dependency in the usual
> way.
>
> Granted this makes for extra overhead when you have multiple teams or
> developers changing files in the same project - but it guarantees everyone
> has the correct version of the xsd files, and also makes the pom files Much
> less complicated.
>
>
> On Mon, Nov 29, 2010 at 1:35 PM, Joel Schuster <jo...@navsys.com> wrote:
>
> >
> > I have a couple projects in that use XJC via the org.jvnet.jaxb2.maven2
> > plugin.
> >
> > The problem I'm running into is when the XSD of one project depends on
> the
> > XSD of another.
> >
> > I can't seem to find a good 'maven-esq' way to deal with this. Right now
> > I'm unpacking the xsds from the dependency jars (via the
> > maven-dependency-plugin) and referencing them using a relative path:
> >
> > Ex:
> >
> > <plugin>
> >            <groupId>org.apache.maven.plugins</groupId>
> >            <artifactId>maven-dependency-plugin</artifactId>
> >            <version>2.1</version>
> >            <executions>
> >                        <execution>
> >                                    <id>unpack-dependancies</id>
> >                                    <phase>process-resources</phase>
> >                                    <goals>
> >                                                <goal>unpack</goal>
> >                                    </goals>
> >                                    <configuration>
> >                                                <artifactItems>
> >                                                            <artifactItem>
> >
> >  <groupId>com.company</groupId>
> >
> >  <artifactId>parent.project</artifactId>
> >
> >  <version>0.0.1-SNAPSHOT</version>
> >
> >  <type>jar</type>
> >
> >  <overWrite>false</overWrite>
> >
> >
>  
> <outputDirectory>${project.build.directory}/dependencies/parent.project</outputDirectory>
> >
> >  <includes>**/*.xsd,**/*.xjb</includes>
> >
>  </artifactItem>
> >
> > ...
> >
> > In child.xsd
> >
> > <import
> >
> schemaLocation="../../../../target/dependencies/parent.project/schema/parent.xsd"
> > ...
> >
> > Seems there should be a way to reference a file within a maven dependency
> > without having to unpack it first.
> >
> > Thoughts?
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org

Reply via email to