URI uri = _getURI(pkgOrPath);
pkg = parent_repo.installPackage(uri, force, interact);
repo.reportAction(ExistRepository.Action.INSTALL, pkg.getName());
} else {
// .xar is stored as a binary resource
BinaryDocument doc = null;
try {
doc = _getDocument(pkgOrPath);
File file = ((NativeBroker)context.getBroker()).getCollectionBinaryFileFsPath(doc.getURI());
LOG.debug("Installing file: " + file.getAbsolutePath());
pkg = parent_repo.installPackage(file, force, interact);
repo.reportAction(ExistRepository.Action.INSTALL, pkg.getName());
} finally {
if (doc != null)
doc.getUpdateLock().release(Lock.READ_LOCK);
}
}
ExistPkgInfo info = (ExistPkgInfo) pkg.getInfo("exist");
if (info != null && !info.getJars().isEmpty())
ClasspathHelper.updateClasspath(context.getBroker().getBrokerPool(), pkg);