[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [m2e-dev] run on ???? configuration and/or incremental
|
There are two ways to get additional source folders -- delegate to mojo
with runOnConfiguration=true or implement source folder configuration
logic in AbstractProjectConfigurator.
In order to use runOnConfiguration=true, the mojo MUST use
plexus-build-api to essentially skip any resource generation during
workspace project configuration update, but otherwise the choice between
runOnConfiguration=true and AbstractProjectConfigurator is up to you.
antlr3, for example, does not use plexus-build-api and won't work with
runOnConfiguration=true. We actually have a fork on antlr3, which has
necessary modifications, but that fork is based on a new build avoidance
API and is not compatible with current m2e versions.
We probably could use modello with runOnConfiguration=true, but I
honestly can't remember why we don't do this.
--
Regards,
Igor
On 11-12-01 10:22 AM, Pino Silvaggio wrote:
from wiki.eclipse.org/M2E_compatible_maven_plugins
<http://wiki.eclipse.org/M2E_compatible_maven_plugins>
If <runOnConfiguration/> set to /true/, corresponding maven mojos will
be executed as part of project import and configuration update. This is
necessary for mojos that make changes to MavenProject instance and
expect these changes to be available to other maven plugins. For
example, most code generation plugins, like modello or antlr3, add new
source directories to MavenProject instance and need to have
<runOnConfiguration/> set to /true/.
most code generation plugins, like modello or antlr3 ?
Maybe there's something I don't understand...
On Thu, Dec 1, 2011 at 7:17 AM, Igor Fedorenko <igor@xxxxxxxxxxxxxx
<mailto:igor@xxxxxxxxxxxxxx>> wrote:
Why would you want to run antlr mojo as part of workspace project update
configuration?
<runOnConfiguration/> is meant for m2e-compatible maven plugins [1],
where mojo execution is the only code that can participate in workspace
project configuration (via mutation of MavenProject instance). Although
other Maven build participants can run on configuration,
AbstractProjectConfigurator provides more direct means to do this.
[1] http://wiki.eclipse.org/M2E___compatible_maven_plugins
<http://wiki.eclipse.org/M2E_compatible_maven_plugins>
--
Regards,
Igor
On 11-12-01 2:19 AM, Pino Silvaggio wrote:
I noticed that antlr sets runOnIncremental to true in the build
participant constructor.
While reading some docs I am now asking myself why not run on
configuration also?
_________________________________________________
m2e-dev mailing list
m2e-dev@xxxxxxxxxxx <mailto:m2e-dev@xxxxxxxxxxx>
https://dev.eclipse.org/__mailman/listinfo/m2e-dev
<https://dev.eclipse.org/mailman/listinfo/m2e-dev>
_________________________________________________
m2e-dev mailing list
m2e-dev@xxxxxxxxxxx <mailto:m2e-dev@xxxxxxxxxxx>
https://dev.eclipse.org/__mailman/listinfo/m2e-dev
<https://dev.eclipse.org/mailman/listinfo/m2e-dev>
_______________________________________________
m2e-dev mailing list
m2e-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/m2e-dev