apache / apache/maven-jdeps-plugin
Add m2e lifecycle mapping metadata
- Dominant language
- Java
- Stars
- 18
- Forks
- 18
- Avg merge
- 9h 12m
- Merged PRs (30d)
- 5
Description
### New feature, improvement proposal
The Eclipse IDE (and IDE's based on Eclipse such as Spring Tool Suite (STS), IBM Rational Application Developer (RAD), and JBoss Developer Studio / Red Hat CodeReady Studio have a component called m2e which provides it's integration to Maven. The Eclipse IDE through m2e attempts to understand various Maven plugin goals used in pom.xmls where those plugin goals are bound to certain Maven phases.
When Eclipse encounters projects using a plugin with goals mapped to Maven phases where it does not already know about that plugin, it flags those as Info items in the IDE's Problems view for each project that uses the plugin. That in turn makes things look like there is an issue even though there is not.
Reference:
* [Eclipse m2e](https://eclipse.dev/m2e/documentation/m2e-execution-not-covered.html)
Developers can manually update the `/.metadata/.plugins/org.eclipse.m2e.core/lifecycle-mapping-metadata.xml` within their Eclipse instance to add a lifecycle mapping to tell Eclipse about those plugin goals. But this requires each person to do this for each instance of Eclipse manually.
Eclipse provides a second option which can be provided with the plugin itself. This option is 100% safe as it just adds a new file `META-INF/m2e/lifecycle-mapping-metadata.xml` into the generated plugin Jar only Eclipse m2e references.
Various common plugins provide this exact option:
* [jacoco-maven-plugin META-INF/m2e/lifecycle-mapping-metadata.xml](https://github.com/jacoco/jacoco/blob/master/jacoco-maven-plugin/META-INF/m2e/lifecycle-mapping-metadata.xml)
* [license-maven-plugin META-INF/m2e/lifecycle-mapping-metadata.xml](https://github.com/mojohaus/license-maven-plugin/blob/master/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml)
* [spotbugs-maven-plugin META-INF/m2e/lifecycle-mapping-metadata.xml](https://github.com/spotbugs/spotbugs-maven-plugin/blob/master/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml)
Providing a `lifecycle-mapping-metadata.xml` in the maven-jdeps-plugin would provide a nicer experience for developers using Eclipse based IDE's with no impact at all to plugin performance or behavior.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reviewing the plugin's Maven goal and phase bindings, then compare the referenced lifecycle-mapping-metadata.xml examples. Add META-INF/m2e/lifecycle-mapping-metadata.xml so the generated plugin JAR supplies the mapping, and verify that Eclipse m2e no longer reports the plugin goals as uncovered.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100