Summary
The bundle descriptor is validated with StringUtils.split (which collapses empty segments) but parsed later with String.split(":") (which preserves them), so certain malformed descriptors pass validation and then fail confusingly during resolution.
src/main/java/org/apache/maven/plugin/resources/remote/AbstractProcessRemoteResourcesMojo.java
validate(): StringUtils.split(artifactDescriptor, ":") — line 728, empty tokens removed, so group:artifact::type counts as 3 tokens and passes the length check (3..5).
downloadBundles(): artifactDescriptor.split(":") — line 822, empty tokens kept, so group:artifact::type yields [group, artifact, "", type] and resolution proceeds with an empty version.
Impact
A descriptor such as group:artifact::type (missing version) passes validate() with a clear message never shown, then fails later with a confusing version/resolution error. Also in the reactor lookup, s[0].equals(p.getGroupId()) can throw if p.getGroupId() is null.
Suggested fix
Use the same splitting logic in both methods (and ideally a single parser that also checks that groupId/artifactId/version are non-empty), and null-guard the reactor comparison.
Summary
The bundle descriptor is validated with
StringUtils.split(which collapses empty segments) but parsed later withString.split(":")(which preserves them), so certain malformed descriptors pass validation and then fail confusingly during resolution.src/main/java/org/apache/maven/plugin/resources/remote/AbstractProcessRemoteResourcesMojo.javavalidate():StringUtils.split(artifactDescriptor, ":")— line 728, empty tokens removed, sogroup:artifact::typecounts as 3 tokens and passes the length check (3..5).downloadBundles():artifactDescriptor.split(":")— line 822, empty tokens kept, sogroup:artifact::typeyields[group, artifact, "", type]and resolution proceeds with an empty version.Impact
A descriptor such as
group:artifact::type(missing version) passesvalidate()with a clear message never shown, then fails later with a confusing version/resolution error. Also in the reactor lookup,s[0].equals(p.getGroupId())can throw ifp.getGroupId()is null.Suggested fix
Use the same splitting logic in both methods (and ideally a single parser that also checks that groupId/artifactId/version are non-empty), and null-guard the reactor comparison.