*/
public MavenCoordinates MavenCoordinates_parse(String artifact) {
String[] pieces = artifact.split(":");
if (pieces.length==3) {
//e.g: org.springframework:spring-core:4.0.0.RC1
return new MavenCoordinates(intern(pieces[0]), intern(pieces[1]), intern(pieces[2]));
} else if (pieces.length==4) {
//e.g: org.springframework:spring-core:jar:4.0.0.RC1
String type = pieces[2];
if ("jar".equals(type)) {
return new MavenCoordinates(intern(pieces[0]), intern(pieces[1]), intern(pieces[3]));
}
}
throw new IllegalArgumentException("Unsupported artifact string: '"+artifact+"'");
}