elharo opened a new pull request, #286: URL: https://github.com/apache/maven-remote-resources-plugin/pull/286
Fixes https://github.com/apache/maven-remote-resources-plugin/issues/272 ### Problem `validate()` split bundle descriptors with `StringUtils.split(artifactDescriptor, ":")`, which collapses empty segments, while `downloadBundles()` used `artifactDescriptor.split(":")`, which preserves them. So a malformed descriptor such as `group:artifact::type` (missing version) passed `validate()` and then failed later with a confusing resolution error, never showing the clear validation message. ### Fix `validate()` now uses the same `split(":")` logic as `downloadBundles()` and additionally rejects descriptors where groupId, artifactId or version is empty (e.g. a missing segment). Malformed descriptors now fail fast with the existing, clear "resource bundle configured must specify..." message. The reactor lookup in `downloadBundles()` compares with a non-null receiver (`s[0].equals(p.getGroupId())`), so it is already null-safe. ### Test New unit test `testValidateRejectsDescriptorWithEmptySegment`: configures a `org.example:dep::jar` descriptor and asserts `validate()` throws the validation error. Verified the test fails without the fix (`validate()` let the descriptor through) and passes with it. Full `mvn verify -Prun-its` (unit + failsafe ITs, spotless/checkstyle/RAT) passes. -- 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]
