maven icon indicating copy to clipboard operation
maven copied to clipboard

[MNG-6357] Dependency order should be nearest first

Open belingueres opened this issue 6 years ago • 5 comments

Save the artifacts temporarily in a Map ordered by tree depth, and only after finishing iterating over the dependency tree are the artifacts added to the collection in depth order.

Note: IT-core test needs to be added replacing IT 3813 which does not apply any longer for a maven version containing this change.

Following this checklist to help us incorporate your contribution quickly and easily:

  • [x] Make sure there is a JIRA issue filed for the change (usually before you start working on it). Trivial changes like typos do not require a JIRA issue. Your pull request should address just this issue, without pulling in other changes.
  • [x] Each commit in the pull request should have a meaningful subject line and body.
  • [x] Format the pull request title like [MNG-XXX] - Fixes bug in ApproximateQuantiles, where you replace MNG-XXX with the appropriate JIRA issue. Best practice is to use the JIRA issue title in the pull request title and in the first line of the commit message.
  • [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • [x] Run mvn clean verify to make sure basic checks pass. A more thorough check will be performed on your pull request automatically.
  • [] You have run the Core IT successfully.

If your pull request is about ~20 lines of code you don't need to sign an Individual Contributor License Agreement if you are unsure please ask on the developers list.

To make clear that you license your contribution under the Apache License Version 2.0, January 2004 you have to acknowledge this by using the following check-box.

belingueres avatar Aug 31 '19 15:08 belingueres

Please review this patch. Tested it and seems to solve:

  • MCOMPILER-317
  • https://github.com/mojohaus/exec-maven-plugin/issues/91

belingueres avatar Aug 31 '19 15:08 belingueres

Looks good at first sight. This code deserves a unittest, that's better than relying on plugins. I don't think the unittest is too hard to write. I noticed you're not using diamond operators. Looking at the code it should be written with the new Map methods, but that requires Java 8. The moment that Maven will require Java 8 is getting closer

rfscholte avatar Aug 31 '19 15:08 rfscholte

@rfscholte We have more serious problems that introducing fancy Java 8 features.

michael-o avatar Aug 31 '19 18:08 michael-o

The merge conflict is pretty straight-forward to fix (it's a simple collision in the pom.xml). Would love to see this go in! Happy to provide a new PR if that's preferable

jmhodges avatar Dec 29 '21 05:12 jmhodges

Per https://maven.apache.org/download.cgi Maven 4.x requires JDK 8. What is needed to move this PR forward?

cowwoc avatar Feb 18 '23 18:02 cowwoc