Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [m2e-dev] <runOnConfiguration> and copying resources

You can specify both runOnIncremental=true and runOnConfiguration=true,
in which case your plugin will be called with empty BuildContext during
project import/configuration and will be called with actual changes
during incremental or full workspace build. In both cases your plugin is
expected to add new source root to MavenProject and in both cases it is
expected to generate the code only if BuildContext hasDelta for input
files of your plugin.


Run on configuration and run on incremental logic is implemented by
MavenBuilderImpl and MojoExecutionBuildParticipant classes.


See also http://wiki.eclipse.org/M2E_compatible_maven_plugins

--
Regards,
Igor

On 12-10-17 6:56 PM, Steven Bethard wrote:
On Oct 16, 2012, at 5:36 PM, Steven Bethard
<Steven.Bethard@xxxxxxxxxxxx> wrote:
I have a Maven plugin that needs to run after resources have been
copied to target/classes, and before any Java code compilation
takes place. So I have declared it with "@phase process-resources",
and this works fine with Maven at the command line.  It also works
fine if I specify <runOnIncremental>true</runOnIncremental> in my
m2e lifecycle mapping.

However, if I specify <runOnConfiguration>true</runOnConfiguration>
in my m2e lifecycle mapping, on project import, resources are not
copied to target/classes before my plugin runs.

Maybe someone can point me to where in the source code of m2e
<runOnIncremental> is handled and where <runOnConfiguration> is
handled? Perhaps then I could figure out why the former runs
resources:resources but the latter doesn't.

Steve _______________________________________________ m2e-dev mailing
list m2e-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/m2e-dev



Back to the top