return md;
}
public static DefaultArtifact buildArtifact(ModuleRevisionId mrid, URI baseUri, URI uri,
String type, String ext, String packaging) {
DefaultArtifact artifact;
if ("ivy".equals(uri.getScheme())) {
artifact = decodeIvyURI(uri);
} else {
if (!uri.isAbsolute()) {
uri = baseUri.resolve(uri);
}
Map<String, String> extraAtt = new HashMap<String, String>();
if (packaging != null) {
extraAtt.put("packaging", packaging);
}
try {
artifact = new DefaultArtifact(mrid, null, mrid.getName(), type, ext, new URL(
uri.toString()), extraAtt);
} catch (MalformedURLException e) {
throw new RuntimeException("Unable to make the uri into the url", e);
}
}