Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [m2e-dev] build-before-launch ? background m2e task ?



On 11-10-17 3:13 PM, Andrei Pozolotin wrote:
Igor:

1) to solve "build-before-launch" I implemented a plugin, which
provides custom java launch configuration contribution, so it runs
m2e goals before actual java app launch; it sort of works; but:

question:

2) how can I get appropriate m2e / plexus scanner instance so I run
these pre-launch m2e goals only when there are really project
changes? scanner instance I was able to get based on what I see in
m2e source code is somehow not incremental, it returns whole project
file set every time I run it :-)

Resource deltas are available to project builders and m2e build
participants. If your code runs as part of
AbstractBuildParticipant.build method, this.getBuildContext().newScanner
and this.getDelta both provide access to resources changed since last build.

I do not believe there is an easy way to determine resources changes
between invocations of pre-launch hooks.


3) or may be there are easier ways to detect if there is a need to
run m2e?


Is this a trick question? ;-)

Thank you,

Andrei

--
Regards,
Igor


Back to the top