You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Chris Huston <ch...@chuston.net> on 2007/10/15 20:32:12 UTC

Putting an XSD into the Maven Repo

We have many projects that share a set of common XSDs. Is there a way  
to check these into a maven repo and use them as dependencies?

Note that the schema's are inter-related, e.g. a type in one file  
extends a type in a second file and uses an enumeration type defined  
in a third.

An example of the projects:

Project A parses XML files that come in off an FTP directory. (XSDs  
used by only by xml parser)
Project B gets XML JMS messages where one section of the payload uses  
the shared XSD types. (XSDs used by XMLBeans to generate java objects)
Project C defines a Web Service that uses the types in a SOAP  
message. (XSDs used by JAXB to generate java objects and by SOAP  
processor to validate messages.)

We only want one copy (of a particular) version to be the  
authoritative copy and to avoid manually copying in the resources to  
each project. Is there already some way to do this in maven, perhaps  
by 'installing' the XSD into the repo as an artifact? Is there a  
better non-maven way (that doesn't include using putting XSDs on a  
web server)?

Thanks,
-- Chris

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


Re: Putting an XSD into the Maven Repo

Posted by Carlos Sanchez <ca...@apache.org>.
or just manually upload and use <type>xsd</type> in the dependency section

On 10/15/07, Wayne Fay <wa...@gmail.com> wrote:
> Package them into a Jar and deploy as usual.
>
> Then use m-remote-resources-p or dependency:unpack to put them in the
> proper place in your project.
>
> Wayne
>
> On 10/15/07, Chris Huston <ch...@chuston.net> wrote:
> > We have many projects that share a set of common XSDs. Is there a way
> > to check these into a maven repo and use them as dependencies?
> >
> > Note that the schema's are inter-related, e.g. a type in one file
> > extends a type in a second file and uses an enumeration type defined
> > in a third.
> >
> > An example of the projects:
> >
> > Project A parses XML files that come in off an FTP directory. (XSDs
> > used by only by xml parser)
> > Project B gets XML JMS messages where one section of the payload uses
> > the shared XSD types. (XSDs used by XMLBeans to generate java objects)
> > Project C defines a Web Service that uses the types in a SOAP
> > message. (XSDs used by JAXB to generate java objects and by SOAP
> > processor to validate messages.)
> >
> > We only want one copy (of a particular) version to be the
> > authoritative copy and to avoid manually copying in the resources to
> > each project. Is there already some way to do this in maven, perhaps
> > by 'installing' the XSD into the repo as an artifact? Is there a
> > better non-maven way (that doesn't include using putting XSDs on a
> > web server)?
> >
> > Thanks,
> > -- Chris
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


-- 
I could give you my word as a Spaniard.
No good. I've known too many Spaniards.
                             -- The Princess Bride

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


Re: Putting an XSD into the Maven Repo

Posted by Wayne Fay <wa...@gmail.com>.
Package them into a Jar and deploy as usual.

Then use m-remote-resources-p or dependency:unpack to put them in the
proper place in your project.

Wayne

On 10/15/07, Chris Huston <ch...@chuston.net> wrote:
> We have many projects that share a set of common XSDs. Is there a way
> to check these into a maven repo and use them as dependencies?
>
> Note that the schema's are inter-related, e.g. a type in one file
> extends a type in a second file and uses an enumeration type defined
> in a third.
>
> An example of the projects:
>
> Project A parses XML files that come in off an FTP directory. (XSDs
> used by only by xml parser)
> Project B gets XML JMS messages where one section of the payload uses
> the shared XSD types. (XSDs used by XMLBeans to generate java objects)
> Project C defines a Web Service that uses the types in a SOAP
> message. (XSDs used by JAXB to generate java objects and by SOAP
> processor to validate messages.)
>
> We only want one copy (of a particular) version to be the
> authoritative copy and to avoid manually copying in the resources to
> each project. Is there already some way to do this in maven, perhaps
> by 'installing' the XSD into the repo as an artifact? Is there a
> better non-maven way (that doesn't include using putting XSDs on a
> web server)?
>
> Thanks,
> -- Chris
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

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