1 package org_scala_tools_maven_dependency; 2 3 import org.apache.maven.artifact.Artifact; 4 5 /** 6 * Utilities for making Error messages. 7 */ 8 public class StringUtil { 9 10 /** 11 * Creates a human-readable string for an artifact. 12 * @param artifact 13 * @return 14 */ 15 public static String makeArtifactNameString(Artifact artifact) { 16 //TODO - Handle version ranges... 17 if(artifact == null) { 18 return "<null artifact>"; 19 } 20 return artifact.getGroupId() + ":" + artifact.getArtifactId() + ":" + artifact.getVersion(); 21 } 22 }