users@jaxb.java.net

Re: maven-jaxb1-plugin - run xjc for test sources

From: Kostis Anagnostopoulos <ankostis_at_gmail.com>
Date: Thu, 7 Dec 2006 13:20:35 +0200

On 12/7/06, Kostis Anagnostopoulos <ankostis_at_gmail.com> wrote:
> Hi Kohsuke,
>
> On 12/7/06, Kohsuke Kawaguchi <Kohsuke.Kawaguchi_at_sun.com> wrote:
> > Gregory Kick wrote:
> > > Hey guys,
> > >
> > > You're definitely on track with what I was thinking. The only other
> > > plugin that I've ever seen implement something like this is the
> > > xmlbeans plugin, which has a whole seperate goal for it. I think that
> > > the flag makes more sense.
> >
> > Perhaps I'm too late, but the general practice for doing this is that
> > the Maven plugin creates one Abstract Mojo that does most of the work,
> > then derive two actual Mojos from there --- one for source and the other
> > for test-source.
>
> The jaxb1 plugin is indeed structured like that: One abstract, that
> does most of the job, and the actual mojo that provides the params,
> logging, etc. Also, the hj2 plugin extends the abstract class.
>
> So technically, it is very easy to do it.
>
> But, i do question the need for such functionality.
>
> I'm not sure whether there will be a need also for separate test
> dependencies, separate reports and javadocs, separate lifecycle. In
> the end, we will start duplicating all pom functionality.
>
> That is why i think it is best to build the required test sources into
> a jar using a separate pom, and included the result jar with
> scope=test.

I forgot Kohsuke to ask you which are these plugins that you remember
applying the mentioned pattern (separate test sources mojo)?