ArtifacIdUtils { public static String toVersionlessId( Artifact artifact ) { String id = null; if ( artifact != null ) { id = toVersionlessId( artifact.getGroupId(), artifact.getArtifactId(), artifact.getExtension(), artifact.getClassifier() ); } return id; } private  ArtifacIdUtils(); static String toId( Artifact artifact ); static String toId( String groupId, String artifactId, String extension, String classifier, String version ); static String toBaseId( Artifact artifact ); static String toVersionlessId( Artifact artifact ); static String toVersionlessId( String groupId, String artifactId, String extension, String classifier );  }
@Test public void testToVersionlessIdStrings() { assertEquals( "::", ArtifacIdUtils.toVersionlessId( null, null, null, null ) ); assertEquals( "gid:aid:ext", ArtifacIdUtils.toVersionlessId( "gid", "aid", "ext", "" ) ); assertEquals( "gid:aid:ext:cls", ArtifacIdUtils.toVersionlessId( "gid", "aid", "ext", "cls" ) ); }