# HG changeset patch # User Omair Majid # Date 1374688573 14400 # Node ID cb2842943f60dbaca77c6940e85f1acb49767d8a # Parent 468d91f69d6721fe3658f77d75ce410d46a2c546 Use SymblicName and Version in thermostat-plugin.xml Reviewed-by: neugens, jerboaa Review-thread: http://icedtea.classpath.org/pipermail/thermostat/2013-July/007583.html diff -r 468d91f69d67 -r cb2842943f60 distribution/docs/thermostat-plugin.xsd --- a/distribution/docs/thermostat-plugin.xsd Fri Jul 19 15:35:58 2013 +0200 +++ b/distribution/docs/thermostat-plugin.xsd Wed Jul 24 13:56:13 2013 -0400 @@ -7,8 +7,8 @@ - - + + @@ -53,13 +53,6 @@ - - - - Dependencies: depend on other libraries. - - - @@ -75,13 +68,6 @@ - - - - Dependencies: depend on other commands. - - - @@ -169,6 +155,11 @@ + + + Specifies OSGi bundles + + @@ -176,14 +167,30 @@ - - + + + + Specifies an OSGi bundle + + - + + + + The 'Bundle-SymbolicName' of the OSGi bundle + + + + + + + The 'Bundle-Version' of the OSGi bundle + + + - diff -r 468d91f69d67 -r cb2842943f60 distribution/pom.xml --- a/distribution/pom.xml Fri Jul 19 15:35:58 2013 +0200 +++ b/distribution/pom.xml Wed Jul 24 13:56:13 2013 -0400 @@ -261,7 +261,7 @@ + resource="${project.build.directory}/libs/commons-logging-1.1.3.jar" /> gui - thermostat-host-cpu-common-${project.version}.jar - thermostat-host-cpu-client-core-${project.version}.jar - thermostat-host-cpu-client-swing-${project.version}.jar + com.redhat.thermostat.host.cpu.common${project.version} + com.redhat.thermostat.host.cpu.client.core${project.version} + com.redhat.thermostat.host.cpu.client.swing${project.version} agent - thermostat-host-cpu-common-${project.version}.jar - thermostat-host-cpu-agent-${project.version}.jar + com.redhat.thermostat.host.cpu.common${project.version} + com.redhat.thermostat.host.cpu.agent${project.version} webservice - thermostat-host-cpu-common-${project.version}.jar + com.redhat.thermostat.host.cpu.common${project.version} diff -r 468d91f69d67 -r cb2842943f60 host-memory/distribution/thermostat-plugin.xml --- a/host-memory/distribution/thermostat-plugin.xml Fri Jul 19 15:35:58 2013 +0200 +++ b/host-memory/distribution/thermostat-plugin.xml Wed Jul 24 13:56:13 2013 -0400 @@ -43,23 +43,23 @@ gui - thermostat-host-memory-common-${project.version}.jar - thermostat-host-memory-client-core-${project.version}.jar - thermostat-host-memory-client-swing-${project.version}.jar + com.redhat.thermostat.host.memory.common${project.version} + com.redhat.thermostat.host.memory.client.core${project.version} + com.redhat.thermostat.host.memory.client.swing${project.version} agent - thermostat-host-memory-common-${project.version}.jar - thermostat-host-memory-agent-${project.version}.jar + com.redhat.thermostat.host.memory.common${project.version} + com.redhat.thermostat.host.memory.agent${project.version} webservice - thermostat-host-memory-common-${project.version}.jar + com.redhat.thermostat.host.memory.common${project.version} diff -r 468d91f69d67 -r cb2842943f60 host-overview/distribution/thermostat-plugin.xml --- a/host-overview/distribution/thermostat-plugin.xml Fri Jul 19 15:35:58 2013 +0200 +++ b/host-overview/distribution/thermostat-plugin.xml Wed Jul 24 13:56:13 2013 -0400 @@ -43,8 +43,8 @@ gui - thermostat-host-overview-client-core-${project.version}.jar - thermostat-host-overview-client-swing-${project.version}.jar + com.redhat.thermostat.host.overview.client.core${project.version} + com.redhat.thermostat.host.overview.client.swing${project.version} diff -r 468d91f69d67 -r cb2842943f60 launcher/src/main/java/com/redhat/thermostat/launcher/BundleInformation.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/launcher/src/main/java/com/redhat/thermostat/launcher/BundleInformation.java Wed Jul 24 13:56:13 2013 -0400 @@ -0,0 +1,88 @@ +/* + * Copyright 2012, 2013 Red Hat, Inc. + * + * This file is part of Thermostat. + * + * Thermostat is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published + * by the Free Software Foundation; either version 2, or (at your + * option) any later version. + * + * Thermostat is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Thermostat; see the file COPYING. If not see + * . + * + * Linking this code with other modules is making a combined work + * based on this code. Thus, the terms and conditions of the GNU + * General Public License cover the whole combination. + * + * As a special exception, the copyright holders of this code give + * you permission to link this code with independent modules to + * produce an executable, regardless of the license terms of these + * independent modules, and to copy and distribute the resulting + * executable under terms of your choice, provided that you also + * meet, for each linked independent module, the terms and conditions + * of the license of that module. An independent module is a module + * which is not derived from or based on this code. If you modify + * this code, you may extend this exception to your version of the + * library, but you are not obligated to do so. If you do not wish + * to do so, delete this exception statement from your version. + */ + +package com.redhat.thermostat.launcher; + +import java.util.Objects; + +/** + * Represents basic meta-data about a bundle, including the + * {@code Bundle-SymbolicName} and {@code Bundle-Version}. + */ +public class BundleInformation { + private final String name; + private final String version; + + /** + * @param name the {@code Bundle-SymbolicName} of the bundle + * @param version the {@code Bundle-Version} of the bundle + */ + public BundleInformation(final String name, final String version) { + this.name = name; + this.version = version; + } + + public String getName() { + return name; + } + + public String getVersion() { + return version; + } + + @Override + public String toString() { + return "Bundle[" + name + "=" + version + "]"; + } + + @Override + public int hashCode() { + return Objects.hash(name, version); + } + + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + BundleInformation other = (BundleInformation) obj; + return Objects.equals(name, other.getName()) && Objects.equals(version, other.getVersion()); + } + +} \ No newline at end of file diff -r 468d91f69d67 -r cb2842943f60 launcher/src/main/java/com/redhat/thermostat/launcher/BundleManager.java --- a/launcher/src/main/java/com/redhat/thermostat/launcher/BundleManager.java Fri Jul 19 15:35:58 2013 +0200 +++ b/launcher/src/main/java/com/redhat/thermostat/launcher/BundleManager.java Wed Jul 24 13:56:13 2013 -0400 @@ -48,13 +48,26 @@ /** * A Service that provides features to load bundles for given command names. + *

