* under the License.
*/
+import org.apache.commons.lang.StringUtils;
import org.apache.maven.archiva.model.ArchivaProjectModel;
/**
return toKey( model.getGroupId(), model.getArtifactId(), model.getVersion() );
}
+ public static String toKey( ArtifactReference ref )
+ {
+ StringBuffer key = new StringBuffer();
+
+ key.append( ref.getGroupId() ).append( ":" );
+ key.append( ref.getArtifactId() ).append( ":" );
+ key.append( ref.getVersion() ).append( ":" );
+ key.append( StringUtils.defaultString( ref.getClassifier() ) ).append( ":" );
+ key.append( ref.getType() );
+
+ return key.toString();
+ }
+
+ public static String toKey( ProjectReference ref )
+ {
+ StringBuffer key = new StringBuffer();
+
+ key.append( ref.getGroupId() ).append( ":" );
+ key.append( ref.getArtifactId() );
+
+ return key.toString();
+ }
+
public static String toKey( String groupId, String artifactId, String version )
{
StringBuffer key = new StringBuffer();
return key.toString();
}
+
+ public static String toKey( VersionedReference ref )
+ {
+ StringBuffer key = new StringBuffer();
+
+ key.append( ref.getGroupId() ).append( ":" );
+ key.append( ref.getArtifactId() ).append( ":" );
+ key.append( ref.getVersion() );
+
+ return key.toString();
+ }
}