users@jaxb.java.net

Re: Setting up a JAXB plugin development environment in Eclipse

From: Anders Hessellund <anders.hessellund_at_gmail.com>
Date: Mon, 5 Oct 2009 21:35:58 +0200

Thanks a lot, guys!

This is very helpful.

-- Anders

On Thu, Oct 1, 2009 at 8:02 AM, Aleksei Valikov <valikov_at_gmx.net> wrote:

> Hi,
>
> > does anyone here have an easy "recipe" for setting up an environment to
> > write JAXB plugins in Eclipse?
>
> I've developed a number of JAXB plugins, using Eclipse as IDE. In
> order to ease development, I also needed to develop a tools package
> and a testing infrastructure. Take a look at this project:
>
> https://jaxb2-commons-svn.dev.java.net/svn/jaxb2-commons-svn/trunk/basics/
>
> If you're interested in a test case, see
> org.jvnet.jaxb2_commons.tests.issues.RunIssuesPlugin in
> tests/issues/src/test/java. It runs XJC with specified parameters:
>
> public class RunIssuesPlugin extends RunXJC2Mojo {
>
> @Override
> protected void configureMojo(AbstractXJC2Mojo mojo) {
> super.configureMojo(mojo);
> mojo.setExtension(true);
> }
>
> @Override
> public List<String> getArgs() {
> final List<String> args = new
> ArrayList<String>(super.getArgs());
> args.add("-XtoString");
> args.add("-Xequals");
> args.add("-XhashCode");
> args.add("-Xcopyable");
> args.add("-Xmergeable");
> return args;
> }
>
> }
>
> This runnable as unit test from Eclipse which allows tracing/debuggin
> plugins quite nicely.
>
> 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
>
>


-- 
Anders Hessellund
www.itu.dk/people/hessellund/