} catch (MalformedURLException e) {
throw new AssertionError("Could not convert URL to a jar: url");
}
impl.setClassLoader(new CompositeClassLoader(new URL[]{jarUrl}, deploymentContext.getClassLoader()));
} else if (artifactRepository != null && group != null && version != null) {
Artifact artifact = new Artifact();
artifact.setGroup(group);
artifact.setName(name);
artifact.setVersion(version);
artifact.setType("jar");
artifactRepository.resolve(artifact);
if (artifact.getUrl() == null) {
MissingResourceException mre = new MissingResourceException(artifact.toString());
mre.setIdentifier(name);
throw mre;
}
try {
impl.setScdlLocation(new URL("jar:" + artifact.getUrl() + "!/META-INF/sca/default.scdl"));
} catch (MalformedURLException e) {
throw new AssertionError(e);
}
Set<URL> artifactURLs = artifact.getUrls();
URL[] urls = new URL[artifactURLs.size()];
int i = 0;
for (URL artifactURL : artifactURLs) {
urls[i++] = artifactURL;
}