Repository navigation
Order the license summary by name, GAV or license - #730
Merged
Merged
Conversation
Ordering was limited to sortByGroupIdAndArtifactId, which is now deprecated in favour of orderBy. Do not drop it: it stays the documented spelling for anyone whose build sets it, and it still wins when orderBy is left at none. The download-licenses-basic IT kept two expected files because the two dependencies could come out in either order; ordering by dependencyName puts them in the reverse of their resolution order, so one file is enough and the IT now fails if the property is ignored. Co-authored-by: Jan-Hendrik Diederich <1955253+Master-Code-Programmer@users.noreply.github.com>
slachiewicz
marked this pull request as ready for review
August 23, 2026 09:27
This was referenced Aug 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds an
orderByparameter todownload-licensesandaggregate-download-licenses, with four values:none,dependencyName,dependencyGavandlicenseName.sortByGroupIdAndArtifactIdis deprecated in favour of it, keeps working, and still applies whenorderByis left atnone.Reimplemented from #622 against current master, at @Master-Code-Programmer's design, with two changes. The options are flat mojo parameters rather than a nested
<dataFormatting>element, so-Dlicense.orderBy=...works and no new public config class enters the plugin API.dependencyPluginIdis renamed todependencyGav, which is what it orders by; nothing depends on the old name because that PR was never released. ThelicenseMatchorder needs the license classification lists and follows separately.Every comparator falls back to group id, artifact id and version, so the output is stable when dependencies tie, and
dependencyNamefalls back to the artifact id rather than failing whenextendedInfois off.No new ITs.
download-licenses-configuredruns one of its six executions throughorderByand the other five throughsortByGroupIdAndArtifactId, held against the same expected files, so the two paths are proven to agree.download-licenses-basickept two expected files because its two dependencies could come out in either order; it now orders bydependencyName, which is the reverse of their resolution order, so one file is enough and the IT fails if the property is ignored.Verified:
mvn verify -Prun-its -Dinvoker.test=download-licenses-basic,download-licenses-configuredpasses, and both fail as expected when the ordering is taken back out.download-licenses-forcefails on master already, unrelated to this change: opensource.org now serves an HTML page where the IT expects the LGPL text.This change was created with AI assistance.