dev@jaxb.java.net

Re: How to use and develop maven 2 plugins for java.net

From: Aleksei Valikov <valikov_at_gmx.net>
Date: Wed, 14 Jun 2006 15:26:00 +0200

Hi.

> I'm using maven 2, and i have contributed the jaxb1 plugin for maven2,
> submitted as a jira issue in mojo.codehaus.org.

Where could I find it?

> Im' planning to use hyperjaxb2 (a java.net project), and i want to
> create a maven2 plugin for it (it would be probably an extension of
> jaxb1 plugin) that when used in combination of hibernate2 maven
> plugin, to get the equivalent of using the ant hyperjaxb2 tasks.

I'm working on the same task right now.

> I know that what i have said so far does not seem very coherent but
> here is the problem i'm facing:
>
> In order to make a maven2 plugin, their dependencies have to exist in
> some repositories (preferably in www.ibiblio.org).
>
> For the JAXB1 plugin, i didn't upload the dependencies into ibiblio
> for it was too vague what should the groupIds/artifactIds be (i
> suggested to anyone interested, to setup its own repository and upload
> there the dependencies). That is the reason why the jaxb1 maven2
> plugin is not yet accepted by the mojo.codehaus.org.

These dependencies exist in the dev.java.net maven repository:

<repositories>
        <repository>
                <id>maven-repository.dev.java.net</id>
                <url>https://maven-repository.dev.java.net/nonav/repository/</url>
                <layout>legacy</layout>
        </repository>
</repositories>

I guess you better leave them there.
The only missing resource right now is xsdlib. For now, you'll have to install
it manually (I think Kohsuke will post it soon).
Dependencies are:

                <dependency>
                        <groupId>javax.xml.bind</groupId>
                        <artifactId>jaxb-api</artifactId>
                        <version>1.0</version>
                </dependency>
                <dependency>
                  <groupId>com.sun.xml.bind</groupId>
                  <artifactId>jaxb-impl</artifactId>
                  <version>1.0.6</version>
                </dependency>
                <dependency>
                  <groupId>com.sun.xml.bind</groupId>
                  <artifactId>jaxb-libs</artifactId>
                  <version>1.0.6</version>
                </dependency>
                <dependency>
                  <groupId>com.sun.xml.bind</groupId>
                  <artifactId>jaxb-xjc</artifactId>
                  <version>1.0.6</version>
                </dependency>
                <dependency>
                  <groupId>com.sun.xml</groupId>
                  <artifactId>relaxngDatatype</artifactId>
                  <version>1.0</version>
                </dependency>
                <dependency>
                  <groupId>com.sun.xml</groupId>
                  <artifactId>xsdlib</artifactId>
                  <version>20050614</version>
                </dependency>

> I would have the same problem when making the Hyperjaxb2 plugin.

I'm currently busy moving jaxbcommons and hyperjaxb2 onto maven.

I would suggest making a new jaxb1 maven2 plugin project on dev.java.net.

I hope you have seen:
https://maven-repository.dev.java.net/
And:
https://maven-repository.dev.java.net/repository/

> What should i do?
> --------------------------
>
> And by that question, i mean:
>
> 1). Should i pursue to embed these maven plugins into java.net
> (since the underlying libs already belong to this site) ?
>
> 2.a) If the answer to (1) is yes, is there some kind of a maven2
> framework that has to be setup first?
>
> 2.b) If the answer to (1) is no, that means that i should go on
> with uploading all required libs/plugins to ibiblio. In that case, am
> i expecting some help or cooperation from java.net? Should other
> projects be notified to re-use the uploaded to ibiblio libs ?
>
> 3) For now, the possibility to upload the JAXB1 libs into the
> java.net maven repository whould be great (but this brings up the
> issue of java.net supporting maven2 repositories).
> Is this possible/desirable ?
>
> 4) To whom or what other mailing lists should i ALSO address my
> questions.

I guess that's all is answered above.

My suggestion:

1. Create a new jaxb1-maven2-plugin project on dev.java.net.
2. Use dev.java.net repository and dependencies I posted above.
3. Wait for Kohsuke to post the xsdlib, manually add the jar to the local repo
for the moment.

I've just created jaxb1-maven2-plugin project. Please apply for the developer
role and post your code there:
https://jaxb1-maven2-plugin.dev.java.net/

Later on we'll be able to use dev.java.net maven automatismus to post the plugin
into the repo automatically.

Bye.
/lexi