arturobernalg opened a new pull request, #2221: URL: https://github.com/apache/maven-resolver/pull/2221
Backport of #2209 (e9cd7f33 on master) to maven-resolver-1.9.x. `DefaultArtifactResolver` accepts a `VersionResult` whose version is null or blank, which happens whenever the request's `Artifact` has no version at all (#1269 / MRESOLVER-597). It keeps going, and the failure only surfaces much later as an opaque `IllegalArgumentException` from the local repository path composer, with no mention of the real cause. `DefaultArtifactResolver#resolve` now rejects a null or blank resolved version right after it is applied to the artifact, with an `ArtifactNotFoundException` that names the artifact and says its version is missing or blank. The production fix is identical to master's. The test is ported to this module's JUnit 4 style (master has since moved to JUnit 5) since `DefaultArtifactResolverTest` here still uses `org.junit.Test`/`org.junit.Assert`. Both new tests fail without the production change and pass with it. Full `maven-resolver-impl` module (589 tests), `checkstyle:check` and `spotless:check` are green. - [x] I hereby declare this contribution to be licensed under the Apache License Version 2.0, January 2004 - [x] I hereby declare that I have filed an Apache Individual Contributor License Agreement. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
