Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [m2e-dev] hasDelta, Scanner when plugin checks for stale already?

Hi,
 
it all has to do with the plexus-compiler-api[1]
The StaleSourceScanner requires a Mapper to compare the timestamp of files.
There are 2 implementations:
- SingleTargetSourceMapping, for instance to verifying lastModified timestamps of classfiles with its jar.
- SuffixMapping, for instance check a a/b/c/someobject.java with a a/b/c/someobject.class
With JAXB2 we have multiple 'inputfiles' and multiple 'outputfiles' without any relationships.
So here we need some other implementation of the SourceMapping interface.
It´s been a while I´ve looked at it, and I haven´t found the right solution yet.
 
-Robert
 
 
> Date: Thu, 22 Dec 2011 15:08:16 +0100
> Subject: Re: [m2e-dev] hasDelta, Scanner when plugin checks for stale already?
> From: anders@xxxxxxxxxx
> To: pino.silvaggio@xxxxxxxxx; m2e-dev@xxxxxxxxxxx
> CC: rfscholte@xxxxxxxxxxxx
>
> On the topic of the stale flag, we've has some ideas over at Mojo to
> replace that with some better solution. However, there is supposedly
> no very simple solution and hence it's still there. But this might be
> a good time to take a look at that? I believe the JAXB2 mojo has a
> similar solution.
>
> I've cc'ed Robert who talked about this for the JAXB2 mojo some time
> ago. He might have more details.
>
> /Anders
>
> On Thu, Dec 22, 2011 at 08:11, Pino Silvaggio <pino.silvaggio@xxxxxxxxx> wrote:
> > I am trying to port my xmlbeans connector directly into the codehaus
> > xmlbeans plugin
> > using the build-api.
> >
> > However, the plugin already looks for stale files before it builds.
> >
> > My concern is, the buildContext hasDelta or the Scanner should still be used
> > in case the stale flag is false, as there still might be a chance there is a
> > delta.
> > I guess, we shouldn't assume?
> >
> > Anyways, my question, is there a way to check if the buildContext is the
> > default
> > which always returns true for deltas or should I just use instanceof to
> > verify this?
> >
> > My logic would be, if it is not stale and it's not the default buildContext
> > then use
> > the Scanner otherwise don't use the buildContext as it will always return
> > true.
> >
> > We could remove the check for stale but I'd have to discuss this...
> >
> > _______________________________________________
> > m2e-dev mailing list
> > m2e-dev@xxxxxxxxxxx
> > https://dev.eclipse.org/mailman/listinfo/m2e-dev

Back to the top