new ClassContext(new StandardClassLoaderHeiarchy());
Thread.currentThread().setContextClassLoader(context);
// Check for a specified or default pom.xml file
IVirtualFile pomFile = this.locatePOMDescriptor();
if (pomFile != null && pomFile.isExists()) {
ProjectObjectModel pom = ProjectObjectModel.parse(resolver, pomFile);
ProjectObjectModel resolved = (ProjectObjectModel) resolver.getDescriptor(pom);
if (resolved != null) {
pom = resolved;
} else {
log.info("Unresolvable pom.xml used for bootstrapping: " + pom);
}
MavenRepositoryUtil.addProjectMainTarget(context.getNonPackageSources(), pom, pomFile.getOwner());
context.setPool(pool = MavenRepositoryUtil.createFrom(resolver, pom, pom.getDependencies()));
Thread.currentThread().setContextClassLoader(context);
} else {
log.warn("Could not find: " + pomFile.getPath().toString("/"));
}
new ClassPackageContext(resolver, context.getPool()).setGlobal();