+ * It can install bundles in to the current runtime and start them. It can find + * bundles by file paths or by bundle meta-data. */ @Service public abstract class BundleManager { public abstract void setPrintOSGiInfo(boolean printOSGiInfo); - public abstract void addBundles(List dependencies) throws BundleException, IOException; + /** + * Load and start bundles using the metadata about a bundle. + */ + public abstract void loadBundlesByName(List bundles) throws BundleException, IOException; + + /** + * Load and start bundles using file locations + * + * @param uriPaths a list of URI strings that represent on-disk locations of bundles + */ + public abstract void loadBundlesByPath(List uriPaths) throws BundleException, IOException; public static void preLoadBundles(Framework framework, List bundleLocations, boolean printOSGiInfo) throws BundleException { diff -r 468d91f69d67 -r cb2842943f60 launcher/src/main/java/com/redhat/thermostat/launcher/internal/BasicCommandInfo.java --- a/launcher/src/main/java/com/redhat/thermostat/launcher/internal/BasicCommandInfo.java Fri Jul 19 15:35:58 2013 +0200 +++ b/launcher/src/main/java/com/redhat/thermostat/launcher/internal/BasicCommandInfo.java Wed Jul 24 13:56:13 2013 -0400 @@ -36,11 +36,14 @@ package com.redhat.thermostat.launcher.internal; +import java.util.Collections; import java.util.List; import java.util.Set; import org.apache.commons.cli.Options; +import com.redhat.thermostat.launcher.BundleInformation; + public class BasicCommandInfo implements CommandInfo { private final String name; @@ -49,6 +52,7 @@ private final Options options; private final Set environments; private final List resources; + private final List bundles; public BasicCommandInfo(String name, String description, String usage, Options options, Set environments, List resources) { this.name = name; @@ -57,6 +61,17 @@ this.options = options; this.environments = environments; this.resources = resources; + this.bundles = Collections.emptyList(); + } + + public BasicCommandInfo(String name, String description, String usage, Options options, Set environments, List resources, List bundles) { + this.name = name; + this.description = description; + this.usage = usage; + this.options = options; + this.environments = environments; + this.resources = resources; + this.bundles = bundles; } @Override @@ -90,7 +105,12 @@ } @Override + public List getBundles() { + return bundles; + } + + @Override public String toString() { - return String.format("%s (description='%s', dependencies='%s')", name, description, resources.toString()); + return String.format("%s (description='%s', dependencies='%s', bundles='%s')", name, description, resources.toString(), bundles.toString()); } } diff -r 468d91f69d67 -r cb2842943f60 launcher/src/main/java/com/redhat/thermostat/launcher/internal/BuiltInCommandInfo.java --- a/launcher/src/main/java/com/redhat/thermostat/launcher/internal/BuiltInCommandInfo.java Fri Jul 19 15:35:58 2013 +0200 +++ b/launcher/src/main/java/com/redhat/thermostat/launcher/internal/BuiltInCommandInfo.java Wed Jul 24 13:56:13 2013 -0400 @@ -40,6 +40,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; +import java.util.Collections; import java.util.EnumSet; import java.util.List; import java.util.Map.Entry; @@ -52,6 +53,7 @@ import org.apache.commons.cli.Options; import com.redhat.thermostat.common.utils.LoggingUtils; +import com.redhat.thermostat.launcher.BundleInformation; import com.redhat.thermostat.shared.config.InvalidConfigurationException; public class BuiltInCommandInfo implements CommandInfo { @@ -381,5 +383,10 @@ public List getDependencyResourceNames() { return dependencies; } + + @Override + public List getBundles() { + return Collections.emptyList(); + } } diff -r 468d91f69d67 -r cb2842943f60 launcher/src/main/java/com/redhat/thermostat/launcher/internal/BundleLoader.java --- a/launcher/src/main/java/com/redhat/thermostat/launcher/internal/BundleLoader.java Fri Jul 19 15:35:58 2013 +0200 +++ b/launcher/src/main/java/com/redhat/thermostat/launcher/internal/BundleLoader.java Wed Jul 24 13:56:13 2013 -0400 @@ -62,7 +62,7 @@ } public List installAndStartBundles(Framework framework, - ListbundleLocations) throws BundleException { + List bundleLocations) throws BundleException { List bundles = new ArrayList<>(); BundleContext ctx = framework.getBundleContext(); for (String location : bundleLocations) { diff -r 468d91f69d67 -r cb2842943f60 launcher/src/main/java/com/redhat/thermostat/launcher/internal/BundleManagerImpl.java --- a/launcher/src/main/java/com/redhat/thermostat/launcher/internal/BundleManagerImpl.java Fri Jul 19 15:35:58 2013 +0200 +++ b/launcher/src/main/java/com/redhat/thermostat/launcher/internal/BundleManagerImpl.java Wed Jul 24 13:56:13 2013 -0400 @@ -38,38 +38,93 @@ import java.io.FileNotFoundException; import java.io.IOException; +import java.nio.file.FileVisitResult; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.nio.file.SimpleFileVisitor; +import java.nio.file.attribute.BasicFileAttributes; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.Map.Entry; +import java.util.jar.JarFile; +import java.util.jar.Manifest; +import java.util.logging.Level; +import java.util.logging.Logger; import javax.naming.ConfigurationException; import org.osgi.framework.Bundle; +import org.osgi.framework.BundleContext; import org.osgi.framework.BundleException; +import org.osgi.framework.Constants; import org.osgi.framework.FrameworkUtil; import org.osgi.framework.launch.Framework; +import com.redhat.thermostat.common.utils.LoggingUtils; +import com.redhat.thermostat.launcher.BundleInformation; import com.redhat.thermostat.launcher.BundleManager; import com.redhat.thermostat.shared.config.Configuration; public class BundleManagerImpl extends BundleManager { - private Map loaded; + private static final Logger logger = LoggingUtils.getLogger(BundleManagerImpl.class); + + // Bundle Name and version -> path + private final Map known; private Configuration configuration; private BundleLoader loader; BundleManagerImpl(Configuration configuration) throws ConfigurationException, FileNotFoundException, IOException { - initLoadedBundles(); + known = new HashMap<>(); + this.configuration = configuration; loader = new BundleLoader(configuration.getPrintOSGiInfo()); + + scanForBundles(); } - private void initLoadedBundles() { - loaded = new HashMap<>(); - Framework framework = getFramework(this.getClass()); - for (Bundle bundle: framework.getBundleContext().getBundles()) { - loaded.put(bundle.getLocation(), bundle); + private void scanForBundles() { + long t1 = System.nanoTime(); + + try { + for (String root : new String[] { configuration.getLibRoot(), configuration.getPluginRoot() }) { + Files.walkFileTree(Paths.get(root), new SimpleFileVisitor() { + @Override + public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException { + if (file.toFile().getName().endsWith(".jar")) { + try (JarFile jf = new JarFile(file.toFile())) { + Manifest mf = jf.getManifest(); + String name = mf.getMainAttributes().getValue(Constants.BUNDLE_SYMBOLICNAME); + String version = mf.getMainAttributes().getValue(Constants.BUNDLE_VERSION); + if (name == null || version == null) { + logger.config("file " + file.toString() + " is missing osgi metadata; wont be usable for dependencies"); + } else { + known.put(new BundleInformation(name, version), file); + } + } catch (IOException e) { + logger.severe("Error in reading " + file); + // continue with other files, even if one file is broken + } + } + return FileVisitResult.CONTINUE; + } + }); + } + } catch (IOException e) { + logger.log(Level.WARNING, "Error scanning bundles for metadata", e); + } + + long t2 = System.nanoTime(); + if (configuration.getPrintOSGiInfo()) { + logger.fine("Found: " + known.size() + " bundles"); + logger.fine("Took " + (t2 -t1) + "ns"); + + for (Entry bundles : known.entrySet()) { + logger.finest(bundles.getKey().toString() + " is at " + bundles.getValue().toString()); + } } } @@ -80,24 +135,37 @@ } @Override - public void addBundles(List requiredBundles) throws BundleException, IOException { + public void loadBundlesByName(List bundles) throws BundleException, IOException { + List paths = new ArrayList<>(); + for (BundleInformation info : bundles) { + Path bundlePath = known.get(info); + if (bundlePath == null) { + logger.warning("no known bundle matching " + info.toString()); + continue; + } + paths.add(bundlePath.toFile().toURI().toString()); + } + loadBundlesByPath(paths); + } + + @Override + public void loadBundlesByPath(List requiredBundles) throws BundleException, IOException { + Framework framework = getFramework(this.getClass()); + BundleContext context = framework.getBundleContext(); + List bundlesToLoad = new ArrayList<>(); if (requiredBundles != null) { for (String resource : requiredBundles) { - if (!isBundleActive(resource)) { + if (!isBundleActive(context, resource)) { bundlesToLoad.add(resource); } } } - Framework framework = getFramework(this.getClass()); - List successBundles = loader.installAndStartBundles(framework, bundlesToLoad); - for (Bundle bundle : successBundles) { - loaded.put(bundle.getLocation(), bundle); - } + loader.installAndStartBundles(framework, bundlesToLoad); } - private boolean isBundleActive(String location) { - Bundle bundle = loaded.get(location); + private boolean isBundleActive(BundleContext context, String location) { + Bundle bundle = context.getBundle(location); return (bundle != null) && (bundle.getState() == Bundle.ACTIVE); } diff -r 468d91f69d67 -r cb2842943f60 launcher/src/main/java/com/redhat/thermostat/launcher/internal/CommandInfo.java --- a/launcher/src/main/java/com/redhat/thermostat/launcher/internal/CommandInfo.java Fri Jul 19 15:35:58 2013 +0200 +++ b/launcher/src/main/java/com/redhat/thermostat/launcher/internal/CommandInfo.java Wed Jul 24 13:56:13 2013 -0400 @@ -41,6 +41,8 @@ import org.apache.commons.cli.Options; +import com.redhat.thermostat.launcher.BundleInformation; + public interface CommandInfo { /** @@ -71,8 +73,10 @@ */ public Options getOptions(); + List getBundles(); + /** Returns a list of jar that this command depends on */ - public List getDependencyResourceNames(); + List getDependencyResourceNames(); } diff -r 468d91f69d67 -r cb2842943f60 launcher/src/main/java/com/redhat/thermostat/launcher/internal/CompoundCommandInfoSource.java --- a/launcher/src/main/java/com/redhat/thermostat/launcher/internal/CompoundCommandInfoSource.java Fri Jul 19 15:35:58 2013 +0200 +++ b/launcher/src/main/java/com/redhat/thermostat/launcher/internal/CompoundCommandInfoSource.java Wed Jul 24 13:56:13 2013 -0400 @@ -46,6 +46,8 @@ import org.apache.commons.cli.Options; +import com.redhat.thermostat.launcher.BundleInformation; + /** @@ -135,8 +137,12 @@ List resources = new ArrayList<>(); resources.addAll(info1.getDependencyResourceNames()); resources.addAll(info2.getDependencyResourceNames()); + List bundles = new ArrayList<>(); + bundles.addAll(info1.getBundles()); + bundles.addAll(info2.getBundles()); - return new BasicCommandInfo(name, description, usage, options, environment, resources); + + return new BasicCommandInfo(name, description, usage, options, environment, resources, bundles); } private T selectBest(T first, T second) { diff -r 468d91f69d67 -r cb2842943f60 launcher/src/main/java/com/redhat/thermostat/launcher/internal/LauncherImpl.java --- a/launcher/src/main/java/com/redhat/thermostat/launcher/internal/LauncherImpl.java Fri Jul 19 15:35:58 2013 +0200 +++ b/launcher/src/main/java/com/redhat/thermostat/launcher/internal/LauncherImpl.java Wed Jul 24 13:56:13 2013 -0400 @@ -245,7 +245,8 @@ } try { - registry.addBundles(cmdInfo.getDependencyResourceNames()); + registry.loadBundlesByPath(cmdInfo.getDependencyResourceNames()); + registry.loadBundlesByName(cmdInfo.getBundles()); } catch (BundleException | IOException e) { // If this happens we definitely need to do something about it, and the // trace will be immeasurably helpful in figuring out what is wrong. diff -r 468d91f69d67 -r cb2842943f60 launcher/src/main/java/com/redhat/thermostat/launcher/internal/PluginCommandInfoSource.java --- a/launcher/src/main/java/com/redhat/thermostat/launcher/internal/PluginCommandInfoSource.java Fri Jul 19 15:35:58 2013 +0200 +++ b/launcher/src/main/java/com/redhat/thermostat/launcher/internal/PluginCommandInfoSource.java Wed Jul 24 13:56:13 2013 -0400 @@ -40,6 +40,7 @@ import java.io.FileNotFoundException; import java.util.ArrayList; import java.util.Collection; +import java.util.Collections; import java.util.HashMap; import java.util.Iterator; import java.util.LinkedList; @@ -50,6 +51,7 @@ import java.util.logging.Logger; import com.redhat.thermostat.common.utils.LoggingUtils; +import com.redhat.thermostat.launcher.BundleInformation; import com.redhat.thermostat.launcher.internal.PluginConfiguration.CommandExtensions; import com.redhat.thermostat.launcher.internal.PluginConfiguration.NewCommand; import com.redhat.thermostat.plugin.validator.PluginConfigurationValidatorException; @@ -73,7 +75,7 @@ private final UsageStringBuilder usageBuilder; private Map allNewCommands = new HashMap<>(); - private Map> additionalBundlesForExistingCommands = new HashMap<>(); + private Map> additionalBundlesForExistingCommands = new HashMap<>(); public PluginCommandInfoSource(String internalJarRoot, String pluginRootDir) { this(new File(internalJarRoot), new File(pluginRootDir), new PluginConfigurationParser(), new UsageStringBuilder()); @@ -111,19 +113,16 @@ for (CommandExtensions extension : pluginConfig.getExtendedCommands()) { String commandName = extension.getCommandName(); - List pluginBundles = extension.getPluginBundles(); - List dependencyBundles = extension.getDepenedencyBundles(); - logger.config("plugin at " + pluginDir + " contributes " + - pluginBundles.size() + " bundles to comamnd '" + commandName + "'"); + List bundles = extension.getBundles(); + logger.config("plugin at " + pluginDir + " needs " + + bundles.size() + " bundles for comamnd '" + commandName + "'"); - List bundlePaths = additionalBundlesForExistingCommands.get(commandName); + List bundlePaths = additionalBundlesForExistingCommands.get(commandName); if (bundlePaths == null) { bundlePaths = new LinkedList<>(); } - addIfValidPath(bundlePaths, pluginDir, pluginBundles); - - addIfValidPath(bundlePaths, coreJarRoot, dependencyBundles); + bundlePaths.addAll(bundles); additionalBundlesForExistingCommands.put(commandName, bundlePaths); } @@ -136,12 +135,6 @@ throw new IllegalStateException("multiple plugins are providing the command " + commandName); } - List bundlePaths = new LinkedList<>(); - - addIfValidPath(bundlePaths, pluginDir, command.getPluginBundles()); - - addIfValidPath(bundlePaths, coreJarRoot, command.getDepenedencyBundles()); - String usage = command.getUsage(); if (usage == null) { usage = usageBuilder.getUsage(commandName, command.getOptions(), command.getPositionalArguments().toArray(new String[0])); @@ -151,38 +144,29 @@ usage, command.getOptions(), command.getEnvironments(), - bundlePaths); + Collections.emptyList(), + command.getBundles()); allNewCommands.put(commandName, info); } } - private void addIfValidPath(List result, File parentDir, List pathsRelativeToParent) { - for (String bundle : pathsRelativeToParent) { - File bundleFile = new File(parentDir, bundle); - if (bundleFile.isFile()) { - result.add(bundleFile.toURI().toString()); - } else { - logger.warning("File " + bundleFile.toString() + " not found. Removing it from list of bundles to load."); - } - } - } - private void combineCommands() { - Iterator>> iter = additionalBundlesForExistingCommands.entrySet().iterator(); + Iterator>> iter = additionalBundlesForExistingCommands.entrySet().iterator(); while (iter.hasNext()) { - Map.Entry> entry = iter.next(); + Map.Entry> entry = iter.next(); if (allNewCommands.containsKey(entry.getKey())) { BasicCommandInfo old = allNewCommands.get(entry.getKey()); - List updatedResources = new ArrayList<>(); - updatedResources.addAll(old.getDependencyResourceNames()); + List updatedResources = new ArrayList<>(); + updatedResources.addAll(old.getBundles()); updatedResources.addAll(entry.getValue()); BasicCommandInfo updated = new BasicCommandInfo(old.getName(), old.getDescription(), old.getUsage(), old.getOptions(), old.getEnvironments(), + Collections.emptyList(), updatedResources); allNewCommands.put(entry.getKey(), updated); iter.remove(); @@ -195,9 +179,9 @@ if (allNewCommands.containsKey(name)) { return allNewCommands.get(name); } - List bundles = additionalBundlesForExistingCommands.get(name); + List bundles = additionalBundlesForExistingCommands.get(name); if (bundles != null) { - return new BasicCommandInfo(name, null, null, null, null, bundles); + return new BasicCommandInfo(name, null, null, null, null, Collections.emptyList(), bundles); } throw new CommandInfoNotFoundException(name); } @@ -206,8 +190,8 @@ public Collection getCommandInfos() { List result = new ArrayList<>(); result.addAll(allNewCommands.values()); - for (Entry> entry : additionalBundlesForExistingCommands.entrySet()) { - result.add(new BasicCommandInfo(entry.getKey(), null, null, null, null, entry.getValue())); + for (Entry> entry : additionalBundlesForExistingCommands.entrySet()) { + result.add(new BasicCommandInfo(entry.getKey(), null, null, null, null, Collections.emptyList(), entry.getValue())); } return result; } diff -r 468d91f69d67 -r cb2842943f60 launcher/src/main/java/com/redhat/thermostat/launcher/internal/PluginConfiguration.java --- a/launcher/src/main/java/com/redhat/thermostat/launcher/internal/PluginConfiguration.java Fri Jul 19 15:35:58 2013 +0200 +++ b/launcher/src/main/java/com/redhat/thermostat/launcher/internal/PluginConfiguration.java Wed Jul 24 13:56:13 2013 -0400 @@ -36,12 +36,15 @@ package com.redhat.thermostat.launcher.internal; +import java.util.Arrays; import java.util.Collections; import java.util.List; import java.util.Set; import org.apache.commons.cli.Options; +import com.redhat.thermostat.launcher.BundleInformation; + public class PluginConfiguration { @@ -64,25 +67,24 @@ public static class CommandExtensions { private final String commandName; - private final List additionalResources; - private final List coreDeps; + private final List toLoad; - public CommandExtensions(String name, List additionalResources, List coreDeps) { + public CommandExtensions(String name, List toLoad) { this.commandName = name; - this.additionalResources = additionalResources; - this.coreDeps = coreDeps; + this.toLoad = toLoad; } public String getCommandName() { return commandName; } - public List getPluginBundles() { - return Collections.unmodifiableList(additionalResources); + public List getBundles() { + return toLoad; } - public List getDepenedencyBundles() { - return coreDeps; + @Override + public String toString() { + return "extends " + commandName + " using " + toLoad.toString(); } } @@ -94,21 +96,19 @@ private final List positionalArguments; private final Options options; private final Set environment; - private final List additionalResources; - private final List coreDeps; + private final List bundles; public NewCommand(String name, String usage, String description, List positionalArguments, Options options, Set environment, - List additionalResources, List coreDeps) { + List bundles) { this.commandName = name; this.usage = usage; this.description = description; this.positionalArguments = positionalArguments; this.options = options; this.environment = environment; - this.additionalResources = additionalResources; - this.coreDeps = coreDeps; + this.bundles = bundles; } public String getCommandName() { @@ -143,15 +143,10 @@ return Collections.unmodifiableSet(environment); } - public List getPluginBundles() { - return Collections.unmodifiableList(additionalResources); + public List getBundles() { + return Collections.unmodifiableList(bundles); } - public List getDepenedencyBundles() { - return Collections.unmodifiableList(coreDeps); - } - - } } diff -r 468d91f69d67 -r cb2842943f60 launcher/src/main/java/com/redhat/thermostat/launcher/internal/PluginConfigurationParser.java --- a/launcher/src/main/java/com/redhat/thermostat/launcher/internal/PluginConfigurationParser.java Fri Jul 19 15:35:58 2013 +0200 +++ b/launcher/src/main/java/com/redhat/thermostat/launcher/internal/PluginConfigurationParser.java Wed Jul 24 13:56:13 2013 -0400 @@ -65,6 +65,7 @@ import org.xml.sax.SAXParseException; import com.redhat.thermostat.common.utils.LoggingUtils; +import com.redhat.thermostat.launcher.BundleInformation; import com.redhat.thermostat.launcher.internal.PluginConfiguration.CommandExtensions; import com.redhat.thermostat.launcher.internal.PluginConfiguration.NewCommand; import com.redhat.thermostat.plugin.validator.PluginConfigurationValidatorException; @@ -141,11 +142,11 @@ <environment>shell</environment> </environments> <bundles> - <bundle>thermostat-platform-common-0.6.0-SNAPSHOT.jar</bundle> - <bundle>thermostat-platform-swing-0.6.0-SNAPSHOT.jar</bundle> + <bundle><name>platform.core</name><version>0.6.0</version></bundle> + <bundle><name>platform.swing</name><version>0.6.0</version></bundle> </bundles> <dependencies> - <dependency>thermostat-client-core-0.6.0-SNAPSHOT.jar</dependency> + <bundle><name>client.core</name><version>0.6.0</version></bundle> </dependencies> </command> <command> @@ -174,11 +175,11 @@ <environment>shell</environment> </environments> <bundles> - <bundle>thermostat-platform-common-0.6.0-SNAPSHOT.jar</bundle> - <bundle>thermostat-platform-controllers-0.6.0-SNAPSHOT.jar</bundle> + <bundle><name>platform.common</name><version>0.6.0</version></bundle> + <bundle><name>platform.controllers</name><version>0.6.0</version></bundle> </bundles> <dependencies> - <dependency>thermostat-common-core-0.6.0-SNAPSHOT.jar</dependency> + <bundle><name>common.core</name><version>0.6.0</version></bundle> </dependencies> </command> </commands> @@ -186,15 +187,15 @@ <extension> <name>platform3</name> <bundles> - <bundle>thermostat-platform-common-0.6.0-SNAPSHOT.jar</bundle> - <bundle>thermostat-platform-controllers-0.6.0-SNAPSHOT.jar</bundle> - <bundle>thermostat-platform-command-0.6.0-SNAPSHOT.jar</bundle> - <bundle>thermostat-platform-common-export-0.6.0-SNAPSHOT.jar</bundle> - <bundle>thermostat-platform-swing-0.6.0-SNAPSHOT.jar</bundle> + <bundle><name>platform.common</name><version>0.6.0</version></bundle> + <bundle><name>platform.controllers</name><version>0.6.0</version></bundle> + <bundle><name>platform.command</name><version>0.6.0</version></bundle> + <bundle><name>platform.common-export</name><version>0.6.0</version></bundle> + <bundle><name>platform.swing</name><version>0.6.0</version></bundle> </bundles> <dependencies> - <dependency>thermostat-common-core-0.6.0-SNAPSHOT.jar</dependency> - <dependency>thermostat-client-core-0.6.0-SNAPSHOT.jar</dependency> + <bundle><name>common.core</name><version>0.6.0</version></bundle> + <bundle><name>client.core</name><version>0.6.0</version></bundle> </dependencies> </extension> </extensions> @@ -294,8 +295,7 @@ private CommandExtensions parseAdditionsToExistingCommand(String pluginName, Node commandNode) { String name = null; - List bundles = new ArrayList<>(); - List dependencies = new ArrayList<>(); + List bundles = new ArrayList<>(); NodeList nodes = commandNode.getChildNodes(); for (int i = 0; i < nodes.getLength(); i++) { @@ -304,8 +304,6 @@ name = node.getTextContent().trim(); } else if (node.getNodeName().equals("bundles")) { bundles.addAll(parseBundles(pluginName, name, node)); - } else if (node.getNodeName().equals("dependencies")) { - dependencies.addAll(parseDependencies(pluginName, name, node)); } } @@ -317,7 +315,7 @@ logger.warning("plugin " + pluginName + " provides extensions without specifying the command"); return null; } - return new CommandExtensions(name, bundles, dependencies); + return new CommandExtensions(name, bundles); } private NewCommand parseNewCommand(String pluginName, Node commandNode) { @@ -327,8 +325,7 @@ List arguments = new ArrayList<>(); Options options = new Options(); Set availableInEnvironments = EnumSet.noneOf(Environment.class); - List bundles = new ArrayList<>(); - List dependencies = new ArrayList<>(); + List bundles = new ArrayList<>(); NodeList nodes = commandNode.getChildNodes(); for (int i = 0; i < nodes.getLength(); i++) { @@ -347,33 +344,61 @@ availableInEnvironments = parseEnvironment(pluginName, name, node); } else if (node.getNodeName().equals("bundles")) { bundles.addAll(parseBundles(pluginName, name, node)); - } else if (node.getNodeName().equals("dependencies")) { - dependencies.addAll(parseDependencies(pluginName, name, node)); } } if (bundles.isEmpty()) { logger.warning("plugin " + pluginName + " provides a new command " + name + " but supplies no bundles"); } - if (dependencies.isEmpty()) { - logger.warning("plugin " + pluginName + " provides a new command " + name + " but lists no dependencies on thermostat"); - } if (name == null || description == null || availableInEnvironments.isEmpty()) { logger.warning("plugin " + pluginName + " provides an incomplete new command: " + "name='" + name + "', description='" + description + "', options='" + options + "'"); return null; } else { - return new NewCommand(name, usage, description, arguments, options, availableInEnvironments, bundles, dependencies); + return new NewCommand(name, usage, description, arguments, options, availableInEnvironments, bundles); } } - private Collection parseBundles(String pluginName, String commandName, Node bundlesNode) { - return parseNodeAsList(pluginName, commandName, bundlesNode, "bundle"); + private List parseBundles(String pluginName, String commandName, Node bundlesNode) { + List result = new ArrayList<>(); + NodeList nodes = bundlesNode.getChildNodes(); + for (int i = 0; i < nodes.getLength(); i++) { + Node node = nodes.item(i); + if (node.getNodeName().equals("bundle")) { + BundleInformation bundleInfo = parseBundle(pluginName, commandName, node); + if (bundleInfo != null) { + result.add(bundleInfo); + } + } + } + return result; } - private Collection parseDependencies(String pluginName, String commandName, Node dependenciesNode) { - return parseNodeAsList(pluginName, commandName, dependenciesNode, "dependency"); + private BundleInformation parseBundle(String pluginName, String commandName, Node bundleNode) { + String name = null; + String version = null; + NodeList nodes = bundleNode.getChildNodes(); + for (int i = 0; i < nodes.getLength(); i++) { + Node node = nodes.item(i); + if (node.getNodeName().equals("symbolic-name")) { + name = node.getTextContent().trim(); + } else if (node.getNodeName().equals("version")) { + version = node.getTextContent().trim(); + // FIXME hack: convert maven-style qualifiers to osgi-style qualifiers. + // thermostat uses ${project.version}, which is the maven version, in the + // plugin.xml files. This converts that maven -SNAPSHOT into OSGi .SNAPSHOT + if (version.endsWith("-SNAPSHOT")) { + version = version.replace("-SNAPSHOT", ".SNAPSHOT"); + } + } + } + if (name == null || version == null) { + logger.warning("plugin " + pluginName + " has an empty bundles element for command " + name); + return null; + } + + return new BundleInformation(name, version); } private List parseArguments(String pluginName, String commandName, Node argumentsNode) { diff -r 468d91f69d67 -r cb2842943f60 launcher/src/test/java/com/redhat/thermostat/launcher/internal/BasicCommandInfoTest.java --- a/launcher/src/test/java/com/redhat/thermostat/launcher/internal/BasicCommandInfoTest.java Fri Jul 19 15:35:58 2013 +0200 +++ b/launcher/src/test/java/com/redhat/thermostat/launcher/internal/BasicCommandInfoTest.java Wed Jul 24 13:56:13 2013 -0400 @@ -46,6 +46,8 @@ import org.apache.commons.cli.Options; import org.junit.Test; +import com.redhat.thermostat.launcher.BundleInformation; + public class BasicCommandInfoTest { @@ -57,6 +59,7 @@ final Options OPTIONS = new Options(); final Set ENVIRONMENT = EnumSet.noneOf(Environment.class); final List RESOURCES = Collections.emptyList(); + final List BUNDLES = Collections.emptyList(); BasicCommandInfo info = new BasicCommandInfo(NAME, DESCRIPTION, USAGE, OPTIONS, ENVIRONMENT, RESOURCES); @@ -66,6 +69,7 @@ assertEquals(OPTIONS, info.getOptions()); assertEquals(RESOURCES, info.getDependencyResourceNames()); - assertEquals(String.format("%s (description='%s', dependencies='%s')", NAME, DESCRIPTION, RESOURCES.toString()), info.toString()); + assertEquals(String.format("%s (description='%s', dependencies='%s', bundles='%s')", NAME, DESCRIPTION, RESOURCES.toString(), BUNDLES.toString()), + info.toString()); } } diff -r 468d91f69d67 -r cb2842943f60 launcher/src/test/java/com/redhat/thermostat/launcher/internal/BundleManagerImplTest.java --- a/launcher/src/test/java/com/redhat/thermostat/launcher/internal/BundleManagerImplTest.java Fri Jul 19 15:35:58 2013 +0200 +++ b/launcher/src/test/java/com/redhat/thermostat/launcher/internal/BundleManagerImplTest.java Wed Jul 24 13:56:13 2013 -0400 @@ -38,16 +38,25 @@ import static org.mockito.Matchers.any; import static org.mockito.Matchers.eq; +import static org.mockito.Matchers.isA; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; import static org.powermock.api.mockito.PowerMockito.mockStatic; import static org.powermock.api.mockito.PowerMockito.whenNew; +import java.io.File; +import java.io.IOException; import java.lang.reflect.Method; +import java.nio.file.FileVisitResult; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.SimpleFileVisitor; +import java.nio.file.attribute.BasicFileAttributes; import java.util.Arrays; import java.util.List; +import org.junit.After; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; @@ -58,6 +67,7 @@ import org.powermock.core.classloader.annotations.PrepareForTest; import org.powermock.modules.junit4.PowerMockRunner; +import com.redhat.thermostat.plugin.validator.PluginConfigurationValidatorException; import com.redhat.thermostat.shared.config.Configuration; @RunWith(PowerMockRunner.class) @@ -73,13 +83,31 @@ private Bundle b1, b2, b3; private List bundleLocs; + private Framework theFramework; + private BundleContext theContext; + private BundleLoader loader; private Configuration conf; + + private Path testRoot; @Before public void setUp() throws Exception { + testRoot = Files.createTempDirectory("thermostat"); + Path pluginRootDir = testRoot.resolve("plugins"); + Files.createDirectory(pluginRootDir); + Path jarRootDir = testRoot.resolve("libs"); + Files.createDirectories(jarRootDir); + conf = mock(Configuration.class); - when(conf.getThermostatHome()).thenReturn("no_matter"); + when(conf.getLibRoot()).thenReturn(jarRootDir.toFile().getPath()); + when(conf.getPluginRoot()).thenReturn(pluginRootDir.toFile().getPath()); + + theContext = mock(BundleContext.class); + theFramework = mock(Framework.class); + when(theFramework.getBundleContext()).thenReturn(theContext); + when(theContext.getBundle(0)).thenReturn(theFramework); + bundleLocs = Arrays.asList(jar1Name, jar2Name, jar3Name); b1 = mock(Bundle.class); when(b1.getLocation()).thenReturn(jar1Name); @@ -99,30 +127,55 @@ withArguments(any()).thenReturn(loader); } + @After + public void tearDown() throws IOException { + Files.walkFileTree(testRoot, new SimpleFileVisitor() { + @Override + public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException { + Files.delete(file); + return FileVisitResult.CONTINUE; + } + @Override + public FileVisitResult postVisitDirectory(Path dir, IOException exc) throws IOException { + if (exc == null) { + Files.delete(dir); + return FileVisitResult.CONTINUE; + } else { + throw exc; + } + } + }); + } @Test - public void testLoadBundlesFor() throws Exception { - verifyBundlesLoaded(new Bundle[] {}, bundleLocs); + public void testInstallAndStartBundles() throws Exception { + Bundle theBundle = b2; + when(theContext.getBundles()).thenReturn(new Bundle[] {}); + when(theBundle.getBundleContext()).thenReturn(theContext); + + mockStatic(FrameworkUtil.class); + + when(FrameworkUtil.getBundle(any(Class.class))).thenReturn(theBundle); + + BundleManagerImpl registry = new BundleManagerImpl(conf); + registry.loadBundlesByPath(bundleLocs); + verify(loader).installAndStartBundles(any(Framework.class), eq(bundleLocs)); } @Test public void verifyAlreadyLoadedBundlesNotReloaded() throws Exception { - verifyBundlesLoaded(new Bundle[] {b1, b2}, Arrays.asList(jar3Name)); - } - private void verifyBundlesLoaded(Bundle[] preloaded, List locationsNeeded) throws Exception { Bundle theBundle = b2; - BundleContext theContext = mock(BundleContext.class); - when(theContext.getBundles()).thenReturn(preloaded); - Framework theFramework = mock(Framework.class); - when(theFramework.getBundleContext()).thenReturn(theContext); - when(theContext.getBundle(0)).thenReturn(theFramework); + when(theContext.getBundles()).thenReturn(new Bundle[] {b1, b2}); + when(theContext.getBundle(jar1Name)).thenReturn(b1); + when(theContext.getBundle(jar2Name)).thenReturn(b2); + when(theBundle.getBundleContext()).thenReturn(theContext); mockStatic(FrameworkUtil.class); when(FrameworkUtil.getBundle(any(Class.class))).thenReturn(theBundle); BundleManagerImpl registry = new BundleManagerImpl(conf); - registry.addBundles(bundleLocs); - verify(loader).installAndStartBundles(any(Framework.class), eq(locationsNeeded)); + registry.loadBundlesByPath(bundleLocs); + verify(loader).installAndStartBundles(any(Framework.class), eq(Arrays.asList(jar3Name))); } @Test diff -r 468d91f69d67 -r cb2842943f60 launcher/src/test/java/com/redhat/thermostat/launcher/internal/PluginCommandInfoSourceTest.java --- a/launcher/src/test/java/com/redhat/thermostat/launcher/internal/PluginCommandInfoSourceTest.java Fri Jul 19 15:35:58 2013 +0200 +++ b/launcher/src/test/java/com/redhat/thermostat/launcher/internal/PluginCommandInfoSourceTest.java Wed Jul 24 13:56:13 2013 -0400 @@ -63,6 +63,7 @@ import org.junit.Test; import org.mockito.ArgumentCaptor; +import com.redhat.thermostat.launcher.BundleInformation; import com.redhat.thermostat.launcher.internal.PluginConfiguration.CommandExtensions; import com.redhat.thermostat.launcher.internal.PluginConfiguration.NewCommand; import com.redhat.thermostat.plugin.validator.PluginConfigurationValidatorException; @@ -148,21 +149,14 @@ @Test public void verifyCommandInfoObjectsToExtendExistingCommandsAreCreated() throws IOException { - final String DEPENDENCY_BUNDLE = "dependency-bundle"; - final String PLUGIN_BUNDLE = "plugin-bundle"; + BundleInformation bundleInfo = new BundleInformation("plugin-bundle", "0.1"); Path pluginDir = pluginRootDir.resolve("plugin1"); Files.createDirectory(pluginDir); - Path pluginJar = pluginDir.resolve(PLUGIN_BUNDLE); - Files.createFile(pluginJar); - - Path dependencyJar = jarRootDir.resolve(DEPENDENCY_BUNDLE); - Files.createFile(dependencyJar); CommandExtensions extensions = mock(CommandExtensions.class); when(extensions.getCommandName()).thenReturn("command-name"); - when(extensions.getPluginBundles()).thenReturn(Arrays.asList(PLUGIN_BUNDLE)); - when(extensions.getDepenedencyBundles()).thenReturn(Arrays.asList(DEPENDENCY_BUNDLE)); + when(extensions.getBundles()).thenReturn(Arrays.asList(bundleInfo)); when(parserResult.getExtendedCommands()).thenReturn(Arrays.asList(extensions)); @@ -171,11 +165,7 @@ CommandInfo info = source.getCommandInfo("command-name"); assertEquals("command-name", info.getName()); - String expectedDep1Name = pluginJar.toFile().toURI().toString(); - String expectedDep2Name = dependencyJar.toFile().toURI().toString(); - - assertTrue(info.getDependencyResourceNames().contains(expectedDep1Name)); - assertTrue(info.getDependencyResourceNames().contains(expectedDep2Name)); + assertTrue(info.getBundles().contains(bundleInfo)); } @Test @@ -185,16 +175,10 @@ final String USAGE = "usage"; final Options OPTIONS = new Options(); final Set ENVIRONMENTS = EnumSet.of(Environment.SHELL); - final String PLUGIN_BUNDLE = "plugin-bundle.jar"; - final String DEPENDENCY_BUNDLE = "dependency-bundle.jar"; + BundleInformation bundleInfo = new BundleInformation("plugin-bundle", "0.1"); Path pluginDir = pluginRootDir.resolve("plugin1"); Files.createDirectory(pluginDir); - Path pluginJar = pluginDir.resolve(PLUGIN_BUNDLE); - Files.createFile(pluginJar); - - Path dependencyJar = jarRootDir.resolve(DEPENDENCY_BUNDLE); - Files.createFile(dependencyJar); NewCommand cmd = mock(NewCommand.class); when(cmd.getCommandName()).thenReturn(NAME); @@ -202,8 +186,7 @@ when(usageBuilder.getUsage(NAME, OPTIONS)).thenReturn(USAGE); when(cmd.getOptions()).thenReturn(OPTIONS); when(cmd.getEnvironments()).thenReturn(ENVIRONMENTS); - when(cmd.getPluginBundles()).thenReturn(Arrays.asList(PLUGIN_BUNDLE)); - when(cmd.getDepenedencyBundles()).thenReturn(Arrays.asList(DEPENDENCY_BUNDLE)); + when(cmd.getBundles()).thenReturn(Arrays.asList(bundleInfo)); when(parserResult.getNewCommands()).thenReturn(Arrays.asList(cmd)); @@ -216,12 +199,8 @@ assertEquals(USAGE, result.getUsage()); assertEquals(OPTIONS, result.getOptions()); - String expectedDep1Name = pluginJar.toFile().toURI().toString(); - String expectedDep2Name = dependencyJar.toFile().toURI().toString(); - - List deps = result.getDependencyResourceNames(); - assertEquals(2, deps.size()); - assertTrue(deps.contains(expectedDep1Name)); - assertTrue(deps.contains(expectedDep2Name)); + List deps = result.getBundles(); + assertEquals(1, deps.size()); + assertTrue(deps.contains(bundleInfo)); } } diff -r 468d91f69d67 -r cb2842943f60 launcher/src/test/java/com/redhat/thermostat/launcher/internal/PluginConfigurationParserTest.java --- a/launcher/src/test/java/com/redhat/thermostat/launcher/internal/PluginConfigurationParserTest.java Fri Jul 19 15:35:58 2013 +0200 +++ b/launcher/src/test/java/com/redhat/thermostat/launcher/internal/PluginConfigurationParserTest.java Wed Jul 24 13:56:13 2013 -0400 @@ -54,6 +54,7 @@ import org.apache.commons.cli.Options; import org.junit.Test; +import com.redhat.thermostat.launcher.BundleInformation; import com.redhat.thermostat.launcher.internal.PluginConfiguration.CommandExtensions; import com.redhat.thermostat.launcher.internal.PluginConfiguration.NewCommand; import com.redhat.thermostat.shared.locale.Translate; @@ -93,9 +94,9 @@ " \n" + " test\n" + " \n" + - " foo\n" + - " bar\n" + - " baz\n" + + " foo1.0\n" + + " bar1.0\n" + + " baz1.0\n" + " \n" + " \n" + " thermostat-foo\n" + @@ -114,9 +115,10 @@ CommandExtensions first = extensions.get(0); assertEquals("test", first.getCommandName()); - assertEquals(Arrays.asList("foo", "bar", "baz"), first.getPluginBundles()); - assertEquals(Arrays.asList("thermostat-foo"), first.getDepenedencyBundles()); - } + BundleInformation[] expectedBundles = new BundleInformation[] { + new BundleInformation("foo", "1.0"), new BundleInformation("bar", "1.0"), new BundleInformation("baz", "1.0"), + }; + assertEquals(Arrays.asList(expectedBundles), first.getBundles()); } @Test public void testConfigurationThatAddsNewCommand() throws UnsupportedEncodingException { @@ -133,9 +135,9 @@ " cli" + " " + " \n" + - " foo\n" + - " bar\n" + - " baz\n" + + " foo1.0\n" + + " bar1.0\n" + + " baz1.0\n" + " \n" + " \n" + " thermostat-foo\n" + @@ -161,8 +163,10 @@ assertTrue(opts.getRequiredOptions().isEmpty()); assertTrue(newCommand.getEnvironments().contains(Environment.SHELL)); assertTrue(newCommand.getEnvironments().contains(Environment.CLI)); - assertEquals(Arrays.asList("foo", "bar", "baz"), newCommand.getPluginBundles()); - assertEquals(Arrays.asList("thermostat-foo"), newCommand.getDepenedencyBundles()); + BundleInformation[] expectedBundles = new BundleInformation[] { + new BundleInformation("foo", "1.0"), new BundleInformation("bar", "1.0"), new BundleInformation("baz", "1.0"), + }; + assertEquals(Arrays.asList(expectedBundles), newCommand.getBundles()); } @Test @@ -175,9 +179,9 @@ " \n" + " \ntest \n\n" + " \n" + - " \n \t \nfoo\t \n \n\n" + - " \tbar baz\n\n" + - " buzz\n" + + " \n \t \nfoo\t \nignore\n\n" + + " \tbar baz\nignore\n" + + " buzzignore\n" + " \n" + " \n\t\n\t \t\t\n" + " \t\t\t thermostat-foo\n\t\t\n\n" + @@ -196,8 +200,10 @@ CommandExtensions first = extensions.get(0); assertEquals("test", first.getCommandName()); - assertEquals(Arrays.asList("foo", "bar baz", "buzz"), first.getPluginBundles()); - assertEquals(Arrays.asList("thermostat-foo"), first.getDepenedencyBundles()); + BundleInformation[] expectedBundles = new BundleInformation[] { + new BundleInformation("foo", "ignore"), new BundleInformation("bar baz", "ignore"), new BundleInformation("buzz", "ignore"), + }; + assertEquals(Arrays.asList(expectedBundles), first.getBundles()); } @Test diff -r 468d91f69d67 -r cb2842943f60 launcher/src/test/java/com/redhat/thermostat/launcher/internal/TestCommandInfo.java --- a/launcher/src/test/java/com/redhat/thermostat/launcher/internal/TestCommandInfo.java Fri Jul 19 15:35:58 2013 +0200 +++ b/launcher/src/test/java/com/redhat/thermostat/launcher/internal/TestCommandInfo.java Wed Jul 24 13:56:13 2013 -0400 @@ -43,6 +43,8 @@ import org.apache.commons.cli.Option; import org.apache.commons.cli.Options; +import com.redhat.thermostat.launcher.BundleInformation; + public class TestCommandInfo implements CommandInfo { private String name; @@ -104,4 +106,8 @@ return Collections.emptyList(); } + @Override + public List getBundles() { + return Collections.emptyList(); + } } diff -r 468d91f69d67 -r cb2842943f60 numa/distribution/thermostat-plugin.xml --- a/numa/distribution/thermostat-plugin.xml Fri Jul 19 15:35:58 2013 +0200 +++ b/numa/distribution/thermostat-plugin.xml Wed Jul 24 13:56:13 2013 -0400 @@ -43,23 +43,23 @@ gui - thermostat-numa-common-${project.version}.jar - thermostat-numa-client-core-${project.version}.jar - thermostat-numa-client-swing-${project.version}.jar + com.redhat.thermostat.numa.common${project.version} + com.redhat.thermostat.numa.client.core${project.version} + com.redhat.thermostat.numa.client.swing${project.version} agent - thermostat-numa-common-${project.version}.jar - thermostat-numa-agent-${project.version}.jar + com.redhat.thermostat.numa.common${project.version} + com.redhat.thermostat.numa.agent${project.version} webservice - thermostat-numa-common-${project.version}.jar + com.redhat.thermostat.numa.common${project.version} diff -r 468d91f69d67 -r cb2842943f60 pom.xml --- a/pom.xml Fri Jul 19 15:35:58 2013 +0200 +++ b/pom.xml Wed Jul 24 13:56:13 2013 -0400 @@ -81,8 +81,9 @@ 1.2 2.4 3.2.1 - 1.1.1 + 1.1.3 1.7 + 1.7.0 2.9 3.6.0_1 @@ -110,16 +111,6 @@ false - - com.springsource.repository.bundles.release - SpringSource Enterprise Bundle Repository - SpringSource Bundle Releases - http://repository.springsource.com/maven/bundles/release - - - com.springsource.repository.bundles.external - SpringSource Enterprise Bundle Repository - External Bundle Releases - http://repository.springsource.com/maven/bundles/external - @@ -340,9 +331,8 @@ ${commons-collections.version} - - org.apache.commons - com.springsource.org.apache.commons.logging + commons-logging + commons-logging ${commons-logging.version} diff -r 468d91f69d67 -r cb2842943f60 storage/mongo/pom.xml --- a/storage/mongo/pom.xml Fri Jul 19 15:35:58 2013 +0200 +++ b/storage/mongo/pom.xml Wed Jul 24 13:56:13 2013 -0400 @@ -99,8 +99,8 @@ commons-collections - org.apache.commons - com.springsource.org.apache.commons.logging + commons-logging + commons-logging org.powermock diff -r 468d91f69d67 -r cb2842943f60 thread/distribution/thermostat-plugin.xml --- a/thread/distribution/thermostat-plugin.xml Fri Jul 19 15:35:58 2013 +0200 +++ b/thread/distribution/thermostat-plugin.xml Wed Jul 24 13:56:13 2013 -0400 @@ -43,24 +43,24 @@ gui - thermostat-thread-collector-${project.version}.jar - thermostat-thread-client-swing-${project.version}.jar - thermostat-thread-client-controllers-${project.version}.jar - thermostat-thread-client-common-${project.version}.jar + com.redhat.thermostat.thread.collector${project.version} + com.redhat.thermostat.thread.client.swing${project.version} + com.redhat.thermostat.thread.client.controller${project.version} + com.redhat.thermostat.thread.client.common${project.version} agent - thermostat-thread-collector-${project.version}.jar - thermostat-thread-harvester-${project.version}.jar + com.redhat.thermostat.thread.collector${project.version} + com.redhat.thermostat.thread.harvester${project.version} webservice - thermostat-thread-collector-${project.version}.jar + com.redhat.thermostat.thread.collector${project.version} diff -r 468d91f69d67 -r cb2842943f60 validate-command/distribution/thermostat-plugin.xml --- a/validate-command/distribution/thermostat-plugin.xml Fri Jul 19 15:35:58 2013 +0200 +++ b/validate-command/distribution/thermostat-plugin.xml Wed Jul 24 13:56:13 2013 -0400 @@ -51,13 +51,11 @@ shell - thermostat-validate-command-${project.version}.jar + com.redhat.thermostat.validate.command${project.version} + com.redhat.thermostat.common.core${project.version} + com.redhat.thermostat.shared.config${project.version} + com.redhat.thermostat.plugin.validator${project.version} - - thermostat-common-core-${project.version}.jar - thermostat-shared-config-${project.version}.jar - thermostat-plugin-validator-${project.version}.jar - - \ No newline at end of file + diff -r 468d91f69d67 -r cb2842943f60 vm-classstat/distribution/thermostat-plugin.xml --- a/vm-classstat/distribution/thermostat-plugin.xml Fri Jul 19 15:35:58 2013 +0200 +++ b/vm-classstat/distribution/thermostat-plugin.xml Wed Jul 24 13:56:13 2013 -0400 @@ -43,23 +43,23 @@ gui - thermostat-vm-classstat-common-${project.version}.jar - thermostat-vm-classstat-client-core-${project.version}.jar - thermostat-vm-classstat-client-swing-${project.version}.jar + com.redhat.thermostat.vm.classstat.common${project.version} + com.redhat.thermostat.vm.classstat.client.core${project.version} + com.redhat.thermostat.vm.classstat.client.swing${project.version} agent - thermostat-vm-classstat-common-${project.version}.jar - thermostat-vm-classstat-agent-${project.version}.jar + com.redhat.thermostat.vm.classstat.common${project.version} + com.redhat.thermostat.vm.classstat.agent${project.version} webservice - thermostat-vm-classstat-common-${project.version}.jar + com.redhat.thermostat.vm.classstat.common${project.version} diff -r 468d91f69d67 -r cb2842943f60 vm-cpu/distribution/thermostat-plugin.xml --- a/vm-cpu/distribution/thermostat-plugin.xml Fri Jul 19 15:35:58 2013 +0200 +++ b/vm-cpu/distribution/thermostat-plugin.xml Wed Jul 24 13:56:13 2013 -0400 @@ -43,30 +43,30 @@ gui - thermostat-vm-cpu-common-${project.version}.jar - thermostat-vm-cpu-client-core-${project.version}.jar - thermostat-vm-cpu-client-swing-${project.version}.jar + com.redhat.thermostat.vm.cpu.common${project.version} + com.redhat.thermostat.vm.cpu.client.core${project.version} + com.redhat.thermostat.vm.cpu.client.swing${project.version} agent - thermostat-vm-cpu-common-${project.version}.jar - thermostat-vm-cpu-agent-${project.version}.jar + com.redhat.thermostat.vm.cpu.common${project.version} + com.redhat.thermostat.vm.cpu.agent${project.version} webservice - thermostat-vm-cpu-common-${project.version}.jar + com.redhat.thermostat.vm.cpu.common${project.version} vm-stat - thermostat-vm-cpu-common-${project.version}.jar - thermostat-vm-cpu-client-cli-${project.version}.jar + com.redhat.thermostat.vm.cpu.common${project.version} + com.redhat.thermostat.vm.cpu.client.cli${project.version} diff -r 468d91f69d67 -r cb2842943f60 vm-gc/distribution/thermostat-plugin.xml --- a/vm-gc/distribution/thermostat-plugin.xml Fri Jul 19 15:35:58 2013 +0200 +++ b/vm-gc/distribution/thermostat-plugin.xml Wed Jul 24 13:56:13 2013 -0400 @@ -43,28 +43,28 @@ gui - thermostat-vm-gc-common-${project.version}.jar - thermostat-vm-gc-client-core-${project.version}.jar - thermostat-vm-gc-client-swing-${project.version}.jar - thermostat-gc-remote-collector-common-${project.version}.jar - thermostat-gc-remote-collector-client-common-${project.version}.jar - thermostat-gc-remote-collector-client-swing-${project.version}.jar + com.redhat.thermostat.vm.gc.common${project.version} + com.redhat.thermostat.vm.gc.client.core${project.version} + com.redhat.thermostat.vm.gc.client.swing${project.version} + com.redhat.thermostat.gc.remote.common.command${project.version} + com.redhat.thermostat.gc.remote.client.common${project.version} + com.redhat.thermostat.gc.remote.client.swing${project.version} agent - thermostat-vm-gc-common-${project.version}.jar - thermostat-vm-gc-agent-${project.version}.jar - thermostat-gc-remote-collector-common-${project.version}.jar - thermostat-gc-remote-collector-command-${project.version}.jar + com.redhat.thermostat.vm.gc.common${project.version} + com.redhat.thermostat.vm.gc.agent${project.version} + com.redhat.thermostat.gc.remote.common.command${project.version} + com.redhat.thermostat.gc.remote.command${project.version} webservice - thermostat-vm-gc-common-${project.version}.jar + com.redhat.thermostat.vm.gc.common${project.version} diff -r 468d91f69d67 -r cb2842943f60 vm-heap-analysis/distribution/thermostat-plugin.xml --- a/vm-heap-analysis/distribution/thermostat-plugin.xml Fri Jul 19 15:35:58 2013 +0200 +++ b/vm-heap-analysis/distribution/thermostat-plugin.xml Wed Jul 24 13:56:13 2013 -0400 @@ -70,27 +70,25 @@ shell - thermostat-vm-heap-analysis-common-${project.version}.jar - thermostat-vm-heap-analysis-command-${project.version}.jar + com.redhat.thermostat.vm.heap.analysis.common${project.version} + com.redhat.thermostat.vm.heap.analysis.command${project.version} + com.redhat.thermostat.common.command${project.version} + com.redhat.thermostat.client.core${project.version} + com.redhat.thermostat.client.command${project.version} + com.redhat.thermostat.client.cli${project.version} + com.redhat.thermostat.storage.mongodb${project.version} + com.redhat.thermostat.web.common${project.version} + com.redhat.thermostat.web.client${project.version} + com.mongodb${mongo-driver.version} + org.apache.commons.beanutils${commons-beanutils.version} + org.apache.commons.codec${commons-codec.osgi-version} + org.apache.commons.collections${commons-collections.version} + org.apache.commons.logging${commons-logging.version} + org.apache.httpcomponents.httpcore${httpcomponents.version} + org.apache.httpcomponents.httpclient${httpcomponents.version} + com.google.gson${gson.version} + org.jboss.netty${netty.version} - - thermostat-common-command-${project.version}.jar - thermostat-client-core-${project.version}.jar - thermostat-client-command-${project.version}.jar - thermostat-client-cli-${project.version}.jar - thermostat-storage-mongodb-${project.version}.jar - thermostat-web-common-${project.version}.jar - thermostat-web-client-${project.version}.jar - mongo.jar - commons-beanutils.jar - commons-codec.jar - commons-collections.jar - commons-logging.jar - httpcomponents-core.jar - httpcomponents-client.jar - gson.jar - netty.jar - find-objects @@ -125,27 +123,25 @@ shell - thermostat-vm-heap-analysis-common-${project.version}.jar - thermostat-vm-heap-analysis-command-${project.version}.jar + com.redhat.thermostat.vm.heap.analysis.common${project.version} + com.redhat.thermostat.vm.heap.analysis.command${project.version} + com.redhat.thermostat.common.command${project.version} + com.redhat.thermostat.client.core${project.version} + com.redhat.thermostat.client.command${project.version} + com.redhat.thermostat.client.cli${project.version} + com.redhat.thermostat.storage.mongodb${project.version} + com.redhat.thermostat.web.common${project.version} + com.redhat.thermostat.web.client${project.version} + com.mongodb${mongo-driver.version} + org.apache.commons.beanutils${commons-beanutils.version} + org.apache.commons.codec${commons-codec.osgi-version} + org.apache.commons.collections${commons-collections.version} + org.apache.commons.logging${commons-logging.version} + org.apache.httpcomponents.httpcore${httpcomponents.version} + org.apache.httpcomponents.httpclient${httpcomponents.version} + com.google.gson${gson.version} + org.jboss.netty${netty.version} - - thermostat-common-command-${project.version}.jar - thermostat-client-core-${project.version}.jar - thermostat-client-command-${project.version}.jar - thermostat-client-cli-${project.version}.jar - thermostat-storage-mongodb-${project.version}.jar - thermostat-web-common-${project.version}.jar - thermostat-web-client-${project.version}.jar - mongo.jar - commons-beanutils.jar - commons-codec.jar - commons-collections.jar - commons-logging.jar - httpcomponents-core.jar - httpcomponents-client.jar - gson.jar - netty.jar - find-root @@ -183,27 +179,25 @@ shell - thermostat-vm-heap-analysis-common-${project.version}.jar - thermostat-vm-heap-analysis-command-${project.version}.jar + com.redhat.thermostat.vm.heap.analysis.common${project.version} + com.redhat.thermostat.vm.heap.analysis.command${project.version} + com.redhat.thermostat.common.command${project.version} + com.redhat.thermostat.client.core${project.version} + com.redhat.thermostat.client.command${project.version} + com.redhat.thermostat.client.cli${project.version} + com.redhat.thermostat.storage.mongodb${project.version} + com.redhat.thermostat.web.common${project.version} + com.redhat.thermostat.web.client${project.version} + com.mongodb${mongo-driver.version} + org.apache.commons.beanutils${commons-beanutils.version} + org.apache.commons.codec${commons-codec.osgi-version} + org.apache.commons.collections${commons-collections.version} + org.apache.commons.logging${commons-logging.version} + org.apache.httpcomponents.httpcore${httpcomponents.version} + org.apache.httpcomponents.httpclient${httpcomponents.version} + com.google.gson${gson.version} + org.jboss.netty${netty.version} - - thermostat-common-command-${project.version}.jar - thermostat-client-core-${project.version}.jar - thermostat-client-command-${project.version}.jar - thermostat-client-cli-${project.version}.jar - thermostat-storage-mongodb-${project.version}.jar - thermostat-web-common-${project.version}.jar - thermostat-web-client-${project.version}.jar - mongo.jar - commons-beanutils.jar - commons-codec.jar - commons-collections.jar - commons-logging.jar - httpcomponents-core.jar - httpcomponents-client.jar - gson.jar - netty.jar - list-heap-dumps @@ -235,27 +229,25 @@ shell - thermostat-vm-heap-analysis-common-${project.version}.jar - thermostat-vm-heap-analysis-command-${project.version}.jar + com.redhat.thermostat.vm.heap.analysis.common${project.version} + com.redhat.thermostat.vm.heap.analysis.command${project.version} + com.redhat.thermostat.common.command${project.version} + com.redhat.thermostat.client.core${project.version} + com.redhat.thermostat.client.command${project.version} + com.redhat.thermostat.client.cli${project.version} + com.redhat.thermostat.storage.mongodb${project.version} + com.redhat.thermostat.web.common${project.version} + com.redhat.thermostat.web.client${project.version} + com.mongodb${mongo-driver.version} + org.apache.commons.beanutils${commons-beanutils.version} + org.apache.commons.codec${commons-codec.osgi-version} + org.apache.commons.collections${commons-collections.version} + org.apache.commons.logging${commons-logging.version} + org.apache.httpcomponents.httpcore${httpcomponents.version} + org.apache.httpcomponents.httpclient${httpcomponents.version} + com.google.gson${gson.version} + org.jboss.netty${netty.version} - - thermostat-common-command-${project.version}.jar - thermostat-client-core-${project.version}.jar - thermostat-client-command-${project.version}.jar - thermostat-client-cli-${project.version}.jar - thermostat-storage-mongodb-${project.version}.jar - thermostat-web-common-${project.version}.jar - thermostat-web-client-${project.version}.jar - mongo.jar - commons-beanutils.jar - commons-codec.jar - commons-collections.jar - commons-logging.jar - httpcomponents-core.jar - httpcomponents-client.jar - gson.jar - netty.jar - object-info @@ -287,27 +279,25 @@ shell - thermostat-vm-heap-analysis-common-${project.version}.jar - thermostat-vm-heap-analysis-command-${project.version}.jar + com.redhat.thermostat.vm.heap.analysis.common${project.version} + com.redhat.thermostat.vm.heap.analysis.command${project.version} + com.redhat.thermostat.common.command${project.version} + com.redhat.thermostat.client.core${project.version} + com.redhat.thermostat.client.command${project.version} + com.redhat.thermostat.client.cli${project.version} + com.redhat.thermostat.storage.mongodb${project.version} + com.redhat.thermostat.web.common${project.version} + com.redhat.thermostat.web.client${project.version} + com.mongodb${mongo-driver.version} + org.apache.commons.beanutils${commons-beanutils.version} + org.apache.commons.codec${commons-codec.osgi-version} + org.apache.commons.collections${commons-collections.version} + org.apache.commons.logging${commons-logging.version} + org.apache.httpcomponents.httpcore${httpcomponents.version} + org.apache.httpcomponents.httpclient${httpcomponents.version} + com.google.gson${gson.version} + org.jboss.netty${netty.version} - - thermostat-common-command-${project.version}.jar - thermostat-client-core-${project.version}.jar - thermostat-client-command-${project.version}.jar - thermostat-client-cli-${project.version}.jar - thermostat-storage-mongodb-${project.version}.jar - thermostat-web-common-${project.version}.jar - thermostat-web-client-${project.version}.jar - mongo.jar - commons-beanutils.jar - commons-codec.jar - commons-collections.jar - commons-logging.jar - httpcomponents-core.jar - httpcomponents-client.jar - gson.jar - netty.jar - save-heap-dump-to-file @@ -339,27 +329,25 @@ shell - thermostat-vm-heap-analysis-common-${project.version}.jar - thermostat-vm-heap-analysis-command-${project.version}.jar + com.redhat.thermostat.vm.heap.analysis.common${project.version} + com.redhat.thermostat.vm.heap.analysis.command${project.version} + com.redhat.thermostat.common.command${project.version} + com.redhat.thermostat.client.core${project.version} + com.redhat.thermostat.client.command${project.version} + com.redhat.thermostat.client.cli${project.version} + com.redhat.thermostat.storage.mongodb${project.version} + com.redhat.thermostat.web.common${project.version} + com.redhat.thermostat.web.client${project.version} + com.mongodb${mongo-driver.version} + org.apache.commons.beanutils${commons-beanutils.version} + org.apache.commons.codec${commons-codec.osgi-version} + org.apache.commons.collections${commons-collections.version} + org.apache.commons.logging${commons-logging.version} + org.apache.httpcomponents.httpcore${httpcomponents.version} + org.apache.httpcomponents.httpclient${httpcomponents.version} + com.google.gson${gson.version} + org.jboss.netty${netty.version} - - thermostat-common-command-${project.version}.jar - thermostat-client-core-${project.version}.jar - thermostat-client-command-${project.version}.jar - thermostat-client-cli-${project.version}.jar - thermostat-storage-mongodb-${project.version}.jar - thermostat-web-common-${project.version}.jar - thermostat-web-client-${project.version}.jar - mongo.jar - commons-beanutils.jar - commons-codec.jar - commons-collections.jar - commons-logging.jar - httpcomponents-core.jar - httpcomponents-client.jar - gson.jar - netty.jar - show-heap-histogram @@ -384,51 +372,50 @@ shell - thermostat-vm-heap-analysis-common-${project.version}.jar - thermostat-vm-heap-analysis-command-${project.version}.jar + com.redhat.thermostat.vm.heap.analysis.common${project.version} + com.redhat.thermostat.vm.heap.analysis.command${project.version} + com.redhat.thermostat.common.command${project.version} + com.redhat.thermostat.client.core${project.version} + com.redhat.thermostat.client.command${project.version} + com.redhat.thermostat.client.cli${project.version} + com.redhat.thermostat.storage.mongodb${project.version} + com.redhat.thermostat.web.common${project.version} + com.redhat.thermostat.web.client${project.version} + com.mongodb${mongo-driver.version} + org.apache.commons.beanutils${commons-beanutils.version} + org.apache.commons.codec${commons-codec.osgi-version} + org.apache.commons.collections${commons-collections.version} + org.apache.commons.logging${commons-logging.version} + org.apache.httpcomponents.httpcore${httpcomponents.version} + org.apache.httpcomponents.httpclient${httpcomponents.version} + com.google.gson${gson.version} + org.jboss.netty${netty.version} - - thermostat-common-command-${project.version}.jar - thermostat-client-core-${project.version}.jar - thermostat-client-command-${project.version}.jar - thermostat-client-cli-${project.version}.jar - thermostat-storage-mongodb-${project.version}.jar - thermostat-web-common-${project.version}.jar - thermostat-web-client-${project.version}.jar - mongo.jar - commons-beanutils.jar - commons-codec.jar - commons-collections.jar - commons-logging.jar - httpcomponents-core.jar - httpcomponents-client.jar - gson.jar - netty.jar - gui - thermostat-vm-heap-analysis-common-${project.version}.jar - thermostat-vm-heap-analysis-command-${project.version}.jar - thermostat-vm-heap-analysis-client-core-${project.version}.jar - thermostat-vm-heap-analysis-client-swing-${project.version}.jar + com.redhat.thermostat.vm.heap.analysis.common${project.version} + com.redhat.thermostat.vm.heap.analysis.command${project.version} + com.redhat.thermostat.common.command${project.version} + com.redhat.thermostat.client.core${project.version} + com.redhat.thermostat.client.swing${project.version} agent - thermostat-vm-heap-analysis-common-${project.version}.jar - thermostat-vm-heap-analysis-agent-${project.version}.jar + com.redhat.thermostat.vm.heap.analysis.common${project.version} + com.redhat.thermostat.vm.heap.analysis.agent${project.version} webservice - thermostat-vm-heap-analysis-common-${project.version}.jar + com.redhat.thermostat.vm.heap.analysis.common${project.version} diff -r 468d91f69d67 -r cb2842943f60 vm-jmx/distribution/thermostat-plugin.xml --- a/vm-jmx/distribution/thermostat-plugin.xml Fri Jul 19 15:35:58 2013 +0200 +++ b/vm-jmx/distribution/thermostat-plugin.xml Wed Jul 24 13:56:13 2013 -0400 @@ -43,16 +43,16 @@ gui - thermostat-vm-jmx-common-${project.version}.jar - thermostat-vm-jmx-client-core-${project.version}.jar - thermostat-vm-jmx-client-swing-${project.version}.jar + com.redhat.thermostat.vm.jmx.common${project.version} + com.redhat.thermostat.vm.jmx.client.core${project.version} + com.redhat.thermostat.vm.jmx.client.swing${project.version} agent - thermostat-vm-jmx-agent-${project.version}.jar - thermostat-vm-jmx-common-${project.version}.jar + com.redhat.thermostat.vm.jmx.common${project.version} + com.redhat.thermostat.vm.jmx.agent${project.version} diff -r 468d91f69d67 -r cb2842943f60 vm-memory/distribution/thermostat-plugin.xml --- a/vm-memory/distribution/thermostat-plugin.xml Fri Jul 19 15:35:58 2013 +0200 +++ b/vm-memory/distribution/thermostat-plugin.xml Wed Jul 24 13:56:13 2013 -0400 @@ -43,30 +43,30 @@ gui - thermostat-vm-memory-common-${project.version}.jar - thermostat-vm-memory-client-core-${project.version}.jar - thermostat-vm-memory-client-swing-${project.version}.jar + com.redhat.thermostat.vm.memory.common${project.version} + com.redhat.thermostat.vm.memory.client.core${project.version} + com.redhat.thermostat.vm.memory.client.swing${project.version} agent - thermostat-vm-memory-common-${project.version}.jar - thermostat-vm-memory-agent-${project.version}.jar + com.redhat.thermostat.vm.memory.common${project.version} + com.redhat.thermostat.vm.memory.agent${project.version} webservice - thermostat-vm-memory-common-${project.version}.jar + com.redhat.thermostat.vm.memory.common${project.version} vm-stat - thermostat-vm-memory-common-${project.version}.jar - thermostat-vm-memory-client-cli-${project.version}.jar + com.redhat.thermostat.vm.memory.common${project.version} + com.redhat.thermostat.vm.memory.client.cli${project.version} diff -r 468d91f69d67 -r cb2842943f60 vm-overview/distribution/thermostat-plugin.xml --- a/vm-overview/distribution/thermostat-plugin.xml Fri Jul 19 15:35:58 2013 +0200 +++ b/vm-overview/distribution/thermostat-plugin.xml Wed Jul 24 13:56:13 2013 -0400 @@ -43,8 +43,8 @@ gui - thermostat-vm-overview-client-core-${project.version}.jar - thermostat-vm-overview-client-swing-${project.version}.jar + com.redhat.thermostat.vm.overview.client.core${project.version} + com.redhat.thermostat.vm.overview.client.swing${project.version}