Hi all,
Over the past months, I have been working on an enhancement [1] for the
Maven Help Plugin. The enhancement is about the effective-pom goal. If
you pass it the 'verbose' parameter, it will include inline comments
saying "this line of the effective pom is caused by this line in a
different pom":
<dependency>
<groupId>org.example</groupId> <!--
org.example:mng-7344-bom-c:1-SNAPSHOT, line 17 -->
<artifactId>mng-7344-dep-x</artifactId> <!--
org.example:mng-7344-bom-c:1-SNAPSHOT, line 18 -->
<version>2</version> <!-- org.example:mng-7344-bom-c:1-SNAPSHOT,
line 19 -->
</dependency>
This is not so useful when you have a long path of POMs referring to
each other. It will only show the last POM of that trail, but not the
intermediate POMs. This makes it hard for users to understand how their
effective POM was constructed. In the enhanced version,
help:effective-pom -Dverbose would show something like this:
<dependency>
<groupId>org.example</groupId> <!--
org.example:mng-7344-bom-c:1-SNAPSHOT, line 17 from
org.example:mng-7344-bom-a:1-SNAPSHOT from
org.example:mng-7344-project:1-SNAPSHOT-->
<artifactId>mng-7344-dep-x</artifactId> <!--
org.example:mng-7344-bom-c:1-SNAPSHOT, line 18 from
org.example:mng-7344-bom-a:1-SNAPSHOT from
org.example:mng-7344-project:1-SNAPSHOT-->
<version>2</version> <!-- org.example:mng-7344-bom-c:1-SNAPSHOT,
line 19 from org.example:mng-7344-bom-a:1-SNAPSHOT from
org.example:mng-7344-project:1-SNAPSHOT-->
</dependency>
(I'm sorry, the output is hard to read in a plain-text email; a
formatted version is available in the JIRA ticket [1].)
This enhancement requires changes in three projects:
1. Maven Help Plugin
2. Maven Core
3. Modello
Now that the proof of concept is there, I'd like to ask: is this an
enhancement we want to incorporate into Maven? If so, I'll start by
polishing the code a bit, and then open three separate merge requests.
We can discuss the implementation there.
One particularly important thing to mention is that I did _not yet_ pay
attention to backward compatibility of the Maven Help Plugin. I believe
we can do this in a decent way - it wasn't the first priority for the
proof of concept.
I'm looking forward to hearing your thoughts on this.
Thanks,
Maarten
[1] https://issues.apache.org/jira/browse/MPH-183
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org