public static ArtifactId fromStringValue(String stringValue) {
        var parts = stringValue.trim().split(":");
        if (parts.length == 2 || parts.length == 3) {
            return new ArtifactId(parts[0], parts[1]);
        }
        throw new IllegalArgumentException(
                "An artifact should be represented in the format 'groupId:ArtifactId[:version]', not: " + stringValue);
    }
Helper class to work with artifacts, where version does not matter.

@author gjoranv
bundle-plugin/src/main/java/com/yahoo/container/plugin/util/ArtifactId.java