| Summary: | Extra source folders added by build-helper-plugin are not made available to plugins | ||||||
|---|---|---|---|---|---|---|---|
| Product: | z_Archived | Reporter: | Vincent Vandenschrick <vvandens> | ||||
| Component: | m2e | Assignee: | Igor Fedorenko <igor> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | igor, larsenje, Master.of.dl, matthew.lieder, paul.mealor, sebtardif, vvandens | ||||
| Version: | unspecified | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | PC | ||||||
| OS: | Windows 7 | ||||||
| Whiteboard: | |||||||
| Bug Depends on: | 359158 | ||||||
| Bug Blocks: | |||||||
| Attachments: |
|
||||||
|
Description
Vincent Vandenschrick
Created attachment 198120 [details]
Standalone testcase project
There are at least two related problems here First, m2e maintain MavenProject state during project import, configuration update and workspace build the same way as during command line build. In case of build-helper-maven-plugin:add-sources this means adding compile source roots to the model, but other configurators will need to provide similar functionality. Second, we need to make sure MavenProject state either survives workbench restart or is properly recreated after workbench restart. Currently, new project instance is read after restart and project configurators do not get the chance to make any changes to the project instance. *** Bug 357873 has been marked as a duplicate of this bug. *** *** Bug 352494 has been marked as a duplicate of this bug. *** I pushed first set of changes to [1] and [2]. [1] http://git.eclipse.org/c/m2e/m2e-core.git/log/?h=349586-MavenProject-changes [2] https://github.com/sonatype/m2e-core-tests/tree/349586-MavenProject-changes This should be fixed now. Fix will be included in m2e 1.1 M3 build, but current snapshot version can be installed from https://repository.sonatype.org/content/repositories/forge-sites/m2e/1.1.0/N/LATEST/ Two major changes were required to properly support propagation of MavenProject instance changes from one mojo execution to the next. To make sure changes to the MavenProject instance are taken into account during project import and/or configuration update, m2e executes all compatible mojo executions before execution of project configurators #configure methods. Compatible mojo executions are marked with <runOnConfiguration>true</runOnConfiguration> <execute/> mapping subelement. By default runOnConfiguration is false. For example, <action> <execute> <runOnConfiguration>true</runOnConfiguration> <runOnIncremental>true</runOnIncremental> </execute> </action> Mutable MavenProject instance state (i.e. sources, resources and properties) is reset after each build. This is allows reuse of the same MavenProject instance, otherwise pom.xml will need to be reparsed during each workspace build, which would likely result in significant performance degradation compared to m2e 1.0. Igor, have you tested your fix against the testcase in bug 352494? I just updated my Eclipse to the snapshot you linked to but still am experiencing the same problem. (In reply to comment #7) > Igor, have you tested your fix against the testcase in bug 352494? I just > updated my Eclipse to the snapshot you linked to but still am experiencing the > same problem. yes, it works. kinda. see attached project and my comment in bug 352494. |