compat/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/relocation/UserPropertiesArtifactRelocationSource.java [160:207]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        if (relocationsEntries == null) {
            return null;
        }
        String[] entries = relocationsEntries.split(",");
        try (Stream<String> lines = Arrays.stream(entries)) {
            List<Relocation> relocationList = lines.filter(
                            l -> l != null && !l.trim().isEmpty())
                    .map(l -> {
                        boolean global;
                        String splitExpr;
                        if (l.contains(">>")) {
                            global = true;
                            splitExpr = ">>";
                        } else if (l.contains(">")) {
                            global = false;
                            splitExpr = ">";
                        } else {
                            throw new IllegalArgumentException("Unrecognized entry: " + l);
                        }
                        String[] parts = l.split(splitExpr);
                        if (parts.length < 1) {
                            throw new IllegalArgumentException("Unrecognized entry: " + l);
                        }
                        Artifact s = parseArtifact(parts[0]);
                        Artifact t;
                        if (parts.length > 1) {
                            t = parseArtifact(parts[1]);
                        } else {
                            t = SENTINEL;
                        }
                        return new Relocation(global, s, t);
                    })
                    .collect(Collectors.toList());
            LOGGER.info("Parsed {} user relocations", relocationList.size());
            return new Relocations(relocationList);
        }
    }

    private static Artifact parseArtifact(String coords) {
        Artifact s;
        String[] parts = coords.split(":");
        s = switch (parts.length) {
            case 3 -> new DefaultArtifact(parts[0], parts[1], "*", "*", parts[2]);
            case 4 -> new DefaultArtifact(parts[0], parts[1], "*", parts[2], parts[3]);
            case 5 -> new DefaultArtifact(parts[0], parts[1], parts[2], parts[3], parts[4]);
            default -> throw new IllegalArgumentException("Bad artifact coordinates " + coords
                    + ", expected format is <groupId>:<artifactId>[:<extension>[:<classifier>]]:<version>");};
        return s;
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



impl/maven-impl/src/main/java/org/apache/maven/impl/resolver/relocation/UserPropertiesArtifactRelocationSource.java [156:203]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        if (relocationsEntries == null) {
            return null;
        }
        String[] entries = relocationsEntries.split(",");
        try (Stream<String> lines = Arrays.stream(entries)) {
            List<Relocation> relocationList = lines.filter(
                            l -> l != null && !l.trim().isEmpty())
                    .map(l -> {
                        boolean global;
                        String splitExpr;
                        if (l.contains(">>")) {
                            global = true;
                            splitExpr = ">>";
                        } else if (l.contains(">")) {
                            global = false;
                            splitExpr = ">";
                        } else {
                            throw new IllegalArgumentException("Unrecognized entry: " + l);
                        }
                        String[] parts = l.split(splitExpr);
                        if (parts.length < 1) {
                            throw new IllegalArgumentException("Unrecognized entry: " + l);
                        }
                        Artifact s = parseArtifact(parts[0]);
                        Artifact t;
                        if (parts.length > 1) {
                            t = parseArtifact(parts[1]);
                        } else {
                            t = SENTINEL;
                        }
                        return new Relocation(global, s, t);
                    })
                    .collect(Collectors.toList());
            LOGGER.info("Parsed {} user relocations", relocationList.size());
            return new Relocations(relocationList);
        }
    }

    private static Artifact parseArtifact(String coords) {
        Artifact s;
        String[] parts = coords.split(":");
        s = switch (parts.length) {
            case 3 -> new DefaultArtifact(parts[0], parts[1], "*", "*", parts[2]);
            case 4 -> new DefaultArtifact(parts[0], parts[1], "*", parts[2], parts[3]);
            case 5 -> new DefaultArtifact(parts[0], parts[1], parts[2], parts[3], parts[4]);
            default -> throw new IllegalArgumentException("Bad artifact coordinates " + coords
                    + ", expected format is <groupId>:<artifactId>[:<extension>[:<classifier>]]:<version>");};
        return s;
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



