Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [m2e-dev] Lifecycle mapping issue

On 10/11/2011 11:57 AM, Igor Fedorenko wrote:

On 11-10-09 10:54 PM, Ian Robertson wrote:

Is there a recommended way to handle this sort of situation? The only
thing I can think of at the moment is to create two configurators. One
would be a dummy configurator attached to the Jamon mojo; this would
keep m2e from complaining about the jamon plugin execution not being
covered. Then attach the "real" Jamon configurator to the
maven-compiler-plugin as a secondary configurator. While this might
work, it doesn't feel particularly clean, and I wouldn't be surprised to
see a kludge like that break in a future release of m2e.


This is supported and is expected to work both with current and future
versions of m2e (unless we break it, of course :-) ). You don't need a
dummy configurator for jamon-maven-plugin, mapping it to <ignore/>
should work.

As for "not particularly clean" part, I am not sure there is a better
way to support such implicit dependencies between different project
configurators. The only downside of the current implementation is that
jamon configurator will be activated and executed for all java projects,
regardless if they use jamon or not. Although this is certainly not
nice, I do not believe this justifies introduction of more complex
mapping conditions, i.e. "map as secondary to jdt configurator, when
both jamon and java compiler are present".

Knowing that this is the recommended strategy does make me feel much
better about it. Also, thanks for the <ignore/> tip - for some reason
the connection between the lifecycle-mapping-metadata.xml file I put in
my projects to keep m2e quiet and the one I am putting in my plugin
hadn't quite sunk in :).

  - Ian

CONFIDENTIALITY NOTICE:  This message is intended only for the use and review of the individual or entity to which it is addressed and may contain information that is privileged and confidential.  If the reader of this message is not the intended recipient, or the employee or agent responsible for delivering the message solely to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited.  If you have received this communication in error, please notify sender immediately by telephone or return email.  Thank you.


Back to the top