if (classLoader == null) {
String repo = context.getMavenRepoLocal();
List urls = new ArrayList();
for (Iterator iterator = pluginArtifacts.iterator(); iterator.hasNext();) {
Artifact artifact = (Artifact) iterator.next();
Dependency dependency = artifact.getDependency();
if ("true".equals(dependency.getProperty(PACKAGING_CLASSPATH_PROPERTY))) {
String urlString = artifact.getUrlPath();
URL url = new File(repo + urlString).toURL();
urls.add(url);
}
}
boolean found = false;
for (Iterator iterator = artifacts.iterator(); iterator.hasNext();) {
Artifact artifact = (Artifact) iterator.next();
Dependency dependency = artifact.getDependency();
if ("geronimo".equals(dependency.getGroupId())
&& "geronimo-packaging-plugin".equals(dependency.getArtifactId())
&& "plugin".equals(dependency.getType())) {
String urlString = artifact.getUrlPath();
URL url = new File(repo + urlString).toURL();
urls.add(url);
found = true;
}