users@jaxb.java.net

Re: Re: JAXB XJC Maven 2 Plugin Questions

From: Malachi de Ælfweald <malachid_at_gmail.com>
Date: Thu, 4 Jun 2009 01:12:53 -0700

Which maven2 server are you using? Most of them can handle legacy maven1
repos. I recently switched to Nexus and it can make the maven1 repo look
like a maven2 repo.



Malachi de Ælfweald
http://www.google.com/profiles/malachid


On Wed, Nov 28, 2007 at 2:35 PM, Dave Hoffer <DHoffer_at_xrite.com> wrote:

> Thanks very much this is very helpful. ...couple of additional
> questions...
>
> I use maven2 behind a corporate maven2 server that can't handle legacy
> maven1 repos. Any idea when/if all these dependencies could be moved to
> maven2 so I don't need to proxy both? (I tried using the maven2 URLs
> only and it would not work until I added maven1 as well.)
>
> Thanks again!
> -Dave
>
> -----Original Message-----
> From: aleksei.valikov_at_gmail.com [mailto:aleksei.valikov_at_gmail.com] On
> Behalf Of Aleksei Valikov
> Sent: Wednesday, November 28, 2007 5:17 AM
> To: users_at_jaxb.dev.java.net
> Subject: Re: JAXB XJC Maven 2 Plugin Questions
>
> Hi.
>
> > 1. It looks like the latest version of the maven2 plugin is 1.1. This
> > version is dependent on xjc 2.0.2. Can this support the latest xjc
> > release (2.1.5?)?
>
> Much more further developed and better supported is
> maven-jaxb2-plugin. The project is very active and has more features.
>
> See https://maven-jaxb2-plugin.dev.java.net/
>
> Current version is 0.4.M3, comes with JAXB RI 2.1.5.
>
> > 2. Also can the later xjc versions be released to the maven server?
> The
> > latest released version is 2.0.3. (The 2.1-EA1 is no good because
> there
> > is no pom).
>
> JAXB 2.1.5 is in there. It is distributed via Maven1 dev.java.net repo:
>
> http://download.java.net/maven/1/com.sun.xml.bind/jars/
>
> See https://maven-jaxb2-plugin.dev.java.net/ for details on how to
> bind this repo to your project.
>
> > 3. How can I use jaxb2-commons plugins with the maven2 plugin?
> > Specifically the value constructor, default value, equals & fluent api
> > plugins?
>
> 1. The plugin you want to use must be available as a maven artifact.
> 2. Include the JAXB plugin artifact in configuration using the
> plugins/plugin
> 3. Add appropriate arguments to args/arg.
> 4. If generated code has some additional dependencies, add them to the
> dependencies of your project so that the project would compile
> allright.
>
> Here's an example:
>
> <plugin>
>
> <groupId>org.jvnet.jaxb2.maven2</groupId>
>
> <artifactId>maven-jaxb2-plugin</artifactId>
> <configuration>
> <args>
> <arg>-XtoString</arg>
> <arg>-Xequals</arg>
> <arg>-XhashCode</arg>
> <arg>-Xcopyable</arg>
> </args>
> <plugins>
> <plugin>
>
> <groupId>org.jvnet.jaxb2_commons</groupId>
>
> <artifactId>basic</artifactId>
>
> <version>0.2.GA</version>
> </plugin>
> </plugins>
> </configuration>
> </plugin>
>
> I'll add this to plugin documentation as well.
>
> ps. value-constructor is not a Maven project. fluent-api is a maven
> project, but I don't see if it's available from any maven repo.
> default value is not a maven project. commons-lang-plugin is a Maven
> project but I don't see it in any of the repos. So if you really want
> to use these, you'll have to install the manually.
>
> For toString/equals/hashCode/copyable plugins see the example above.
> org.jvnet.jaxb2_commons:basic implements these JAXB plugins.
>
> Bye.
> /lexi
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
> For additional commands, e-mail: users-help_at_jaxb.dev.java.net
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
> For additional commands, e-mail: users-help_at_jaxb.dev.java.net
>
>