SimpleArtifactRef extends SimpleProjectVersionRef implements Serializable, ArtifactRef { public static SimpleArtifactRef parse( final String spec ) { final String[] parts = spec.split( ":" ); if ( parts.length < 3 || isEmpty( parts[0] ) || isEmpty( parts[1] ) || isEmpty( parts[2] ) ) { throw new InvalidRefException( "SimpleArtifactRef must contain AT LEAST non-empty groupId, artifactId, AND version. (Given: '" + spec + "')" ); } final String g = parts[0]; final String a = parts[1]; String v = parts[2]; String t = "pom"; String c = null; if ( parts.length > 3 ) { t = v; v = parts[3]; if ( parts.length > 4 ) { c = parts[4]; } } return new SimpleArtifactRef( g, a, v, t, c ); } SimpleArtifactRef( final String groupId, final String artifactId, final VersionSpec version,
                              final String type, final String classifier );  SimpleArtifactRef( final ProjectVersionRef ref, final String type, final String classifier );  SimpleArtifactRef( final ProjectVersionRef ref, final TypeAndClassifier tc );  SimpleArtifactRef( final String groupId, final String artifactId, final String versionSpec,
                              final String type, final String classifier ); <T extends ArtifactRef> SimpleArtifactRef( final ArtifactRef ref ); @Override String toString(); static SimpleArtifactRef parse( final String spec ); @Override SimpleArtifactRef newRef( final String groupId, final String artifactId, final SingleVersion version ); @Override String getType(); @Override String getClassifier(); @Override TypeAndClassifier getTypeAndClassifier(); @Override int hashCode(); @Override boolean equals( final Object obj ); @Override boolean versionlessEquals( final ProjectVersionRef other );  }
@Test( expected = InvalidRefException.class ) public void failParsingGA() { SimpleArtifactRef.parse( "org.foo:bar" ); }