Closed tharakadesilva closed 1 week ago
I am yet to add any tests, will do that once I've received the go-ahead on the strategy.
@cheister for the tests, I am thinking of something like this:
MavenResolverTest.java
file.MavenRepo.create()
.Do you have any thoughts on this?
Do you have any thoughts on this?
That sounds good to me
With the current code, if multiple BOMs have the same coords, the coordinates would be resolved through all the BOMs when we try to resolve the artifact versions. ~When two or more versions were present, Maven resolver would resort to the lower version (IIUC, default Maven behavior).~ The issue was that the set that was created was not ordered, so it would not give priority to the first defined BOM.
~With these changes, we will ignore the artifact if it was previously found, thus giving priority to the BOM that was defined first.~
We now have a
LinkedHashSet
that will maintain the ordering so that the BOMs will be given priority based on the order they were defined.Closes https://github.com/bazelbuild/rules_jvm_external/issues/1146.