Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [m2e-dev] [m2eclipse-dev] Ensuring that an m2e BuildContext is correctly injected into a Maven plugin

I can't think of a reason why hasDelta/newScanner/newDeleteScanner
should ignore modified resources. I would change current behaviour and
clarify javadoc and we can introduce new methods if/when somebody asks
for them.

--
Regards,
Igor

PS: please use m2e-dev@xxxxxxxxxxx mailing list

On 10-11-08 06:18 PM, Christopher Hunt wrote:
Hi Igor,

Given the following contract for BuildContext's refresh():

/"Indicates that the file or folder content has been modified during the
build."/

... refresh feels like the right thing to use. However the contract for
newScanner is:

/"If this is an incremental build context and ignoreDelta is false, the
scanner will only "see" files and folders with content changes since
last build."/

The /"since last build"/ bit is the interesting bit of course i.e. as
opposed to "during this build".

I'm cautious about suggesting that we change the behaviour of newScanner
to also consider those files submitted to the refresh method. I just
don't know if that would break anything. On that then, how about a new
set of methods e.g.

boolean hasDelta(java.lang.String relpath, boolean considerRefreshedFiles)
boolean hasDelta(java.util.List relpaths, boolean considerRefreshedFiles)
Scanner newScanner(File basedir, boolean ignoreDelta, boolean
considerRefreshedFiles)
Scanner newDeleteScanner(File basedir, boolean considerRefreshedFiles)

...and then we could see if the resources plugin should call these new
methods and have considerRefreshedFiles as a parameter with a default
value of true.

Your thoughts?

Kind regards,
Christopher

On 09/11/2010, at 3:00 AM, Igor Fedorenko wrote:

Sounds reasonable. Do you think you can propose a fix?


Back to the top