| Summary: | Eclipse reporting Maven Project Build Lifecycle Mapping Problem errors when using the build-helper Maven plugin | ||||||
|---|---|---|---|---|---|---|---|
| Product: | z_Archived | Reporter: | Mark A. Ziesemer <bugs> | ||||
| Component: | m2e | Assignee: | Project Inbox <m2e.core-inbox> | ||||
| Status: | CLOSED DUPLICATE | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | igor, juha.heljoranta | ||||
| Version: | unspecified | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | All | ||||||
| OS: | All | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Mark A. Ziesemer
Created attachment 193411 [details] Minimal project version for use as test case Attaching a minimal version of a project for use as a test case. To use: 1) Use the Eclipse import wizard, General/"Existing Projects into Workspace". 2) Select the archive file, then select only the parent project (MarkUtils-JMX-343030). 3) After import, right-click the project, Configure, "Convert to Maven Project". 4) Right-click the project, Import, Maven, Existing Maven Projects. Select only the 2 child projects, then click Next. 5) On the "Setup Maven plugin connectors" page, click "Deselect all", then "Finish". 6) Observe a total of 7 errors in the "Problems" view (identical to those in comment #0). There are two separate issues here. First, build-helper-maven-plugin configurator available from m2e marketplace only supports add-source and add-test-source. It does not currently support add-resource and add-test-resource goals and I opened bug 343310 to track this enhancement request. Second, attached sample project uses cross module source and resource folder references (i.e. "${basedir}/../MarkUtils-JMX-Java5/JavaSource"). This is not supported by m2e and there are no plans to provide such support neither in m2e core nor as part of m2e marketplace. Igor, thanks for looking at this. Just to clarify, while having specific m2e support for these features may be nice, I'm not even expecting it. Really, I just want an option to at least be able to ignore the errors - and persistently. I.E., I consider these errors to be "false positives". They should at least be demoted to "warning" or "info" level, if they can't otherwise be configured away. I don't see any actual issues with my projects. The Maven builds complete as expected, and I don't see any limitations with Eclipse, as they were configured from pom.xml by m3. Additionally, everything was working as expected with the older m2eclipse builds - even without any additional project configurators. Suppressing these false positives using workspace or project preferences means that all developers who work on this project will have to replicate the same settings. Even you will have to replicate these settings if you decide to import this project to another workspace on the same computer. What are your objections against m2e-specific elements under build/pluginManagement? How are they worse then .settings/ files checked in source control system, for example? Ideally, these "false positives" wouldn't even be generated. (There may be something else going on here, but if so, I don't understand what it is.)
Conceptually, I feel that Maven and it's pom.xml should be IDE independent. If 3 other Java IDEs implement similar functionality to what is being observed in this bug, then it adds that much more additional complexity into pom.xml - most of which won't be used by any of the other IDEs.
> Suppressing these false positives using workspace or project preferences means
that all developers who work on this project will have to replicate the same
settings. Even you will have to replicate these settings if you decide to
import this project to another workspace on the same computer.
Certainly agreed, this is not the intent. Using the <pluginManagement/> in pom.xml would avoid this - as would something in .settings/ that indicates that any build-helper plugins should be ignored by m2e.
I guess my biggest issue is that under the previous m2eclipse versions, this project both worked in Eclipse and was buildable by Maven without error. Now, it produces errors in Eclipse.
The old behaviour is essentially a bug. During project import and configuration update, m2e 0.12 and earlier ran some semi-random maven build phase and/or plugin and *assumed* the project would be fine. And many projects were fine. Unfortunately, for some projects this led to very hard to troubleshoot problems with classes/resources going missing intermittently, occasional endless builds and actions required to work on the project, like code generation, not being performed reliably inside workspace. To solve these problems, m2e 0.13 requires explicit knowledge about all plugin executions bound to project build lifecycle. Currently, this knowledge can either come from installed m2e extensions (a.k.a "project configurator") or from project pom.xml file. Some additional information is available from https://docs.sonatype.org/display/M2ECLIPSE/Project+build+lifecycle+mapping but feel free to ask questions on m2e-user mailing list. Sounds good. Thanks for the information! Not sure if this is the correct bug but people are having a LOT of problems with this. For example: http://stackoverflow.com/questions/6352208/how-to-solve-plugin-execution-not-covered-by-lifecycle-configuration-for-spring and: http://blog.objectteams.org/2011/06/between-the-times/ This also breaks Scala Eclipse integration for Maven projects: <plugin> <groupId>org.scala-tools</groupId> <artifactId>maven-scala-plugin</artifactId> <version>2.15.2</version> <executions> <execution> <!-- this line gives error: Plugin execution not covered by lifecycle configuration: org.scala-tools:maven-scala-plugin:2.15.2:compile (execution: default, phase: compile) --> <goals> <goal>compile</goal> <goal>testCompile</goal> </goals> </execution> </executions> </plugin> For general description of "plugin execution not covered" error marker see http://wiki.eclipse.org/M2E_plugin_execution_not_covered *** This bug has been marked as a duplicate of bug 343310 *** |