Hi again,
It appears that images are not possible, or I made a mistake, so I will
post the text variant as follow up.
A dependency example with *maven 4.0.0-alpha12*
<dependencies>
<dependency>
<groupId>org.example</groupId> <!--
org.example:mng-7344-project:1-SNAPSHOT, line 49-->
<artifactId>mng-7344-dep-w</artifactId> <!--
org.example:mng-7344-project:1-SNAPSHOT, line 50-->
<version>4</version> <!-- org.example:mng-7344-project:1-SNAPSHOT,
line 51-->
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.example</groupId> <!--
org.example:mng-7344-project:1-SNAPSHOT, line 54-->
<artifactId>mng-7344-dep-x</artifactId> <!--
org.example:mng-7344-project:1-SNAPSHOT, line 55-->
* <version>2</version> <!-- org.example:mng-7344-bom-c:1-SNAPSHOT,
line 16 from org.example:mng-7344-bom-a:1-SNAPSHOT-->*
<scope>provided</scope> <!-- org.example:mng-7344-project:1-SNAPSHOT, line
56-->
</dependency>
<dependency>
<groupId>org.example</groupId> <!--
org.example:mng-7344-project:1-SNAPSHOT, line 59-->
<artifactId>mng-7344-dep-y</artifactId> <!--
org.example:mng-7344-project:1-SNAPSHOT, line 60-->
<version>[1.0,)</version> <!--
org.example:mng-7344-project:1-SNAPSHOT, line 61-->
<scope>compile</scope>
</dependency>
</dependencies>
A dependency example with *Maven 3.9.6*
<dependencies>
<dependency>
<groupId>org.example</groupId> <!--
org.example:mng-7344-project:1-SNAPSHOT, line 49 -->
<artifactId>mng-7344-dep-w</artifactId> <!--
org.example:mng-7344-project:1-SNAPSHOT, line 50 -->
<version>4</version> <!-- org.example:mng-7344-project:1-SNAPSHOT,
line 51 -->
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.example</groupId> <!--
org.example:mng-7344-project:1-SNAPSHOT, line 54 -->
<artifactId>mng-7344-dep-x</artifactId> <!--
org.example:mng-7344-project:1-SNAPSHOT, line 55 -->
* <version>2</version> <!-- org.example:mng-7344-bom-c:1-SNAPSHOT,
line 16 -->* <scope>provided</scope> <!--
org.example:mng-7344-project:1-SNAPSHOT, line 56 -->
</dependency>
<dependency>
<groupId>org.example</groupId> <!--
org.example:mng-7344-project:1-SNAPSHOT, line 59 -->
<artifactId>mng-7344-dep-y</artifactId> <!--
org.example:mng-7344-project:1-SNAPSHOT, line 60 -->
<version>[1.0,)</version> <!--
org.example:mng-7344-project:1-SNAPSHOT, line 61 -->
<scope>compile</scope>
</dependency>
</dependencies>
Or like the dependencyManagement element with *Maven 4.0.0-alpha12*
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.example</groupId> <!--
org.example:mng-7344-bom-c:1-SNAPSHOT, line 14 from
org.example:mng-7344-bom-a:1-SNAPSHOT-->
<artifactId>mng-7344-dep-x</artifactId> <!--
org.example:mng-7344-bom-c:1-SNAPSHOT, line 15 from
org.example:mng-7344-bom-a:1-SNAPSHOT-->
<version>2</version> <!-- org.example:mng-7344-bom-c:1-SNAPSHOT,
line 16 from org.example:mng-7344-bom-a:1-SNAPSHOT-->
</dependency>
<dependency>
<groupId>org.example</groupId> <!--
org.example:mng-7344-bom-c:1-SNAPSHOT, line 19 from
org.example:mng-7344-bom-a:1-SNAPSHOT-->
<artifactId>mng-7344-dep-y</artifactId> <!--
org.example:mng-7344-bom-c:1-SNAPSHOT, line 20 from
org.example:mng-7344-bom-a:1-SNAPSHOT-->
<version>1</version> <!-- org.example:mng-7344-bom-c:1-SNAPSHOT,
line 21 from org.example:mng-7344-bom-a:1-SNAPSHOT-->
</dependency>
<dependency>
<groupId>org.example</groupId> <!--
org.example:mng-7344-bom-b:1-SNAPSHOT, line 18-->
<artifactId>mng-7344-dep-z</artifactId> <!--
org.example:mng-7344-bom-b:1-SNAPSHOT, line 19-->
<version>3</version> <!-- org.example:mng-7344-bom-b:1-SNAPSHOT,
line 20-->
</dependency>
</dependencies>
</dependencyManagement>
The dependencyManagement element *Maven 3.9.6*
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.example</groupId> <!--
org.example:mng-7344-bom-c:1-SNAPSHOT, line 14 -->
<artifactId>mng-7344-dep-x</artifactId> <!--
org.example:mng-7344-bom-c:1-SNAPSHOT, line 15 -->
<version>2</version> <!-- org.example:mng-7344-bom-c:1-SNAPSHOT,
line 16 -->
</dependency>
<dependency>
<groupId>org.example</groupId> <!--
org.example:mng-7344-bom-c:1-SNAPSHOT, line 19 -->
<artifactId>mng-7344-dep-y</artifactId> <!--
org.example:mng-7344-bom-c:1-SNAPSHOT, line 20 -->
<version>1</version> <!-- org.example:mng-7344-bom-c:1-SNAPSHOT,
line 21 -->
</dependency>
<dependency>
<groupId>org.example</groupId> <!--
org.example:mng-7344-bom-b:1-SNAPSHOT, line 18 -->
<artifactId>mng-7344-dep-z</artifactId> <!--
org.example:mng-7344-bom-b:1-SNAPSHOT, line 19 -->
<version>3</version> <!-- org.example:mng-7344-bom-b:1-SNAPSHOT,
line 20 -->
</dependency>
</dependencies>
</dependencyManagement>
Sincerely,
Giovanni van der Schelde & Juul Hobert
On Fri, 29 Mar 2024 at 15:33, Giovanni van der Schelde <[email protected]>
wrote:
> Hi all,
>
> Juul Hobert and I took it upon ourselves to see if we can resolve the
> following tickets.
> - MNG-7344 (https://issues.apache.org/jira/browse/MNG-7344)
> - MPH-183 (https://issues.apache.org/jira/browse/MPH-183)
> These were originally implemented by Jan-Jelle Kester in a PoC, and later
> further by Maarten Mulders.
>
> Maarten has already posted some output of the plugin on the mailing list,
> however after the immutable model was merged it broke.
> We had to make some additional changes to make it work again and added
> some improvements.
> I've ran the new version of the help plugin with Maven 3.9.6 and
> 4.0.0-alpha12, you can find the results in the screenshots below.
>
> Left Maven 4, Right Maven 3
> [image: Pasted image 20240329124737.png]
> Left Maven 4, Right Maven 3
> [image: Pasted image 20240329124805.png]
>
> The PR's can be found here:
> - Maven core changes: https://github.com/apache/maven/pull/603 (should be
> referred to as MNG-7344)
> - Maven help plugin changes:
> https://github.com/apache/maven-help-plugin/pull/37 (MPH-183)
> - Note that to make the help plugin work we had to do some ugly
> reflection in order to find the correct methods and instance variables. If
> we merge core and update core dependency in the help plugin, we should be
> able to remove this entirely and make use of the actual methods.
>
> Current challenges we face
> - We can't integration test it properly (yet), as core does not (and
> probably should not) have the new help plugin code base. The help plugin
> requires core to update before we can integration test it in that project.
> We also probably require reflection if we were to test it in the
> integration test repository for these reasons.
> - We are unaware of any other methods to perhaps make the code cleaner,
> more maintainable or more readable as it is located in quite a complex part
> of maven.
>
> We would like to gather some input on the current state.
> We would appreciate some early code reviews and your thoughts in order to
> bring it to maven core.
>
> Sincerely,
>
> Giovanni van der Schelde & Juul Hobert
>
>
>
--
Met vriendelijke groet,
Giovanni van der Schelde