You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Svante Schubert <sv...@gmail.com> on 2016/12/04 11:22:46 UTC

Download & Caching Text Artifacts (XML schema) with Maven

Hi,

In the Apache ODF Toolkit (incubating) project we are generating Java
classes from the ODF XML schema. For this reason, we need to download the
OASIS ODF XML schema, as Apache does not allow to have unchangeable
artifacts within the source repository. On the other hand, I would love to
build offline, without the need to download these schemas over and over
again for every build. Similar as other Maven dependencies these schemas
would be great to store within .m2

What is the common Maven way to do such thing. Do you have any pointers,
examples of a similar problem solution?

Kind regards,
Svante
ᐧ

Re: Download & Caching Text Artifacts (XML schema) with Maven

Posted by Svante Schubert <sv...@gmail.com>.
Benson,

Thanks for the quick reply and the pointers. I will do the github and the
sonatype access as you stated. Perhaps even OASIS can overtake the latter-

Kind regards,
Svante

PS: Regarding the none modification problem of Apache it is both, see
https://issues.apache.org/jira/browse/ODFTOOLKIT-419
ᐧ

2016-12-04 14:57 GMT+01:00 Benson Margulies <bi...@gmail.com>:

> Svante,
>
> I bet that problem isn't 'unchangeable', but rather the license.
>
> Anyway, it's easy to do what you want.
>
> Read http://central.sonatype.org/pages/ossrh-guide.html.
>
> You will probably want to put the schema into a zip or tar file, though you
> can leave it 'naked'. You set up a github.com repo with a pom that uses
> the
> build-helper-maven-plugin to attach the schema file(s) and then you can run
> 'mvn deploy'.
>
> Then use the maven-dependency-plugin to pull it down in your build.
>
> --benson
>
>
>
> On Sun, Dec 4, 2016 at 6:22 AM, Svante Schubert <svante.schubert@gmail.com
> >
> wrote:
>
> > Hi,
> >
> > In the Apache ODF Toolkit (incubating) project we are generating Java
> > classes from the ODF XML schema. For this reason, we need to download the
> > OASIS ODF XML schema, as Apache does not allow to have unchangeable
> > artifacts within the source repository. On the other hand, I would love
> to
> > build offline, without the need to download these schemas over and over
> > again for every build. Similar as other Maven dependencies these schemas
> > would be great to store within .m2
> >
> > What is the common Maven way to do such thing. Do you have any pointers,
> > examples of a similar problem solution?
> >
> > Kind regards,
> > Svante
> > ᐧ
> >
>

Re: Download & Caching Text Artifacts (XML schema) with Maven

Posted by Benson Margulies <bi...@gmail.com>.
Svante,

I bet that problem isn't 'unchangeable', but rather the license.

Anyway, it's easy to do what you want.

Read http://central.sonatype.org/pages/ossrh-guide.html.

You will probably want to put the schema into a zip or tar file, though you
can leave it 'naked'. You set up a github.com repo with a pom that uses the
build-helper-maven-plugin to attach the schema file(s) and then you can run
'mvn deploy'.

Then use the maven-dependency-plugin to pull it down in your build.

--benson



On Sun, Dec 4, 2016 at 6:22 AM, Svante Schubert <sv...@gmail.com>
wrote:

> Hi,
>
> In the Apache ODF Toolkit (incubating) project we are generating Java
> classes from the ODF XML schema. For this reason, we need to download the
> OASIS ODF XML schema, as Apache does not allow to have unchangeable
> artifacts within the source repository. On the other hand, I would love to
> build offline, without the need to download these schemas over and over
> again for every build. Similar as other Maven dependencies these schemas
> would be great to store within .m2
>
> What is the common Maven way to do such thing. Do you have any pointers,
> examples of a similar problem solution?
>
> Kind regards,
> Svante
> ᐧ
>