Hi,
I developed a maven extension that dynamically binds plugin executions to
the build lifecycle of the project.
I just had to
override
org.apache.maven.AbstractMavenLifecycleParticipant.afterProjectsRead(MavenSession)
and inside this method, I add the plugin executions this way:
Plugin plugin = new Plugin();
plugin.setGroupId("...");
plugin.setArtifactId("...");
plugin.setVersion("...");
PluginExecution pluginExecution = new PluginExecution();
pluginExecution.addGoal("...");
plugin.addExecution(pluginExecution);
session.getCurrentProject().getBuild().addPlugin(plugin);
When I build my project, all the plugin executions run as expected but some
of the plugins generate some code and the source folders are not added to
the build path by m2e.
This is the case even for plugins that support m2e (like
build-helper-maven-plugin) which means that when explicitly declared in the
pom.xml, the generated source folder is added to eclipse build path but
when added dynamically by my extension it is not.
How can I trigger the addition of a folder to the build path in eclipse
without adding explicitly some plugin or lifecycle metadata to my project's
pom.xml?
Is there an equivalent of lifecycle-mapping-metadata.xml for maven 3
extensions?
_______________________________________________
m2e-users mailing list
[email protected]
To change your delivery options, retrieve your password, or unsubscribe from
this list, visit
https://dev.eclipse.org/mailman/listinfo/m2e-users