@Override public void run() { try { LOG.info("Installing features: {}", featuresToInstall); m_featuresService.installFeatures(featuresToInstall, EnumSet.noneOf(Option.class)); } catch (Exception e) { LOG.error("Failed to install one or more features.", e); } } });
public void installAssertAndUninstallFeatures(String... feature) throws Exception { boolean success = false; Set<String> features = new HashSet<>(Arrays.asList(feature)); try { System.out.println("Installing " + features); featureService.installFeatures(features, NO_AUTO_REFRESH); for (String curFeature : feature) { assertFeatureInstalled(curFeature); } success = true; } finally { System.out.println("Uninstalling " + features); try { featureService.uninstallFeatures(features, NO_AUTO_REFRESH); } catch (Exception e) { if (success) { throw e; } } } }
private synchronized void installFeatures(FeaturesService featuresService, Set<String> addons) { try { logger.debug("Installing '{}'", StringUtils.join(addons, ", ")); featuresService.installFeatures(addons, EnumSet.of(FeaturesService.Option.Upgrade, FeaturesService.Option.NoFailOnFeatureNotFound)); try {
try { LOG.info("Installing features: {}", featuresToInstall); featuresService.installFeatures(featuresToInstall, EnumSet.noneOf(FeaturesService.Option.class)); } catch (Exception e) { LOG.error("Failed to install one or more features.", e);
try { LOG.info("Installing features: {}", featuresToInstall); m_featuresService.installFeatures(featuresToInstall, EnumSet.noneOf(Option.class)); } catch (Exception e) { LOG.error("Failed to install one or more features.", e);
protected void doExecute(FeaturesService admin) throws Exception { addOption(FeaturesService.Option.Simulate, simulate); addOption(FeaturesService.Option.NoAutoStartBundles, noStart); addOption(FeaturesService.Option.NoAutoRefreshBundles, noRefresh); addOption(FeaturesService.Option.NoAutoManageBundles, noManage); addOption(FeaturesService.Option.Verbose, verbose); addOption(FeaturesService.Option.Upgrade, upgrade); addOption(FeaturesService.Option.DisplayFeaturesWiring, featuresWiring); addOption(FeaturesService.Option.DisplayAllWiring, allWiring); admin.setResolutionOutputFile(outputFile); admin.installFeatures(new HashSet<>(features), region, options); } }
protected void doExecute(FeaturesService admin) throws Exception { addOption(FeaturesService.Option.Simulate, simulate); addOption(FeaturesService.Option.NoAutoStartBundles, noStart); addOption(FeaturesService.Option.NoAutoRefreshBundles, noRefresh); addOption(FeaturesService.Option.NoAutoManageBundles, noManage); addOption(FeaturesService.Option.Verbose, verbose); addOption(FeaturesService.Option.Upgrade, upgrade); addOption(FeaturesService.Option.DisplayFeaturesWiring, featuresWiring); addOption(FeaturesService.Option.DisplayAllWiring, allWiring); admin.setResolutionOutputFile(outputFile); admin.installFeatures(new HashSet<>(features), region, options); } }