use of org.xwiki.extension.InstallException in project xwiki-platform by xwiki.
the class XarExtensionHandler method installInternal.
private void installInternal(LocalExtension newLocalExtension, String wiki, Request request) throws InstallException {
try {
initializePagesIndex(request);
initJobPackageConfiguration(request, true);
} catch (Exception e) {
throw new InstallException("Failed to initialize extension plan index", e);
}
// import xar into wiki (add new version when the page already exists)
PackageConfiguration configuration = createPackageConfiguration(newLocalExtension, request, wiki);
try {
this.packager.importXAR("Install extension [" + newLocalExtension + "]", new File(newLocalExtension.getFile().getAbsolutePath()), configuration);
} catch (Exception e) {
throw new InstallException("Failed to import xar for extension [" + newLocalExtension + "]", e);
}
}
Aggregations