String (Artifact artifact) { ArtifactHandler handler = artifact.getArtifactHandler(); String result = null; if (handler != null) result = handler.getExtension(); if (result == null) result = artifact.getType(); return result; }