changeset 3:3da8ac5218d6

Add files to build rpms for thermostat and all dependencies
author Jie Kang <jkang@redhat.com>
date Wed, 03 Jun 2015 09:59:33 -0400
parents fea001818a09
children 339c5fe5500a
files build-order rpmbuild/SOURCES/bump-aries-version.patch rpmbuild/SOURCES/felix-scr-fix.patch rpmbuild/SOURCES/fix_bundle_loading-new.patch rpmbuild/SOURCES/ignore_bundle_versions.patch rpmbuild/SOURCES/maven-scr-plugin-1.20.0.tar.gz rpmbuild/SOURCES/org.apache.felix.framework-4.6.0.tar.gz rpmbuild/SOURCES/org.apache.felix.scr-1.8.2.tar.gz rpmbuild/SOURCES/org.apache.felix.scr.annotations-1.9.6.tar.gz rpmbuild/SOURCES/org.apache.felix.scr.generator-1.12.0.tar.gz rpmbuild/SOURCES/org.apache.felix.utils-1.6.0-source-release.tar.gz rpmbuild/SOURCES/osgi.annotation-6.0.0-sources.jar rpmbuild/SOURCES/osgi.annotation-6.0.0.pom rpmbuild/SOURCES/osgi_spec_fixes.patch rpmbuild/SOURCES/remove-apache-aries-versioning-plugin.patch rpmbuild/SOURCES/remove-system-scope.patch rpmbuild/SOURCES/scl-thermostat-tomcat-service-sysconfig rpmbuild/SOURCES/test-ambiguity.patch rpmbuild/SOURCES/thermostat-1.99.2-SNAPSHOT.tar.gz rpmbuild/SOURCES/thermostat-local rpmbuild/SOURCES/thermostat-sysconfig rpmbuild/SOURCES/thermostat_icon_64px.svg rpmbuild/SOURCES/web_storage_endpoint_fix.patch rpmbuild/SOURCES/webstorage_service_custom_jaas.patch rpmbuild/SPECS/felix-framework.spec rpmbuild/SPECS/felix-scr-annotations.spec rpmbuild/SPECS/felix-scr-generator.spec rpmbuild/SPECS/felix-scr.spec rpmbuild/SPECS/felix-utils.spec rpmbuild/SPECS/maven-scr-plugin.spec rpmbuild/SPECS/osgi-annotation.spec rpmbuild/SPECS/thermostat.spec
diffstat 32 files changed, 4814 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/build-order	Wed Jun 03 09:59:33 2015 -0400
@@ -0,0 +1,10 @@
+Build order:
+
+osgi-annotation
+felix-utils
+felix-framework
+felix-scr-generator
+felix-scr-annotations
+maven-scr-plugin
+felix-scr
+thermostat
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/rpmbuild/SOURCES/bump-aries-version.patch	Wed Jun 03 09:59:33 2015 -0400
@@ -0,0 +1,13 @@
+Index: pom.xml
+===================================================================
+--- pom.xml	(revision 1681751)
++++ pom.xml	(working copy)
+@@ -425,7 +425,7 @@
+              <plugin>
+                 <groupId>org.apache.aries.versioning</groupId>
+                 <artifactId>org.apache.aries.versioning.plugin</artifactId>
+-                <version>0.1.0</version>
++                <version>0.3.0</version>
+                 <executions>
+                     <execution>
+                         <id>default-verify</id>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/rpmbuild/SOURCES/felix-scr-fix.patch	Wed Jun 03 09:59:33 2015 -0400
@@ -0,0 +1,247 @@
+Index: pom.xml
+===================================================================
+--- pom.xml	(revision 1681751)
++++ pom.xml	(working copy)
+@@ -36,7 +36,7 @@
+         <developerConnection>scm:svn:https://svn.apache.org/repos/asf/felix/releases/org.apache.felix.scr-1.8.2</developerConnection>
+         <url>scm:svn:https://svn.apache.org/repos/asf/felix/releases/org.apache.felix.scr-1.8.2</url>
+     </scm>
+-    
++
+     <!--
+         A Note on Testing
+         =================
+@@ -72,20 +72,13 @@
+         </bundle.file.name>
+         <felix.ca.version>1.8.0</felix.ca.version>
+     </properties>
+-    
+-    
++
++
+     <dependencies>
+         <dependency>
+-            <groupId>org.osgi</groupId>
+-            <artifactId>org.osgi.core</artifactId>
+-            <version>5.0.0</version>
+-            <scope>provided</scope>
+-            <exclusions>
+-                <exclusion>
+-                    <groupId>org.osgi</groupId>
+-                    <artifactId>org.osgi.compendium</artifactId>
+-                </exclusion>
+-            </exclusions>
++            <groupId>org.apache.felix</groupId>
++            <artifactId>org.apache.felix.framework</artifactId>
++            <version>4.6.0</version>
+         </dependency>
+         <dependency>
+             <groupId>org.osgi</groupId>
+@@ -138,7 +131,7 @@
+             <version>3.2.0</version>
+             <scope>test</scope>
+         </dependency>
+-    
++
+         <dependency>
+             <groupId>org.ops4j.pax.exam</groupId>
+             <artifactId>pax-exam-link-mvn</artifactId>
+@@ -145,7 +138,7 @@
+             <version>3.2.0</version>
+             <scope>test</scope>
+         </dependency>
+-    
++
+         <dependency>
+             <groupId>org.ops4j.pax.url</groupId>
+             <artifactId>pax-url-aether</artifactId>
+@@ -170,7 +163,7 @@
+             <version>1.6.3</version>
+             <scope>test</scope>
+         </dependency>
+-    
++
+         <dependency>
+             <groupId>ch.qos.logback</groupId>
+             <artifactId>logback-core</artifactId>
+@@ -177,7 +170,7 @@
+             <version>0.9.29</version>
+             <scope>test</scope>
+         </dependency>
+-    
++
+         <dependency>
+             <groupId>ch.qos.logback</groupId>
+             <artifactId>logback-classic</artifactId>
+@@ -220,12 +213,12 @@
+             <version>1.0.0</version>
+             <scope>test</scope>
+         </dependency>
+-		<dependency>
+-			<groupId>org.codehaus.mojo</groupId>
+-			<artifactId>animal-sniffer-annotations</artifactId>
+-			<version>1.9</version>
+-			<scope>compile</scope>
+-		</dependency>
++        <dependency>
++            <groupId>org.codehaus.mojo</groupId>
++            <artifactId>animal-sniffer-annotations</artifactId>
++            <version>1.9</version>
++            <scope>compile</scope>
++        </dependency>
+     </dependencies>
+     <build>
+         <directory>${bundle.build.name}</directory>
+@@ -251,7 +244,7 @@
+                         <Export-Package>
+                             org.apache.felix.scr;version=1.8,
+                             org.apache.felix.scr.component;version=1.0;
+-                                mandatory:="status"; status="provisional",
++                            mandatory:="status"; status="provisional",
+                             org.osgi.service.component
+                         </Export-Package>
+                         <Private-Package>
+@@ -275,12 +268,12 @@
+                                 optional import for Gogo annotations 
+                             -->
+                             org.apache.felix.service.command;resolution:=optional,
+-                            
++
+                             <!--
+                                 The Felix Shell support is optional 
+                             -->
+                             org.apache.felix.shell;provide:=true;resolution:=optional,
+-                            
++
+                             <!--
+                                 Framework version 1.4 (from R4.1) is required
+                                 because we depend on ServiceReference being
+@@ -288,7 +281,7 @@
+                                 being available.
+                             -->
+                             org.osgi.framework;version="[1.4,2)",
+-                            
++
+                             <!--
+                                 LogService is optional but if present the
+                                 R4.0 version 1.3 is sufficient.
+@@ -302,7 +295,7 @@
+                                 R4.0 version 1.2 is sufficient. 
+                             -->
+                             org.osgi.service.packageadmin;version="[1.2,2)";resolution:=optional,
+-                            
++
+                             <!--
+                                 SCR API is required (we also export it) and must
+                                 be of the same minor version as we export, because
+@@ -327,7 +320,7 @@
+                                 Configuration Admin version 1.2 (from R4.0) is enough
+                             -->
+                             org.osgi.service.cm;version="[1.2,2)",
+-                            
++
+                             <!--
+                                 Metatype is optional and if it is
+                                 present, version 1.1 (from R4.1) is enough  
+@@ -345,7 +338,7 @@
+                 Ensure not using too recent Java API
+                 - Ensure Java 5 API
+             -->
+-             <plugin>
++            <plugin>
+                 <groupId>org.codehaus.mojo</groupId>
+                 <artifactId>animal-sniffer-maven-plugin</artifactId>
+                 <version>1.7</version>
+@@ -394,17 +387,17 @@
+                 <artifactId>maven-failsafe-plugin</artifactId>
+                 <version>2.12</version>
+                 <executions>
+-                  <execution>
+-                    <goals>
+-                      <goal>integration-test</goal>
+-                      <goal>verify</goal>
+-                    </goals>
+-                  </execution>
++                    <execution>
++                        <goals>
++                            <goal>integration-test</goal>
++                            <goal>verify</goal>
++                        </goals>
++                    </execution>
+                 </executions>
+                 <configuration>
+                     <systemPropertyVariables>
+                         <project.bundle.file>${bundle.file.name}</project.bundle.file>
+-                        <felix.ca.version>${felix.ca.version}</felix.ca.version>    
++                        <felix.ca.version>${felix.ca.version}</felix.ca.version>
+                     </systemPropertyVariables>
+                     <excludes>
+                         <exclude>**/components/**</exclude>
+@@ -422,7 +415,7 @@
+                     <excludePackageNames>*.impl</excludePackageNames>
+                 </configuration>
+             </plugin>
+-             <plugin>
++            <plugin>
+                 <groupId>org.apache.aries.versioning</groupId>
+                 <artifactId>org.apache.aries.versioning.plugin</artifactId>
+                 <version>0.1.0</version>
+@@ -442,20 +435,6 @@
+         </plugins>
+     </build>
+ 
+-	<reporting>
+-		<plugins>
+-			<plugin>
+-				<groupId>org.codehaus.mojo</groupId>
+-				<artifactId>findbugs-maven-plugin</artifactId>
+-				<version>2.5.2</version>
+-				<configuration>
+-					<effort>Max</effort>
+-					<threshold>Low</threshold>
+-				</configuration>
+-			</plugin>
+-		</plugins>
+-	</reporting>
+-
+     <profiles>
+         <!--
+             copy the package such that IDEs may easily use it without
+@@ -491,14 +470,6 @@
+             <activation>
+                 <activeByDefault>true</activeByDefault>
+             </activation>
+-            <dependencies>
+-                <dependency>
+-                    <groupId>org.apache.felix</groupId>
+-                    <artifactId>org.apache.felix.framework</artifactId>
+-                    <version>4.0.2</version>
+-                    <scope>test</scope>
+-                </dependency>
+-            </dependencies>
+         </profile>
+         <profile>
+             <id>equinox</id>
+@@ -520,5 +491,4 @@
+             </properties>
+         </profile>
+     </profiles>
+-        
+ </project>
+Index: src/main/java/org/apache/felix/scr/impl/manager/ThreadDump.java
+===================================================================
+--- src/main/java/org/apache/felix/scr/impl/manager/ThreadDump.java	(revision 1681751)
++++ src/main/java/org/apache/felix/scr/impl/manager/ThreadDump.java	(working copy)
+@@ -23,12 +23,9 @@
+ import java.lang.management.ThreadMXBean;
+ import java.util.concurrent.Callable;
+ 
+-import org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement;
+-
+ public class ThreadDump implements Callable<String>
+ {
+ 
+-    @IgnoreJRERequirement
+     public String call() throws Exception
+     {
+         ThreadMXBean threadMXBean = ManagementFactory.getThreadMXBean();
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/rpmbuild/SOURCES/fix_bundle_loading-new.patch	Wed Jun 03 09:59:33 2015 -0400
@@ -0,0 +1,364 @@
+# HG changeset patch
+# Parent 569c59a6b65ee1cf8e85a4ae9bf1218ff063fea4
+diff --git a/distribution/config/commands/agent-info.properties b/distribution/config/commands/agent-info.properties
+--- a/distribution/config/commands/agent-info.properties
++++ b/distribution/config/commands/agent-info.properties
+@@ -4,7 +4,6 @@
+           com.redhat.thermostat.web.client=${project.version}, \
+           org.apache.httpcomponents.httpcore=${httpcomponents.core.version}, \
+           org.apache.httpcomponents.httpclient=${httpcomponents.client.version}, \
+-          ${osgi.compendium.bundle.symbolic-name}=${osgi.compendium.osgi-version}, \
+           com.google.gson=${gson.version}, \
+           org.mongodb.mongo-java-driver=${mongo-driver.osgi-version}, \
+           org.apache.commons.beanutils=${commons-beanutils.version}, \
+diff --git a/distribution/config/commands/agent.properties b/distribution/config/commands/agent.properties
+--- a/distribution/config/commands/agent.properties
++++ b/distribution/config/commands/agent.properties
+@@ -3,7 +3,7 @@
+           com.redhat.thermostat.web.client=${project.version}, \
+           org.apache.httpcomponents.httpcore=${httpcomponents.core.version}, \
+           org.apache.httpcomponents.httpclient=${httpcomponents.client.version}, \
+-          ${osgi.compendium.bundle.symbolic-name}=${osgi.compendium.osgi-version}, \
++          org.apache.httpcomponents.httpmime=${httpcomponents.mime.version}, \
+           com.google.gson=${gson.version}, \
+           com.redhat.thermostat.process=${project.version}, \
+           com.redhat.thermostat.common.core=${project.version}, \
+diff --git a/distribution/config/commands/clean-data.properties b/distribution/config/commands/clean-data.properties
+--- a/distribution/config/commands/clean-data.properties
++++ b/distribution/config/commands/clean-data.properties
+@@ -4,7 +4,7 @@
+           com.redhat.thermostat.web.client=${project.version}, \
+           org.apache.httpcomponents.httpcore=${httpcomponents.core.version}, \
+           org.apache.httpcomponents.httpclient=${httpcomponents.client.version}, \
+-          ${osgi.compendium.bundle.symbolic-name}=${osgi.compendium.osgi-version}, \
++          org.apache.httpcomponents.httpmime=${httpcomponents.mime.version}, \
+           com.google.gson=${gson.version}, \
+           org.mongodb.mongo-java-driver=${mongo-driver.osgi-version}, \
+           org.apache.commons.beanutils=${commons-beanutils.version}, \
+diff --git a/distribution/config/commands/connect.properties b/distribution/config/commands/connect.properties
+--- a/distribution/config/commands/connect.properties
++++ b/distribution/config/commands/connect.properties
+@@ -10,7 +10,7 @@
+           org.apache.commons.logging=${commons-logging.version}, \
+           org.apache.httpcomponents.httpcore=${httpcomponents.core.version}, \
+           org.apache.httpcomponents.httpclient=${httpcomponents.client.version}, \
+-          ${osgi.compendium.bundle.symbolic-name}=${osgi.compendium.osgi-version}, \
++          org.apache.httpcomponents.httpmime=${httpcomponents.mime.version}, \
+           com.google.gson=${gson.version}
+ 
+ summary = persistently connect to storage
+diff --git a/distribution/config/commands/gui.properties b/distribution/config/commands/gui.properties
+--- a/distribution/config/commands/gui.properties
++++ b/distribution/config/commands/gui.properties
+@@ -19,8 +19,10 @@
+           com.redhat.thermostat.process=${project.version}, \
+           org.apache.httpcomponents.httpcore=${httpcomponents.core.version}, \
+           org.apache.httpcomponents.httpclient=${httpcomponents.client.version}, \
+-          ${osgi.compendium.bundle.symbolic-name}=${osgi.compendium.osgi-version}, \
+-          org.jboss.netty=${netty.version}
++          org.apache.httpcomponents.httpmime=${httpcomponents.mime.version}, \
++          org.jboss.netty=${netty.version}, \
++          org.jfree.jcommon=${jcommon.osgi.version} , \
++          org.jfree.jfreechart=${jfreechart.osgi.version}
+ 
+ summary = launch the GUI client
+ 
+diff --git a/distribution/config/commands/list-agents.properties b/distribution/config/commands/list-agents.properties
+--- a/distribution/config/commands/list-agents.properties
++++ b/distribution/config/commands/list-agents.properties
+@@ -4,7 +4,6 @@
+           com.redhat.thermostat.web.client=${project.version}, \
+           org.apache.httpcomponents.httpcore=${httpcomponents.core.version}, \
+           org.apache.httpcomponents.httpclient=${httpcomponents.client.version}, \
+-          ${osgi.compendium.bundle.symbolic-name}=${osgi.compendium.osgi-version}, \
+           com.google.gson=${gson.version}, \
+           org.mongodb.mongo-java-driver=${mongo-driver.osgi-version}, \
+           org.apache.commons.beanutils=${commons-beanutils.version}, \
+diff --git a/distribution/config/commands/list-vms.properties b/distribution/config/commands/list-vms.properties
+--- a/distribution/config/commands/list-vms.properties
++++ b/distribution/config/commands/list-vms.properties
+@@ -4,7 +4,7 @@
+           com.redhat.thermostat.web.client=${project.version}, \
+           org.apache.httpcomponents.httpcore=${httpcomponents.core.version}, \
+           org.apache.httpcomponents.httpclient=${httpcomponents.client.version}, \
+-          ${osgi.compendium.bundle.symbolic-name}=${osgi.compendium.osgi-version}, \
++          org.apache.httpcomponents.httpmime=${httpcomponents.mime.version}, \
+           com.google.gson=${gson.version}, \
+           org.mongodb.mongo-java-driver=${mongo-driver.osgi-version}, \
+           org.apache.commons.beanutils=${commons-beanutils.version}, \
+diff --git a/distribution/config/commands/ping.properties b/distribution/config/commands/ping.properties
+--- a/distribution/config/commands/ping.properties
++++ b/distribution/config/commands/ping.properties
+@@ -5,7 +5,7 @@
+           com.redhat.thermostat.web.client=${project.version}, \
+           org.apache.httpcomponents.httpcore=${httpcomponents.core.version}, \
+           org.apache.httpcomponents.httpclient=${httpcomponents.client.version}, \
+-          ${osgi.compendium.bundle.symbolic-name}=${osgi.compendium.osgi-version}, \
++          org.apache.httpcomponents.httpmime=${httpcomponents.mime.version}, \
+           com.google.gson=${gson.version}, \
+           org.mongodb.mongo-java-driver=${mongo-driver.osgi-version}, \
+           org.apache.commons.beanutils=${commons-beanutils.version}, \
+diff --git a/distribution/config/commands/vm-info.properties b/distribution/config/commands/vm-info.properties
+--- a/distribution/config/commands/vm-info.properties
++++ b/distribution/config/commands/vm-info.properties
+@@ -4,7 +4,7 @@
+           com.redhat.thermostat.web.client=${project.version}, \
+           org.apache.httpcomponents.httpcore=${httpcomponents.core.version}, \
+           org.apache.httpcomponents.httpclient=${httpcomponents.client.version}, \
+-          ${osgi.compendium.bundle.symbolic-name}=${osgi.compendium.osgi-version}, \
++          org.apache.httpcomponents.httpmime=${httpcomponents.mime.version}, \
+           com.google.gson=${gson.version}, \
+           org.mongodb.mongo-java-driver=${mongo-driver.osgi-version}, \
+           org.apache.commons.beanutils=${commons-beanutils.version}, \
+diff --git a/distribution/config/commands/vm-stat.properties b/distribution/config/commands/vm-stat.properties
+--- a/distribution/config/commands/vm-stat.properties
++++ b/distribution/config/commands/vm-stat.properties
+@@ -5,13 +5,15 @@
+           com.redhat.thermostat.client.core=${project.version}, \
+           org.apache.httpcomponents.httpcore=${httpcomponents.core.version}, \
+           org.apache.httpcomponents.httpclient=${httpcomponents.client.version}, \
+-          ${osgi.compendium.bundle.symbolic-name}=${osgi.compendium.osgi-version}, \
++          org.apache.httpcomponents.httpmime=${httpcomponents.mime.version}, \
+           com.google.gson=${gson.version}, \
+           org.mongodb.mongo-java-driver=${mongo-driver.osgi-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.commons.logging=${commons-logging.version}, \
++          org.jfree.jcommon=${jcommon.osgi.version}, \
++          org.jfree.jfreechart=${jfreechart.osgi.version}
+ 
+ summary = show various statistics about a VM
+ 
+diff --git a/distribution/config/logging.properties b/distribution/config/logging.properties
+--- a/distribution/config/logging.properties
++++ b/distribution/config/logging.properties
+@@ -60,12 +60,12 @@
+ # Possible levels are in descending order:
+ #com.redhat.thermostat.level=OFF
+ #com.redhat.thermostat.level=SEVERE
+-#com.redhat.thermostat.level=WARNING
++com.redhat.thermostat.level=WARNING
+ #com.redhat.thermostat.level=INFO
+ #com.redhat.thermostat.level=CONFIG
+ #com.redhat.thermostat.level=FINE
+ #com.redhat.thermostat.level=FINER
+-com.redhat.thermostat.level=FINEST
++#com.redhat.thermostat.level=FINEST
+ #com.redhat.thermostat.level=PERFLOG
+ #com.redhat.thermostat.level=ALL
+ 
+diff --git a/distribution/config/osgi-export.properties b/distribution/config/osgi-export.properties
+--- a/distribution/config/osgi-export.properties
++++ b/distribution/config/osgi-export.properties
+@@ -32,22 +32,6 @@
+ # library, but you are not obligated to do so.  If you do not wish
+ # to do so, delete this exception statement from your version.
+ 
+-# jfreechart is no OSGi bundle upstream. The jar is on the
+-# classpath and packages thus made available this way.
+-org.jfree.chart
+-org.jfree.chart.axis
+-org.jfree.chart.event
+-org.jfree.chart.labels
+-org.jfree.chart.plot
+-org.jfree.chart.panel
+-org.jfree.chart.renderer.xy
+-org.jfree.data
+-org.jfree.data.general
+-org.jfree.data.time
+-org.jfree.data.xy
+-org.jfree.ui
+-org.jfree.data.gantt
+-
+ sun.swing
+ sun.swing.table
+ sun.misc
+diff --git a/distribution/scripts/thermostat b/distribution/scripts/thermostat
+--- a/distribution/scripts/thermostat
++++ b/distribution/scripts/thermostat
+@@ -56,13 +56,10 @@
+ 
+ # This is the minimal boot classpath thermostat needs. Other dependencies
+ # will get started by the OSGi framework once that's up.
+-SERVICE_CLASSPATH="${THERMOSTAT_LIBS}/org.apache.felix.framework-@felix.framework.version@.jar"
++SERVICE_CLASSPATH="${THERMOSTAT_LIBS}/org.apache.felix.framework.jar"
+ SERVICE_CLASSPATH="${SERVICE_CLASSPATH}:${THERMOSTAT_LIBS}/thermostat-launcher-@project.version@.jar"
+ SERVICE_CLASSPATH="${SERVICE_CLASSPATH}:${THERMOSTAT_LIBS}/thermostat-main-@project.version@.jar"
+ SERVICE_CLASSPATH="${SERVICE_CLASSPATH}:${THERMOSTAT_LIBS}/thermostat-shared-config-@project.version@.jar"
+-# FIXME: Remove once jfreechart is a real OSGi bundle upstream
+-SERVICE_CLASSPATH="${SERVICE_CLASSPATH}:${THERMOSTAT_LIBS}/jfreechart-@jfreechart.version@.jar"
+-SERVICE_CLASSPATH="${SERVICE_CLASSPATH}:${THERMOSTAT_LIBS}/jcommon-@jcommon.version@.jar"
+ # Needed to parse web.xml files without network connection See PR 2029.
+ SERVICE_CLASSPATH="${SERVICE_CLASSPATH}:${THERMOSTAT_HOME}/plugins/embedded-web-endpoint/jetty-schemas-@jetty-schemas.version@.jar"
+ SERVICE_CLASSPATH="${TOOLS_JAR}:${SERVICE_CLASSPATH}"
+diff --git a/killvm/distribution/thermostat-plugin.xml b/killvm/distribution/thermostat-plugin.xml
+--- a/killvm/distribution/thermostat-plugin.xml
++++ b/killvm/distribution/thermostat-plugin.xml
+@@ -81,7 +81,7 @@
+         <bundle><symbolic-name>org.apache.commons.logging</symbolic-name><version>${commons-logging.version}</version></bundle>
+         <bundle><symbolic-name>org.apache.httpcomponents.httpcore</symbolic-name><version>${httpcomponents.core.version}</version></bundle>
+         <bundle><symbolic-name>org.apache.httpcomponents.httpclient</symbolic-name><version>${httpcomponents.client.version}</version></bundle>
+-        <bundle><symbolic-name>${osgi.compendium.bundle.symbolic-name}</symbolic-name><version>${osgi.compendium.osgi-version}</version></bundle>
++        <bundle><symbolic-name>org.apache.httpcomponents.httpmime</symbolic-name><version>${httpcomponents.mime.version}</version></bundle>
+         <bundle><symbolic-name>com.google.gson</symbolic-name><version>${gson.version}</version></bundle>
+         <bundle><symbolic-name>org.jboss.netty</symbolic-name><version>${netty.version}</version></bundle>
+       </bundles>
+diff --git a/main/src/main/resources/com/redhat/thermostat/main/impl/bootstrapbundles.properties b/main/src/main/resources/com/redhat/thermostat/main/impl/bootstrapbundles.properties
+--- a/main/src/main/resources/com/redhat/thermostat/main/impl/bootstrapbundles.properties
++++ b/main/src/main/resources/com/redhat/thermostat/main/impl/bootstrapbundles.properties
+@@ -4,6 +4,7 @@
+         thermostat-common-core-${project.version}.jar, \
+         thermostat-plugin-validator-${project.version}.jar, \
+         thermostat-launcher-${project.version}.jar, \
+-        jline-${jline.version}.jar, \
+-        commons-cli-${commons-cli.version}.jar, \
++        jline2.jar, \
++        jansi.jar, \
++        commons-cli.jar, \
+         org.apache.felix.scr-${felix.scr.version}.jar, \
+diff --git a/storage-profile/distribution/thermostat-plugin.xml b/storage-profile/distribution/thermostat-plugin.xml
+--- a/storage-profile/distribution/thermostat-plugin.xml
++++ b/storage-profile/distribution/thermostat-plugin.xml
+@@ -70,9 +70,9 @@
+         <bundle><symbolic-name>com.redhat.thermostat.storage.mongodb</symbolic-name><version>${project.version}</version></bundle>
+         <bundle><symbolic-name>com.redhat.thermostat.web.common</symbolic-name><version>${project.version}</version></bundle>
+         <bundle><symbolic-name>com.redhat.thermostat.web.client</symbolic-name><version>${project.version}</version></bundle>
+-        <bundle><symbolic-name>${osgi.compendium.bundle.symbolic-name}</symbolic-name><version>${osgi.compendium.osgi-version}</version></bundle>
+         <bundle><symbolic-name>org.apache.httpcomponents.httpcore</symbolic-name><version>${httpcomponents.core.version}</version></bundle>
+         <bundle><symbolic-name>org.apache.httpcomponents.httpclient</symbolic-name><version>${httpcomponents.client.version}</version></bundle>
++        <bundle><symbolic-name>org.apache.httpcomponents.httpmime</symbolic-name><version>${httpcomponents.mime.version}</version></bundle>
+         <bundle><symbolic-name>com.google.gson</symbolic-name><version>${gson.version}</version></bundle>
+         <bundle><symbolic-name>org.mongodb.mongo-java-driver</symbolic-name><version>${mongo-driver.osgi-version}</version></bundle>
+         <bundle><symbolic-name>org.apache.commons.beanutils</symbolic-name><version>${commons-beanutils.version}</version></bundle>
+diff --git a/vm-gc/distribution/thermostat-plugin.xml b/vm-gc/distribution/thermostat-plugin.xml
+--- a/vm-gc/distribution/thermostat-plugin.xml
++++ b/vm-gc/distribution/thermostat-plugin.xml
+@@ -76,7 +76,7 @@
+         <bundle><symbolic-name>org.apache.commons.logging</symbolic-name><version>${commons-logging.version}</version></bundle>
+         <bundle><symbolic-name>org.apache.httpcomponents.httpcore</symbolic-name><version>${httpcomponents.core.version}</version></bundle>
+         <bundle><symbolic-name>org.apache.httpcomponents.httpclient</symbolic-name><version>${httpcomponents.client.version}</version></bundle>
+-        <bundle><symbolic-name>${osgi.compendium.bundle.symbolic-name}</symbolic-name><version>${osgi.compendium.osgi-version}</version></bundle>
++        <bundle><symbolic-name>org.apache.httpcomponents.httpmime</symbolic-name><version>${httpcomponents.mime.version}</version></bundle>
+         <bundle><symbolic-name>com.google.gson</symbolic-name><version>${gson.version}</version></bundle>
+         <bundle><symbolic-name>org.jboss.netty</symbolic-name><version>${netty.version}</version></bundle>
+       </bundles>
+diff --git a/vm-heap-analysis/distribution/thermostat-plugin.xml b/vm-heap-analysis/distribution/thermostat-plugin.xml
+--- a/vm-heap-analysis/distribution/thermostat-plugin.xml
++++ b/vm-heap-analysis/distribution/thermostat-plugin.xml
+@@ -87,9 +87,11 @@
+         <bundle><symbolic-name>org.apache.commons.logging</symbolic-name><version>${commons-logging.version}</version></bundle>
+         <bundle><symbolic-name>org.apache.httpcomponents.httpcore</symbolic-name><version>${httpcomponents.core.version}</version></bundle>
+         <bundle><symbolic-name>org.apache.httpcomponents.httpclient</symbolic-name><version>${httpcomponents.client.version}</version></bundle>
+-        <bundle><symbolic-name>${osgi.compendium.bundle.symbolic-name}</symbolic-name><version>${osgi.compendium.osgi-version}</version></bundle>
++        <bundle><symbolic-name>org.apache.httpcomponents.httpmime</symbolic-name><version>${httpcomponents.mime.version}</version></bundle>
+         <bundle><symbolic-name>com.google.gson</symbolic-name><version>${gson.version}</version></bundle>
+         <bundle><symbolic-name>org.jboss.netty</symbolic-name><version>${netty.version}</version></bundle>
++        <bundle><symbolic-name>org.jfree.jcommon</symbolic-name><version>${jcommon.osgi.version}</version></bundle>
++        <bundle><symbolic-name>org.jfree.jfreechart</symbolic-name><version>${jfreechart.osgi.version}</version></bundle>
+         <bundle><symbolic-name>${lucene-core.bundle.symbolic-name}</symbolic-name><version>${lucene.osgi-version}</version></bundle>
+         <bundle><symbolic-name>${lucene-analysis.bundle.symbolic-name}</symbolic-name><version>${lucene.osgi-version}</version></bundle>
+       </bundles>
+@@ -144,9 +146,11 @@
+         <bundle><symbolic-name>org.apache.commons.logging</symbolic-name><version>${commons-logging.version}</version></bundle>
+         <bundle><symbolic-name>org.apache.httpcomponents.httpcore</symbolic-name><version>${httpcomponents.core.version}</version></bundle>
+         <bundle><symbolic-name>org.apache.httpcomponents.httpclient</symbolic-name><version>${httpcomponents.client.version}</version></bundle>
+-        <bundle><symbolic-name>${osgi.compendium.bundle.symbolic-name}</symbolic-name><version>${osgi.compendium.osgi-version}</version></bundle>
++        <bundle><symbolic-name>org.apache.httpcomponents.httpmime</symbolic-name><version>${httpcomponents.mime.version}</version></bundle>
+         <bundle><symbolic-name>com.google.gson</symbolic-name><version>${gson.version}</version></bundle>
+         <bundle><symbolic-name>org.jboss.netty</symbolic-name><version>${netty.version}</version></bundle>
++        <bundle><symbolic-name>org.jfree.jcommon</symbolic-name><version>${jcommon.osgi.version}</version></bundle>
++        <bundle><symbolic-name>org.jfree.jfreechart</symbolic-name><version>${jfreechart.osgi.version}</version></bundle>
+         <bundle><symbolic-name>${lucene-core.bundle.symbolic-name}</symbolic-name><version>${lucene.osgi-version}</version></bundle>
+         <bundle><symbolic-name>${lucene-analysis.bundle.symbolic-name}</symbolic-name><version>${lucene.osgi-version}</version></bundle>
+       </bundles>
+@@ -204,9 +208,11 @@
+         <bundle><symbolic-name>org.apache.commons.logging</symbolic-name><version>${commons-logging.version}</version></bundle>
+         <bundle><symbolic-name>org.apache.httpcomponents.httpcore</symbolic-name><version>${httpcomponents.core.version}</version></bundle>
+         <bundle><symbolic-name>org.apache.httpcomponents.httpclient</symbolic-name><version>${httpcomponents.client.version}</version></bundle>
+-        <bundle><symbolic-name>${osgi.compendium.bundle.symbolic-name}</symbolic-name><version>${osgi.compendium.osgi-version}</version></bundle>
++        <bundle><symbolic-name>org.apache.httpcomponents.httpmime</symbolic-name><version>${httpcomponents.mime.version}</version></bundle>
+         <bundle><symbolic-name>com.google.gson</symbolic-name><version>${gson.version}</version></bundle>
+         <bundle><symbolic-name>org.jboss.netty</symbolic-name><version>${netty.version}</version></bundle>
++        <bundle><symbolic-name>org.jfree.jcommon</symbolic-name><version>${jcommon.osgi.version}</version></bundle>
++        <bundle><symbolic-name>org.jfree.jfreechart</symbolic-name><version>${jfreechart.osgi.version}</version></bundle>
+         <bundle><symbolic-name>${lucene-core.bundle.symbolic-name}</symbolic-name><version>${lucene.osgi-version}</version></bundle>
+         <bundle><symbolic-name>${lucene-analysis.bundle.symbolic-name}</symbolic-name><version>${lucene.osgi-version}</version></bundle>
+       </bundles>
+@@ -258,9 +264,11 @@
+         <bundle><symbolic-name>org.apache.commons.logging</symbolic-name><version>${commons-logging.version}</version></bundle>
+         <bundle><symbolic-name>org.apache.httpcomponents.httpcore</symbolic-name><version>${httpcomponents.core.version}</version></bundle>
+         <bundle><symbolic-name>org.apache.httpcomponents.httpclient</symbolic-name><version>${httpcomponents.client.version}</version></bundle>
+-        <bundle><symbolic-name>${osgi.compendium.bundle.symbolic-name}</symbolic-name><version>${osgi.compendium.osgi-version}</version></bundle>
++        <bundle><symbolic-name>org.apache.httpcomponents.httpmime</symbolic-name><version>${httpcomponents.mime.version}</version></bundle>
+         <bundle><symbolic-name>com.google.gson</symbolic-name><version>${gson.version}</version></bundle>
+         <bundle><symbolic-name>org.jboss.netty</symbolic-name><version>${netty.version}</version></bundle>
++        <bundle><symbolic-name>org.jfree.jcommon</symbolic-name><version>${jcommon.osgi.version}</version></bundle>
++        <bundle><symbolic-name>org.jfree.jfreechart</symbolic-name><version>${jfreechart.osgi.version}</version></bundle>
+         <bundle><symbolic-name>${lucene-core.bundle.symbolic-name}</symbolic-name><version>${lucene.osgi-version}</version></bundle>
+         <bundle><symbolic-name>${lucene-analysis.bundle.symbolic-name}</symbolic-name><version>${lucene.osgi-version}</version></bundle>
+       </bundles>
+@@ -312,9 +320,11 @@
+         <bundle><symbolic-name>org.apache.commons.logging</symbolic-name><version>${commons-logging.version}</version></bundle>
+         <bundle><symbolic-name>org.apache.httpcomponents.httpcore</symbolic-name><version>${httpcomponents.core.version}</version></bundle>
+         <bundle><symbolic-name>org.apache.httpcomponents.httpclient</symbolic-name><version>${httpcomponents.client.version}</version></bundle>
+-        <bundle><symbolic-name>${osgi.compendium.bundle.symbolic-name}</symbolic-name><version>${osgi.compendium.osgi-version}</version></bundle>
++        <bundle><symbolic-name>org.apache.httpcomponents.httpmime</symbolic-name><version>${httpcomponents.mime.version}</version></bundle>
+         <bundle><symbolic-name>com.google.gson</symbolic-name><version>${gson.version}</version></bundle>
+         <bundle><symbolic-name>org.jboss.netty</symbolic-name><version>${netty.version}</version></bundle>
++        <bundle><symbolic-name>org.jfree.jcommon</symbolic-name><version>${jcommon.osgi.version}</version></bundle>
++        <bundle><symbolic-name>org.jfree.jfreechart</symbolic-name><version>${jfreechart.osgi.version}</version></bundle>
+         <bundle><symbolic-name>${lucene-core.bundle.symbolic-name}</symbolic-name><version>${lucene.osgi-version}</version></bundle>
+         <bundle><symbolic-name>${lucene-analysis.bundle.symbolic-name}</symbolic-name><version>${lucene.osgi-version}</version></bundle>
+       </bundles>
+@@ -366,9 +376,11 @@
+         <bundle><symbolic-name>org.apache.commons.logging</symbolic-name><version>${commons-logging.version}</version></bundle>
+         <bundle><symbolic-name>org.apache.httpcomponents.httpcore</symbolic-name><version>${httpcomponents.core.version}</version></bundle>
+         <bundle><symbolic-name>org.apache.httpcomponents.httpclient</symbolic-name><version>${httpcomponents.client.version}</version></bundle>
+-        <bundle><symbolic-name>${osgi.compendium.bundle.symbolic-name}</symbolic-name><version>${osgi.compendium.osgi-version}</version></bundle>
++        <bundle><symbolic-name>org.apache.httpcomponents.httpmime</symbolic-name><version>${httpcomponents.mime.version}</version></bundle>
+         <bundle><symbolic-name>com.google.gson</symbolic-name><version>${gson.version}</version></bundle>
+         <bundle><symbolic-name>org.jboss.netty</symbolic-name><version>${netty.version}</version></bundle>
++        <bundle><symbolic-name>org.jfree.jcommon</symbolic-name><version>${jcommon.osgi.version}</version></bundle>
++        <bundle><symbolic-name>org.jfree.jfreechart</symbolic-name><version>${jfreechart.osgi.version}</version></bundle>
+         <bundle><symbolic-name>${lucene-core.bundle.symbolic-name}</symbolic-name><version>${lucene.osgi-version}</version></bundle>
+         <bundle><symbolic-name>${lucene-analysis.bundle.symbolic-name}</symbolic-name><version>${lucene.osgi-version}</version></bundle>
+       </bundles>
+@@ -414,9 +426,11 @@
+         <bundle><symbolic-name>org.apache.commons.logging</symbolic-name><version>${commons-logging.version}</version></bundle>
+         <bundle><symbolic-name>org.apache.httpcomponents.httpcore</symbolic-name><version>${httpcomponents.core.version}</version></bundle>
+         <bundle><symbolic-name>org.apache.httpcomponents.httpclient</symbolic-name><version>${httpcomponents.client.version}</version></bundle>
+-        <bundle><symbolic-name>${osgi.compendium.bundle.symbolic-name}</symbolic-name><version>${osgi.compendium.osgi-version}</version></bundle>
++        <bundle><symbolic-name>org.apache.httpcomponents.httpmime</symbolic-name><version>${httpcomponents.mime.version}</version></bundle>
+         <bundle><symbolic-name>com.google.gson</symbolic-name><version>${gson.version}</version></bundle>
+         <bundle><symbolic-name>org.jboss.netty</symbolic-name><version>${netty.version}</version></bundle>
++        <bundle><symbolic-name>org.jfree.jcommon</symbolic-name><version>${jcommon.osgi.version}</version></bundle>
++        <bundle><symbolic-name>org.jfree.jfreechart</symbolic-name><version>${jfreechart.osgi.version}</version></bundle>
+         <bundle><symbolic-name>${lucene-core.bundle.symbolic-name}</symbolic-name><version>${lucene.osgi-version}</version></bundle>
+         <bundle><symbolic-name>${lucene-analysis.bundle.symbolic-name}</symbolic-name><version>${lucene.osgi-version}</version></bundle>
+       </bundles>
+diff --git a/vm-profiler/distribution/thermostat-plugin.xml b/vm-profiler/distribution/thermostat-plugin.xml
+--- a/vm-profiler/distribution/thermostat-plugin.xml
++++ b/vm-profiler/distribution/thermostat-plugin.xml
+@@ -95,7 +95,7 @@
+                 <bundle><symbolic-name>org.apache.commons.logging</symbolic-name><version>${commons-logging.version}</version></bundle>
+                 <bundle><symbolic-name>org.apache.httpcomponents.httpcore</symbolic-name><version>${httpcomponents.core.version}</version></bundle>
+                 <bundle><symbolic-name>org.apache.httpcomponents.httpclient</symbolic-name><version>${httpcomponents.client.version}</version></bundle>
+-                <bundle><symbolic-name>${osgi.compendium.bundle.symbolic-name}</symbolic-name><version>${osgi.compendium.osgi-version}</version></bundle>
++                <bundle><symbolic-name>org.apache.httpcomponents.httpmime</symbolic-name><version>${httpcomponents.mime.version}</version></bundle>
+             </bundles>
+         </command>
+     </commands>
+diff --git a/web/endpoint-plugin/distribution/thermostat-plugin.xml b/web/endpoint-plugin/distribution/thermostat-plugin.xml
+--- a/web/endpoint-plugin/distribution/thermostat-plugin.xml
++++ b/web/endpoint-plugin/distribution/thermostat-plugin.xml
+@@ -73,7 +73,7 @@
+         <bundle><symbolic-name>com.redhat.thermostat.web.client</symbolic-name><version>${project.version}</version></bundle>
+         <bundle><symbolic-name>org.apache.httpcomponents.httpcore</symbolic-name><version>${httpcomponents.core.version}</version></bundle>
+         <bundle><symbolic-name>org.apache.httpcomponents.httpclient</symbolic-name><version>${httpcomponents.client.version}</version></bundle>
+-        <bundle><symbolic-name>${osgi.compendium.bundle.symbolic-name}</symbolic-name><version>${osgi.compendium.osgi-version}</version></bundle>
++        <bundle><symbolic-name>org.apache.httpcomponents.httpmime</symbolic-name><version>${httpcomponents.httpmime.version}</version></bundle>
+         <bundle><symbolic-name>com.google.gson</symbolic-name><version>${gson.version}</version></bundle>
+         <bundle><symbolic-name>com.redhat.thermostat.process</symbolic-name><version>${project.version}</version></bundle>
+         <bundle><symbolic-name>com.redhat.thermostat.agent.cli</symbolic-name><version>${project.version}</version></bundle>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/rpmbuild/SOURCES/ignore_bundle_versions.patch	Wed Jun 03 09:59:33 2015 -0400
@@ -0,0 +1,21 @@
+# HG changeset patch
+# Parent 6bd4ccadbfa30e35f1ac7bdf694add1f4f39145d
+diff --git a/distribution/scripts/thermostat b/distribution/scripts/thermostat
+--- a/distribution/scripts/thermostat
++++ b/distribution/scripts/thermostat
+@@ -110,13 +110,13 @@
+     if [ x"$PID_FILE" = "x" ]; then
+         usage 
+     else
+-        ${JAVA} "${JAVA_ARGS[@]}" -cp ${SERVICE_CLASSPATH} ${THERMOSTAT_MAIN} "${ARGS[@]}" &
++        ${JAVA} "${JAVA_ARGS[@]}" -cp ${SERVICE_CLASSPATH} ${THERMOSTAT_MAIN} --ignore-bundle-versions "${ARGS[@]}" &
+         retval=$?
+         echo $! > $PID_FILE
+         retval=$(( $retval + $? ))
+     fi
+ else
+-    ${JAVA} "${JAVA_ARGS[@]}" -cp ${SERVICE_CLASSPATH} ${THERMOSTAT_MAIN} "${ARGS[@]}"
++    ${JAVA} "${JAVA_ARGS[@]}" -cp ${SERVICE_CLASSPATH} ${THERMOSTAT_MAIN} --ignore-bundle-versions "${ARGS[@]}"
+     retval=$?
+ fi
+ exit $retval
Binary file rpmbuild/SOURCES/maven-scr-plugin-1.20.0.tar.gz has changed
Binary file rpmbuild/SOURCES/org.apache.felix.framework-4.6.0.tar.gz has changed
Binary file rpmbuild/SOURCES/org.apache.felix.scr-1.8.2.tar.gz has changed
Binary file rpmbuild/SOURCES/org.apache.felix.scr.annotations-1.9.6.tar.gz has changed
Binary file rpmbuild/SOURCES/org.apache.felix.scr.generator-1.12.0.tar.gz has changed
Binary file rpmbuild/SOURCES/org.apache.felix.utils-1.6.0-source-release.tar.gz has changed
Binary file rpmbuild/SOURCES/osgi.annotation-6.0.0-sources.jar has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/rpmbuild/SOURCES/osgi.annotation-6.0.0.pom	Wed Jun 03 09:59:33 2015 -0400
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.osgi</groupId>
+  <artifactId>osgi.annotation</artifactId>
+  <version>6.0.0</version>
+  <description>OSGi Annotation Release 6, Annotations for use in compiling bundles.</description>
+  <name>org.osgi:osgi.annotation</name>
+  <url>http://www.osgi.org/</url>
+  <organization>
+    <name>OSGi Alliance</name>
+    <url>http://www.osgi.org/</url>
+  </organization>
+  <licenses>
+    <license>
+      <name>Apache License, Version 2.0</name>
+      <url>http://opensource.org/licenses/apache2.0.php</url>
+      <distribution>repo</distribution>
+    </license>
+  </licenses>
+  <scm>
+    <url>https://www.osgi.org/members/git/build.git</url>
+    <connection>scm:git:https://www.osgi.org/members/git/build.git</connection>
+    <developerConnection>scm:git:https://www.osgi.org/members/git/build.git</developerConnection>
+  </scm>
+  <developers>
+    <developer>
+      <id>osgi</id>
+      <email>info@osgi.org</email>
+      <name>OSGi Alliance</name>
+      <organization>OSGi Alliance</organization>
+    </developer>
+  </developers>
+</project>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/rpmbuild/SOURCES/osgi_spec_fixes.patch	Wed Jun 03 09:59:33 2015 -0400
@@ -0,0 +1,1739 @@
+# HG changeset patch
+# Parent 01ce1cd0e0bf0a011780baa4fa9118905179b668
+
+diff --git a/agent/cli/pom.xml b/agent/cli/pom.xml
+--- a/agent/cli/pom.xml
++++ b/agent/cli/pom.xml
+@@ -97,8 +97,8 @@
+       <version>${project.version}</version>
+     </dependency>
+     <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.core</artifactId>
++      <groupId>org.apache.felix</groupId>
++      <artifactId>org.apache.felix.framework</artifactId>
+     </dependency>
+     <dependency>
+       <groupId>com.redhat.thermostat</groupId>
+diff --git a/agent/command/pom.xml b/agent/command/pom.xml
+--- a/agent/command/pom.xml
++++ b/agent/command/pom.xml
+@@ -76,8 +76,8 @@
+       <artifactId>netty</artifactId>
+     </dependency>
+     <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.core</artifactId>
++      <groupId>org.apache.felix</groupId>
++      <artifactId>org.apache.felix.framework</artifactId>
+     </dependency>
+ 
+     <dependency>
+diff --git a/agent/core/pom.xml b/agent/core/pom.xml
+--- a/agent/core/pom.xml
++++ b/agent/core/pom.xml
+@@ -88,8 +88,8 @@
+       <version>${project.version}</version>
+     </dependency>
+     <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.core</artifactId>
++      <groupId>org.apache.felix</groupId>
++      <artifactId>org.apache.felix.framework</artifactId>
+     </dependency>
+   </dependencies>
+ 
+diff --git a/client/cli/pom.xml b/client/cli/pom.xml
+--- a/client/cli/pom.xml
++++ b/client/cli/pom.xml
+@@ -101,14 +101,8 @@
+       <version>${project.version}</version>
+     </dependency>
+     <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.core</artifactId>
+-      <scope>provided</scope>
+-    </dependency>
+-    <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.compendium</artifactId>
+-      <scope>provided</scope>
++      <groupId>org.apache.felix</groupId>
++      <artifactId>org.apache.felix.framework</artifactId>
+     </dependency>
+     <dependency>
+       <groupId>com.redhat.thermostat</groupId>
+diff --git a/client/command/pom.xml b/client/command/pom.xml
+--- a/client/command/pom.xml
++++ b/client/command/pom.xml
+@@ -76,9 +76,8 @@
+       <artifactId>netty</artifactId>
+     </dependency>
+     <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.core</artifactId>
+-      <scope>provided</scope>
++      <groupId>org.apache.felix</groupId>
++      <artifactId>org.apache.felix.framework</artifactId>
+     </dependency>
+ 
+     <dependency>
+diff --git a/client/core/pom.xml b/client/core/pom.xml
+--- a/client/core/pom.xml
++++ b/client/core/pom.xml
+@@ -96,14 +96,8 @@
+     </dependency>
+     
+     <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.core</artifactId>
+-      <scope>provided</scope>
+-    </dependency>
+-    <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.compendium</artifactId>
+-      <scope>provided</scope>
++      <groupId>org.apache.felix</groupId>
++      <artifactId>org.apache.felix.framework</artifactId>
+     </dependency>
+   </dependencies>
+ 
+diff --git a/client/living-vm-filter/core/pom.xml b/client/living-vm-filter/core/pom.xml
+--- a/client/living-vm-filter/core/pom.xml
++++ b/client/living-vm-filter/core/pom.xml
+@@ -90,15 +90,8 @@
+     </dependency>
+ 
+     <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.core</artifactId>
+-      <scope>provided</scope>
+-    </dependency>
+-
+-    <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.compendium</artifactId>
+-      <scope>provided</scope>
++      <groupId>org.apache.felix</groupId>
++      <artifactId>org.apache.felix.framework</artifactId>
+     </dependency>
+ 
+     <dependency>
+diff --git a/client/living-vm-filter/swing/pom.xml b/client/living-vm-filter/swing/pom.xml
+--- a/client/living-vm-filter/swing/pom.xml
++++ b/client/living-vm-filter/swing/pom.xml
+@@ -92,15 +92,8 @@
+     </dependency>
+ 
+     <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.core</artifactId>
+-      <scope>provided</scope>
+-    </dependency>
+-
+-    <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.compendium</artifactId>
+-      <scope>provided</scope>
++      <groupId>org.apache.felix</groupId>
++      <artifactId>org.apache.felix.framework</artifactId>
+     </dependency>
+ 
+     <dependency>
+diff --git a/client/swing/pom.xml b/client/swing/pom.xml
+--- a/client/swing/pom.xml
++++ b/client/swing/pom.xml
+@@ -110,14 +110,8 @@
+     </dependency>
+     
+     <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.core</artifactId>
+-      <scope>provided</scope>
+-    </dependency>
+-    <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.compendium</artifactId>
+-      <scope>provided</scope>
++      <groupId>org.apache.felix</groupId>
++      <artifactId>org.apache.felix.framework</artifactId>
+     </dependency>
+     <dependency>
+       <groupId>com.redhat.thermostat</groupId>
+diff --git a/common/core/pom.xml b/common/core/pom.xml
+--- a/common/core/pom.xml
++++ b/common/core/pom.xml
+@@ -146,14 +146,8 @@
+     </dependency>
+     
+     <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.core</artifactId>
+-      <scope>provided</scope>
+-    </dependency>
+-    <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.compendium</artifactId>
+-      <scope>provided</scope>
++      <groupId>org.apache.felix</groupId>
++      <artifactId>org.apache.felix.framework</artifactId>
+     </dependency>
+     
+     <dependency>
+diff --git a/config/pom.xml b/config/pom.xml
+--- a/config/pom.xml
++++ b/config/pom.xml
+@@ -91,14 +91,8 @@
+     </dependency>
+     
+     <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.core</artifactId>
+-      <scope>provided</scope>
+-    </dependency>
+-    <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.compendium</artifactId>
+-      <scope>provided</scope>
++      <groupId>org.apache.felix</groupId>
++      <artifactId>org.apache.felix.framework</artifactId>
+     </dependency>
+ 
+     <dependency>
+diff --git a/host-cpu/agent/pom.xml b/host-cpu/agent/pom.xml
+--- a/host-cpu/agent/pom.xml
++++ b/host-cpu/agent/pom.xml
+@@ -80,14 +80,8 @@
+       <scope>test</scope>
+     </dependency>
+     <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.core</artifactId>
+-      <scope>provided</scope>
+-    </dependency>
+-    <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.compendium</artifactId>
+-      <scope>provided</scope>
++      <groupId>org.apache.felix</groupId>
++      <artifactId>org.apache.felix.framework</artifactId>
+     </dependency>
+     <dependency>
+       <groupId>com.redhat.thermostat</groupId>
+diff --git a/host-cpu/client-core/pom.xml b/host-cpu/client-core/pom.xml
+--- a/host-cpu/client-core/pom.xml
++++ b/host-cpu/client-core/pom.xml
+@@ -99,14 +99,8 @@
+       <scope>test</scope>
+     </dependency>
+     <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.core</artifactId>
+-      <scope>provided</scope>
+-    </dependency>
+-    <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.compendium</artifactId>
+-      <scope>provided</scope>
++      <groupId>org.apache.felix</groupId>
++      <artifactId>org.apache.felix.framework</artifactId>
+     </dependency>
+     <dependency>
+       <groupId>com.redhat.thermostat</groupId>
+diff --git a/host-cpu/client-swing/pom.xml b/host-cpu/client-swing/pom.xml
+--- a/host-cpu/client-swing/pom.xml
++++ b/host-cpu/client-swing/pom.xml
+@@ -87,14 +87,8 @@
+       <scope>test</scope>
+     </dependency>
+     <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.core</artifactId>
+-      <scope>provided</scope>
+-    </dependency>
+-    <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.compendium</artifactId>
+-      <scope>provided</scope>
++      <groupId>org.apache.felix</groupId>
++      <artifactId>org.apache.felix.framework</artifactId>
+     </dependency>
+     <dependency>
+       <groupId>org.jfree</groupId>
+diff --git a/host-cpu/common/pom.xml b/host-cpu/common/pom.xml
+--- a/host-cpu/common/pom.xml
++++ b/host-cpu/common/pom.xml
+@@ -99,14 +99,8 @@
+       <scope>test</scope>
+     </dependency>
+     <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.core</artifactId>
+-      <scope>provided</scope>
+-    </dependency>
+-    <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.compendium</artifactId>
+-      <scope>provided</scope>
++      <groupId>org.apache.felix</groupId>
++      <artifactId>org.apache.felix.framework</artifactId>
+     </dependency>
+     <dependency>
+       <groupId>com.redhat.thermostat</groupId>
+diff --git a/host-memory/agent/pom.xml b/host-memory/agent/pom.xml
+--- a/host-memory/agent/pom.xml
++++ b/host-memory/agent/pom.xml
+@@ -80,14 +80,8 @@
+       <scope>test</scope>
+     </dependency>
+     <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.core</artifactId>
+-      <scope>provided</scope>
+-    </dependency>
+-    <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.compendium</artifactId>
+-      <scope>provided</scope>
++      <groupId>org.apache.felix</groupId>
++      <artifactId>org.apache.felix.framework</artifactId>
+     </dependency>
+     <dependency>
+       <groupId>com.redhat.thermostat</groupId>
+diff --git a/host-memory/client-core/pom.xml b/host-memory/client-core/pom.xml
+--- a/host-memory/client-core/pom.xml
++++ b/host-memory/client-core/pom.xml
+@@ -99,14 +99,8 @@
+       <scope>test</scope>
+     </dependency>
+     <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.core</artifactId>
+-      <scope>provided</scope>
+-    </dependency>
+-    <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.compendium</artifactId>
+-      <scope>provided</scope>
++      <groupId>org.apache.felix</groupId>
++      <artifactId>org.apache.felix.framework</artifactId>
+     </dependency>
+     <dependency>
+       <groupId>com.redhat.thermostat</groupId>
+diff --git a/host-memory/client-swing/pom.xml b/host-memory/client-swing/pom.xml
+--- a/host-memory/client-swing/pom.xml
++++ b/host-memory/client-swing/pom.xml
+@@ -87,14 +87,8 @@
+       <scope>test</scope>
+     </dependency>
+     <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.core</artifactId>
+-      <scope>provided</scope>
+-    </dependency>
+-    <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.compendium</artifactId>
+-      <scope>provided</scope>
++      <groupId>org.apache.felix</groupId>
++      <artifactId>org.apache.felix.framework</artifactId>
+     </dependency>
+     <dependency>
+       <groupId>org.jfree</groupId>
+diff --git a/host-memory/common/pom.xml b/host-memory/common/pom.xml
+--- a/host-memory/common/pom.xml
++++ b/host-memory/common/pom.xml
+@@ -99,14 +99,8 @@
+       <scope>test</scope>
+     </dependency>
+     <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.core</artifactId>
+-      <scope>provided</scope>
+-    </dependency>
+-    <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.compendium</artifactId>
+-      <scope>provided</scope>
++      <groupId>org.apache.felix</groupId>
++      <artifactId>org.apache.felix.framework</artifactId>
+     </dependency>
+     <dependency>
+       <groupId>com.redhat.thermostat</groupId>
+diff --git a/host-overview/client-core/pom.xml b/host-overview/client-core/pom.xml
+--- a/host-overview/client-core/pom.xml
++++ b/host-overview/client-core/pom.xml
+@@ -99,14 +99,8 @@
+       <scope>test</scope>
+     </dependency>
+     <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.core</artifactId>
+-      <scope>provided</scope>
+-    </dependency>
+-    <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.compendium</artifactId>
+-      <scope>provided</scope>
++      <groupId>org.apache.felix</groupId>
++      <artifactId>org.apache.felix.framework</artifactId>
+     </dependency>
+     <dependency>
+       <groupId>com.redhat.thermostat</groupId>
+diff --git a/host-overview/client-swing/pom.xml b/host-overview/client-swing/pom.xml
+--- a/host-overview/client-swing/pom.xml
++++ b/host-overview/client-swing/pom.xml
+@@ -87,14 +87,8 @@
+       <scope>test</scope>
+     </dependency>
+     <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.core</artifactId>
+-      <scope>provided</scope>
+-    </dependency>
+-    <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.compendium</artifactId>
+-      <scope>provided</scope>
++      <groupId>org.apache.felix</groupId>
++      <artifactId>org.apache.felix.framework</artifactId>
+     </dependency>
+     <dependency>
+       <groupId>org.jfree</groupId>
+diff --git a/keyring/pom.xml b/keyring/pom.xml
+--- a/keyring/pom.xml
++++ b/keyring/pom.xml
+@@ -146,14 +146,8 @@
+     </dependency>
+     
+     <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.core</artifactId>
+-      <scope>provided</scope>
+-    </dependency>
+-    <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.compendium</artifactId>
+-      <scope>provided</scope>
++      <groupId>org.apache.felix</groupId>
++      <artifactId>org.apache.felix.framework</artifactId>
+     </dependency>
+ 
+     <dependency>
+diff --git a/killvm/agent/pom.xml b/killvm/agent/pom.xml
+--- a/killvm/agent/pom.xml
++++ b/killvm/agent/pom.xml
+@@ -103,8 +103,8 @@
+       <version>${project.version}</version>
+     </dependency>
+     <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.core</artifactId>
++      <groupId>org.apache.felix</groupId>
++      <artifactId>org.apache.felix.framework</artifactId>
+     </dependency>
+   </dependencies>
+ 
+diff --git a/killvm/client-swing/pom.xml b/killvm/client-swing/pom.xml
+--- a/killvm/client-swing/pom.xml
++++ b/killvm/client-swing/pom.xml
+@@ -100,14 +100,8 @@
+       <scope>test</scope>
+     </dependency>
+     <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.core</artifactId>
+-      <scope>provided</scope>
+-    </dependency>
+-    <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.compendium</artifactId>
+-      <scope>provided</scope>
++      <groupId>org.apache.felix</groupId>
++      <artifactId>org.apache.felix.framework</artifactId>
+     </dependency>
+     <dependency>
+       <groupId>com.redhat.thermostat</groupId>
+diff --git a/killvm/common/pom.xml b/killvm/common/pom.xml
+--- a/killvm/common/pom.xml
++++ b/killvm/common/pom.xml
+@@ -88,19 +88,8 @@
+       <scope>test</scope>
+     </dependency>
+     <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.core</artifactId>
+-      <scope>provided</scope>
+-    </dependency>
+-    <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.compendium</artifactId>
+-      <scope>provided</scope>
+-    </dependency>
+-    <dependency>
+       <groupId>org.apache.felix</groupId>
+       <artifactId>org.apache.felix.framework</artifactId>
+-      <version>4.2.0</version>
+     </dependency>
+     <dependency>
+       <groupId>com.redhat.thermostat</groupId>
+diff --git a/laf-utils/pom.xml b/laf-utils/pom.xml
+--- a/laf-utils/pom.xml
++++ b/laf-utils/pom.xml
+@@ -137,14 +137,8 @@
+     </dependency>
+     
+     <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.core</artifactId>
+-      <scope>provided</scope>
+-    </dependency>
+-    <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.compendium</artifactId>
+-      <scope>provided</scope>
++      <groupId>org.apache.felix</groupId>
++      <artifactId>org.apache.felix.framework</artifactId>
+     </dependency>
+     <dependency>
+       <groupId>com.redhat.thermostat</groupId>
+diff --git a/notes/client-swing/pom.xml b/notes/client-swing/pom.xml
+--- a/notes/client-swing/pom.xml
++++ b/notes/client-swing/pom.xml
+@@ -87,14 +87,8 @@
+       <scope>test</scope>
+     </dependency>
+     <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.core</artifactId>
+-      <scope>provided</scope>
+-    </dependency>
+-    <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.compendium</artifactId>
+-      <scope>provided</scope>
++      <groupId>org.apache.felix</groupId>
++      <artifactId>org.apache.felix.framework</artifactId>
+     </dependency>
+     <dependency>
+       <groupId>org.jfree</groupId>
+diff --git a/notes/common/pom.xml b/notes/common/pom.xml
+--- a/notes/common/pom.xml
++++ b/notes/common/pom.xml
+@@ -82,14 +82,8 @@
+       <scope>test</scope>
+     </dependency>
+     <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.core</artifactId>
+-      <scope>provided</scope>
+-    </dependency>
+-    <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.compendium</artifactId>
+-      <scope>provided</scope>
++      <groupId>org.apache.felix</groupId>
++      <artifactId>org.apache.felix.framework</artifactId>
+     </dependency>
+     <dependency>
+       <groupId>com.redhat.thermostat</groupId>
+diff --git a/numa/agent/pom.xml b/numa/agent/pom.xml
+--- a/numa/agent/pom.xml
++++ b/numa/agent/pom.xml
+@@ -80,9 +80,8 @@
+       <scope>test</scope>
+     </dependency>
+     <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.core</artifactId>
+-      <scope>provided</scope>
++      <groupId>org.apache.felix</groupId>
++      <artifactId>org.apache.felix.framework</artifactId>
+     </dependency>
+     <dependency>
+       <groupId>com.redhat.thermostat</groupId>
+diff --git a/numa/client-core/pom.xml b/numa/client-core/pom.xml
+--- a/numa/client-core/pom.xml
++++ b/numa/client-core/pom.xml
+@@ -83,14 +83,8 @@
+       <scope>test</scope>
+     </dependency>
+     <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.core</artifactId>
+-      <scope>provided</scope>
+-    </dependency>
+-    <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.compendium</artifactId>
+-      <scope>provided</scope>
++      <groupId>org.apache.felix</groupId>
++      <artifactId>org.apache.felix.framework</artifactId>
+     </dependency>
+     <dependency>
+       <groupId>com.redhat.thermostat</groupId>
+diff --git a/numa/client-swing/pom.xml b/numa/client-swing/pom.xml
+--- a/numa/client-swing/pom.xml
++++ b/numa/client-swing/pom.xml
+@@ -87,14 +87,8 @@
+       <scope>test</scope>
+     </dependency>
+     <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.core</artifactId>
+-      <scope>provided</scope>
+-    </dependency>
+-    <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.compendium</artifactId>
+-      <scope>provided</scope>
++      <groupId>org.apache.felix</groupId>
++      <artifactId>org.apache.felix.framework</artifactId>
+     </dependency>
+     <dependency>
+       <groupId>org.jfree</groupId>
+diff --git a/numa/common/pom.xml b/numa/common/pom.xml
+--- a/numa/common/pom.xml
++++ b/numa/common/pom.xml
+@@ -82,14 +82,8 @@
+       <scope>test</scope>
+     </dependency>
+     <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.core</artifactId>
+-      <scope>provided</scope>
+-    </dependency>
+-    <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.compendium</artifactId>
+-      <scope>provided</scope>
++      <groupId>org.apache.felix</groupId>
++      <artifactId>org.apache.felix.framework</artifactId>
+     </dependency>
+     <dependency>
+       <groupId>com.redhat.thermostat</groupId>
+diff --git a/pom.xml b/pom.xml
+--- a/pom.xml
++++ b/pom.xml
+@@ -266,11 +266,21 @@
+     <lucene-analysis.bundle.symbolic-name>org.apache.servicemix.bundles.lucene-analyzers-common</lucene-analysis.bundle.symbolic-name>
+     <lucene-core.bundle.symbolic-name>org.apache.servicemix.bundles.lucene</lucene-core.bundle.symbolic-name>
+     <!--
+-         felix 4.0 is compliant with osgi 4.3
+-         for osgi clients, 4.3 is backwards compatible with 4.2
++         Since we use felix framework at runtime, try to avoid introducing an
++         extra dependency for OSGi API-only (e.g. org.osgi:org.osgi.core) in order to
++         make packaging Thermostat easier. While org.osgi:org.osgi.core v4.3.x would
++         satisfy OSGi 4.3 spec API, org.apache.felix:org.osgi.core v1.4 is OSGi 4.2 spec
++         only at this point.
++         Felix framework 4.2 is an implementation of the 4.3 OSGi
++         spec: https://cwiki.apache.org/confluence/display/FELIX/Apache+Felix+Framework+OSGi+R4.3+CT+Results
++
++         Note that between OSGi spec 4.2 and 4.3 generics (a.k.a type parameters)
++         have been introduced. Howerver, felix's API-only package,
++         org.apache.felix:org.osgi.core, is OSGi spec 4.2 and we use OSGi spec 4.3
++         specific code in thermostat.
++
++         We should be careful not to introduce felix specific API, though.
+     -->
+-    <osgi.core.version>4.3.1</osgi.core.version>
+-    <osgi.compendium.version>4.3.1</osgi.compendium.version>
+     <osgi.compendium.osgi-version>4.3.1.201210102024</osgi.compendium.osgi-version>
+     <osgi.compendium.bundle.symbolic-name>osgi.cmpn</osgi.compendium.bundle.symbolic-name>
+     <felix.framework.version>4.2.0</felix.framework.version>
+@@ -650,16 +660,6 @@
+       </dependency>
+ 
+       <dependency>
+-        <groupId>org.osgi</groupId>
+-        <artifactId>org.osgi.core</artifactId>
+-        <version>${osgi.core.version}</version>
+-      </dependency>
+-      <dependency>
+-        <groupId>org.osgi</groupId>
+-        <artifactId>org.osgi.compendium</artifactId>
+-        <version>${osgi.compendium.version}</version>
+-      </dependency>
+-      <dependency>
+         <groupId>org.apache.felix</groupId>
+         <artifactId>org.apache.felix.framework</artifactId>
+         <version>${felix.framework.version}</version>
+diff --git a/storage/cli/pom.xml b/storage/cli/pom.xml
+--- a/storage/cli/pom.xml
++++ b/storage/cli/pom.xml
+@@ -67,8 +67,8 @@
+       <version>${project.version}</version>
+     </dependency>
+     <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.core</artifactId>
++      <groupId>org.apache.felix</groupId>
++      <artifactId>org.apache.felix.framework</artifactId>
+     </dependency>
+     <dependency>
+       <groupId>com.redhat.thermostat</groupId>
+diff --git a/system-backend/pom.xml b/system-backend/pom.xml
+--- a/system-backend/pom.xml
++++ b/system-backend/pom.xml
+@@ -87,14 +87,8 @@
+     </dependency>
+     
+     <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.core</artifactId>
+-      <scope>provided</scope>
+-    </dependency>
+-    <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.compendium</artifactId>
+-      <scope>provided</scope>
++      <groupId>org.apache.felix</groupId>
++      <artifactId>org.apache.felix.framework</artifactId>
+     </dependency>
+ 
+   </dependencies>
+diff --git a/thread/client-common/pom.xml b/thread/client-common/pom.xml
+--- a/thread/client-common/pom.xml
++++ b/thread/client-common/pom.xml
+@@ -73,14 +73,8 @@
+     </dependency>
+     
+     <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.core</artifactId>
+-      <scope>provided</scope>
+-    </dependency>
+-    <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.compendium</artifactId>
+-      <scope>provided</scope>
++      <groupId>org.apache.felix</groupId>
++      <artifactId>org.apache.felix.framework</artifactId>
+     </dependency>
+     
+     <dependency>
+diff --git a/thread/client-controllers/pom.xml b/thread/client-controllers/pom.xml
+--- a/thread/client-controllers/pom.xml
++++ b/thread/client-controllers/pom.xml
+@@ -74,14 +74,8 @@
+     </dependency>
+ 
+     <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.core</artifactId>
+-      <scope>provided</scope>
+-    </dependency>
+-    <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.compendium</artifactId>
+-      <scope>provided</scope>
++      <groupId>org.apache.felix</groupId>
++      <artifactId>org.apache.felix.framework</artifactId>
+     </dependency>
+     
+     <dependency>
+diff --git a/thread/client-swing/pom.xml b/thread/client-swing/pom.xml
+--- a/thread/client-swing/pom.xml
++++ b/thread/client-swing/pom.xml
+@@ -68,14 +68,8 @@
+     </dependency>
+     
+     <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.core</artifactId>
+-      <scope>provided</scope>
+-    </dependency>
+-    <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.compendium</artifactId>
+-      <scope>provided</scope>
++      <groupId>org.apache.felix</groupId>
++      <artifactId>org.apache.felix.framework</artifactId>
+     </dependency>
+     
+     <dependency>
+diff --git a/thread/collector/pom.xml b/thread/collector/pom.xml
+--- a/thread/collector/pom.xml
++++ b/thread/collector/pom.xml
+@@ -85,14 +85,8 @@
+     </dependency>
+ 
+     <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.core</artifactId>
+-      <scope>provided</scope>
+-    </dependency>
+-    <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.compendium</artifactId>
+-      <scope>provided</scope>
++      <groupId>org.apache.felix</groupId>
++      <artifactId>org.apache.felix.framework</artifactId>
+     </dependency>
+   </dependencies>
+ 
+diff --git a/thread/harvester/pom.xml b/thread/harvester/pom.xml
+--- a/thread/harvester/pom.xml
++++ b/thread/harvester/pom.xml
+@@ -74,14 +74,8 @@
+     </dependency>
+     
+     <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.core</artifactId>
+-      <scope>provided</scope>
+-    </dependency>
+-    <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.compendium</artifactId>
+-      <scope>provided</scope>
++      <groupId>org.apache.felix</groupId>
++      <artifactId>org.apache.felix.framework</artifactId>
+     </dependency>
+ 
+     <dependency>
+diff --git a/unix-process-handler/pom.xml b/unix-process-handler/pom.xml
+--- a/unix-process-handler/pom.xml
++++ b/unix-process-handler/pom.xml
+@@ -77,14 +77,8 @@
+     </dependency>
+ 
+     <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.core</artifactId>
+-      <scope>provided</scope>
+-    </dependency>
+-    <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.compendium</artifactId>
+-      <scope>provided</scope>
++      <groupId>org.apache.felix</groupId>
++      <artifactId>org.apache.felix.framework</artifactId>
+     </dependency>
+     
+     <dependency>
+diff --git a/vm-classstat/agent/pom.xml b/vm-classstat/agent/pom.xml
+--- a/vm-classstat/agent/pom.xml
++++ b/vm-classstat/agent/pom.xml
+@@ -80,14 +80,8 @@
+       <scope>test</scope>
+     </dependency>
+     <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.core</artifactId>
+-      <scope>provided</scope>
+-    </dependency>
+-    <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.compendium</artifactId>
+-      <scope>provided</scope>
++      <groupId>org.apache.felix</groupId>
++      <artifactId>org.apache.felix.framework</artifactId>
+     </dependency>
+     <dependency>
+       <groupId>com.redhat.thermostat</groupId>
+diff --git a/vm-classstat/client-core/pom.xml b/vm-classstat/client-core/pom.xml
+--- a/vm-classstat/client-core/pom.xml
++++ b/vm-classstat/client-core/pom.xml
+@@ -99,14 +99,8 @@
+       <scope>test</scope>
+     </dependency>
+     <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.core</artifactId>
+-      <scope>provided</scope>
+-    </dependency>
+-    <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.compendium</artifactId>
+-      <scope>provided</scope>
++      <groupId>org.apache.felix</groupId>
++      <artifactId>org.apache.felix.framework</artifactId>
+     </dependency>
+     <dependency>
+       <groupId>com.redhat.thermostat</groupId>
+diff --git a/vm-classstat/client-swing/pom.xml b/vm-classstat/client-swing/pom.xml
+--- a/vm-classstat/client-swing/pom.xml
++++ b/vm-classstat/client-swing/pom.xml
+@@ -87,14 +87,8 @@
+       <scope>test</scope>
+     </dependency>
+     <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.core</artifactId>
+-      <scope>provided</scope>
+-    </dependency>
+-    <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.compendium</artifactId>
+-      <scope>provided</scope>
++      <groupId>org.apache.felix</groupId>
++      <artifactId>org.apache.felix.framework</artifactId>
+     </dependency>
+     <dependency>
+       <groupId>org.jfree</groupId>
+diff --git a/vm-classstat/common/pom.xml b/vm-classstat/common/pom.xml
+--- a/vm-classstat/common/pom.xml
++++ b/vm-classstat/common/pom.xml
+@@ -99,14 +99,8 @@
+       <scope>test</scope>
+     </dependency>
+     <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.core</artifactId>
+-      <scope>provided</scope>
+-    </dependency>
+-    <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.compendium</artifactId>
+-      <scope>provided</scope>
++      <groupId>org.apache.felix</groupId>
++      <artifactId>org.apache.felix.framework</artifactId>
+     </dependency>
+     <dependency>
+       <groupId>com.redhat.thermostat</groupId>
+diff --git a/vm-cpu/agent/pom.xml b/vm-cpu/agent/pom.xml
+--- a/vm-cpu/agent/pom.xml
++++ b/vm-cpu/agent/pom.xml
+@@ -80,14 +80,8 @@
+       <scope>test</scope>
+     </dependency>
+     <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.core</artifactId>
+-      <scope>provided</scope>
+-    </dependency>
+-    <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.compendium</artifactId>
+-      <scope>provided</scope>
++      <groupId>org.apache.felix</groupId>
++      <artifactId>org.apache.felix.framework</artifactId>
+     </dependency>
+     <dependency>
+       <groupId>com.redhat.thermostat</groupId>
+diff --git a/vm-cpu/client-cli/pom.xml b/vm-cpu/client-cli/pom.xml
+--- a/vm-cpu/client-cli/pom.xml
++++ b/vm-cpu/client-cli/pom.xml
+@@ -80,14 +80,8 @@
+       <scope>test</scope>
+     </dependency>
+     <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.core</artifactId>
+-      <scope>provided</scope>
+-    </dependency>
+-    <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.compendium</artifactId>
+-      <scope>provided</scope>
++      <groupId>org.apache.felix</groupId>
++      <artifactId>org.apache.felix.framework</artifactId>
+     </dependency>
+     <dependency>
+       <groupId>com.redhat.thermostat</groupId>
+diff --git a/vm-cpu/client-core/pom.xml b/vm-cpu/client-core/pom.xml
+--- a/vm-cpu/client-core/pom.xml
++++ b/vm-cpu/client-core/pom.xml
+@@ -99,14 +99,8 @@
+       <scope>test</scope>
+     </dependency>
+     <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.core</artifactId>
+-      <scope>provided</scope>
+-    </dependency>
+-    <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.compendium</artifactId>
+-      <scope>provided</scope>
++      <groupId>org.apache.felix</groupId>
++      <artifactId>org.apache.felix.framework</artifactId>
+     </dependency>
+     <dependency>
+       <groupId>com.redhat.thermostat</groupId>
+diff --git a/vm-cpu/client-swing/pom.xml b/vm-cpu/client-swing/pom.xml
+--- a/vm-cpu/client-swing/pom.xml
++++ b/vm-cpu/client-swing/pom.xml
+@@ -87,14 +87,8 @@
+       <scope>test</scope>
+     </dependency>
+     <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.core</artifactId>
+-      <scope>provided</scope>
+-    </dependency>
+-    <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.compendium</artifactId>
+-      <scope>provided</scope>
++      <groupId>org.apache.felix</groupId>
++      <artifactId>org.apache.felix.framework</artifactId>
+     </dependency>
+     <dependency>
+       <groupId>org.jfree</groupId>
+diff --git a/vm-cpu/common/pom.xml b/vm-cpu/common/pom.xml
+--- a/vm-cpu/common/pom.xml
++++ b/vm-cpu/common/pom.xml
+@@ -99,14 +99,8 @@
+       <scope>test</scope>
+     </dependency>
+     <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.core</artifactId>
+-      <scope>provided</scope>
+-    </dependency>
+-    <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.compendium</artifactId>
+-      <scope>provided</scope>
++      <groupId>org.apache.felix</groupId>
++      <artifactId>org.apache.felix.framework</artifactId>
+     </dependency>
+     <dependency>
+       <groupId>com.redhat.thermostat</groupId>
+diff --git a/vm-gc/agent/pom.xml b/vm-gc/agent/pom.xml
+--- a/vm-gc/agent/pom.xml
++++ b/vm-gc/agent/pom.xml
+@@ -80,14 +80,8 @@
+       <scope>test</scope>
+     </dependency>
+     <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.core</artifactId>
+-      <scope>provided</scope>
+-    </dependency>
+-    <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.compendium</artifactId>
+-      <scope>provided</scope>
++      <groupId>org.apache.felix</groupId>
++      <artifactId>org.apache.felix.framework</artifactId>
+     </dependency>
+     <dependency>
+       <groupId>com.redhat.thermostat</groupId>
+diff --git a/vm-gc/client-core/pom.xml b/vm-gc/client-core/pom.xml
+--- a/vm-gc/client-core/pom.xml
++++ b/vm-gc/client-core/pom.xml
+@@ -99,14 +99,8 @@
+       <scope>test</scope>
+     </dependency>
+     <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.core</artifactId>
+-      <scope>provided</scope>
+-    </dependency>
+-    <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.compendium</artifactId>
+-      <scope>provided</scope>
++      <groupId>org.apache.felix</groupId>
++      <artifactId>org.apache.felix.framework</artifactId>
+     </dependency>
+     <dependency>
+       <groupId>com.redhat.thermostat</groupId>
+diff --git a/vm-gc/client-swing/pom.xml b/vm-gc/client-swing/pom.xml
+--- a/vm-gc/client-swing/pom.xml
++++ b/vm-gc/client-swing/pom.xml
+@@ -87,14 +87,8 @@
+       <scope>test</scope>
+     </dependency>
+     <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.core</artifactId>
+-      <scope>provided</scope>
+-    </dependency>
+-    <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.compendium</artifactId>
+-      <scope>provided</scope>
++      <groupId>org.apache.felix</groupId>
++      <artifactId>org.apache.felix.framework</artifactId>
+     </dependency>
+     <dependency>
+       <groupId>org.jfree</groupId>
+diff --git a/vm-gc/command/pom.xml b/vm-gc/command/pom.xml
+--- a/vm-gc/command/pom.xml
++++ b/vm-gc/command/pom.xml
+@@ -67,14 +67,8 @@
+       <version>${project.version}</version>
+     </dependency>
+     <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.core</artifactId>
+-      <scope>provided</scope>
+-    </dependency>
+-    <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.compendium</artifactId>
+-      <scope>provided</scope>
++      <groupId>org.apache.felix</groupId>
++      <artifactId>org.apache.felix.framework</artifactId>
+     </dependency>
+     <dependency>
+       <groupId>com.redhat.thermostat</groupId>
+diff --git a/vm-gc/common/pom.xml b/vm-gc/common/pom.xml
+--- a/vm-gc/common/pom.xml
++++ b/vm-gc/common/pom.xml
+@@ -99,14 +99,8 @@
+       <scope>test</scope>
+     </dependency>
+     <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.core</artifactId>
+-      <scope>provided</scope>
+-    </dependency>
+-    <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.compendium</artifactId>
+-      <scope>provided</scope>
++      <groupId>org.apache.felix</groupId>
++      <artifactId>org.apache.felix.framework</artifactId>
+     </dependency>
+     <dependency>
+       <groupId>com.redhat.thermostat</groupId>
+diff --git a/vm-gc/remote-collector-client-common/pom.xml b/vm-gc/remote-collector-client-common/pom.xml
+--- a/vm-gc/remote-collector-client-common/pom.xml
++++ b/vm-gc/remote-collector-client-common/pom.xml
+@@ -68,14 +68,8 @@
+     </dependency>
+     
+     <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.core</artifactId>
+-      <scope>provided</scope>
+-    </dependency>
+-    <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.compendium</artifactId>
+-      <scope>provided</scope>
++      <groupId>org.apache.felix</groupId>
++      <artifactId>org.apache.felix.framework</artifactId>
+     </dependency>
+     
+     <dependency>
+diff --git a/vm-gc/remote-collector-client-swing/pom.xml b/vm-gc/remote-collector-client-swing/pom.xml
+--- a/vm-gc/remote-collector-client-swing/pom.xml
++++ b/vm-gc/remote-collector-client-swing/pom.xml
+@@ -68,14 +68,8 @@
+     </dependency>
+     
+     <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.core</artifactId>
+-      <scope>provided</scope>
+-    </dependency>
+-    <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.compendium</artifactId>
+-      <scope>provided</scope>
++      <groupId>org.apache.felix</groupId>
++      <artifactId>org.apache.felix.framework</artifactId>
+     </dependency>
+     
+     <dependency>
+diff --git a/vm-gc/remote-collector-command/pom.xml b/vm-gc/remote-collector-command/pom.xml
+--- a/vm-gc/remote-collector-command/pom.xml
++++ b/vm-gc/remote-collector-command/pom.xml
+@@ -68,14 +68,8 @@
+     </dependency>
+     
+     <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.core</artifactId>
+-      <scope>provided</scope>
+-    </dependency>
+-    <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.compendium</artifactId>
+-      <scope>provided</scope>
++      <groupId>org.apache.felix</groupId>
++      <artifactId>org.apache.felix.framework</artifactId>
+     </dependency>
+     
+     <dependency>
+diff --git a/vm-gc/remote-collector-common/pom.xml b/vm-gc/remote-collector-common/pom.xml
+--- a/vm-gc/remote-collector-common/pom.xml
++++ b/vm-gc/remote-collector-common/pom.xml
+@@ -68,14 +68,8 @@
+     </dependency>
+     
+     <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.core</artifactId>
+-      <scope>provided</scope>
+-    </dependency>
+-    <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.compendium</artifactId>
+-      <scope>provided</scope>
++      <groupId>org.apache.felix</groupId>
++      <artifactId>org.apache.felix.framework</artifactId>
+     </dependency>
+     
+     <dependency>
+diff --git a/vm-heap-analysis/agent/pom.xml b/vm-heap-analysis/agent/pom.xml
+--- a/vm-heap-analysis/agent/pom.xml
++++ b/vm-heap-analysis/agent/pom.xml
+@@ -72,14 +72,8 @@
+       <scope>test</scope>
+     </dependency>
+     <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.core</artifactId>
+-      <scope>provided</scope>
+-    </dependency>
+-    <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.compendium</artifactId>
+-      <scope>provided</scope>
++      <groupId>org.apache.felix</groupId>
++      <artifactId>org.apache.felix.framework</artifactId>
+     </dependency>
+ 
+     <dependency>
+diff --git a/vm-heap-analysis/client-core/pom.xml b/vm-heap-analysis/client-core/pom.xml
+--- a/vm-heap-analysis/client-core/pom.xml
++++ b/vm-heap-analysis/client-core/pom.xml
+@@ -94,14 +94,8 @@
+       <scope>test</scope>
+     </dependency>
+     <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.core</artifactId>
+-      <scope>provided</scope>
+-    </dependency>
+-    <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.compendium</artifactId>
+-      <scope>provided</scope>
++      <groupId>org.apache.felix</groupId>
++      <artifactId>org.apache.felix.framework</artifactId>
+     </dependency>
+     
+     <dependency>
+diff --git a/vm-heap-analysis/client-swing/pom.xml b/vm-heap-analysis/client-swing/pom.xml
+--- a/vm-heap-analysis/client-swing/pom.xml
++++ b/vm-heap-analysis/client-swing/pom.xml
+@@ -91,14 +91,8 @@
+     </dependency>
+     
+     <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.core</artifactId>
+-      <scope>provided</scope>
+-    </dependency>
+-    <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.compendium</artifactId>
+-      <scope>provided</scope>
++      <groupId>org.apache.felix</groupId>
++      <artifactId>org.apache.felix.framework</artifactId>
+     </dependency>
+     
+     <dependency>
+diff --git a/vm-heap-analysis/command/pom.xml b/vm-heap-analysis/command/pom.xml
+--- a/vm-heap-analysis/command/pom.xml
++++ b/vm-heap-analysis/command/pom.xml
+@@ -93,14 +93,8 @@
+       <scope>test</scope>
+     </dependency>
+     <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.core</artifactId>
+-      <scope>provided</scope>
+-    </dependency>
+-    <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.compendium</artifactId>
+-      <scope>provided</scope>
++      <groupId>org.apache.felix</groupId>
++      <artifactId>org.apache.felix.framework</artifactId>
+     </dependency>
+     
+     <dependency>
+diff --git a/vm-heap-analysis/common/pom.xml b/vm-heap-analysis/common/pom.xml
+--- a/vm-heap-analysis/common/pom.xml
++++ b/vm-heap-analysis/common/pom.xml
+@@ -93,14 +93,8 @@
+       <scope>test</scope>
+     </dependency>
+     <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.core</artifactId>
+-      <scope>provided</scope>
+-    </dependency>
+-    <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.compendium</artifactId>
+-      <scope>provided</scope>
++      <groupId>org.apache.felix</groupId>
++      <artifactId>org.apache.felix.framework</artifactId>
+     </dependency>
+     
+     <dependency>
+diff --git a/vm-io/agent/pom.xml b/vm-io/agent/pom.xml
+--- a/vm-io/agent/pom.xml
++++ b/vm-io/agent/pom.xml
+@@ -80,14 +80,8 @@
+       <scope>test</scope>
+     </dependency>
+     <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.core</artifactId>
+-      <scope>provided</scope>
+-    </dependency>
+-    <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.compendium</artifactId>
+-      <scope>provided</scope>
++      <groupId>org.apache.felix</groupId>
++      <artifactId>org.apache.felix.framework</artifactId>
+     </dependency>
+     <dependency>
+       <groupId>com.redhat.thermostat</groupId>
+diff --git a/vm-io/client-cli/pom.xml b/vm-io/client-cli/pom.xml
+--- a/vm-io/client-cli/pom.xml
++++ b/vm-io/client-cli/pom.xml
+@@ -80,14 +80,8 @@
+       <scope>test</scope>
+     </dependency>
+     <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.core</artifactId>
+-      <scope>provided</scope>
+-    </dependency>
+-    <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.compendium</artifactId>
+-      <scope>provided</scope>
++      <groupId>org.apache.felix</groupId>
++      <artifactId>org.apache.felix.framework</artifactId>
+     </dependency>
+     <dependency>
+       <groupId>com.redhat.thermostat</groupId>
+diff --git a/vm-io/client-core/pom.xml b/vm-io/client-core/pom.xml
+--- a/vm-io/client-core/pom.xml
++++ b/vm-io/client-core/pom.xml
+@@ -98,14 +98,8 @@
+       <scope>test</scope>
+     </dependency>
+     <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.core</artifactId>
+-      <scope>provided</scope>
+-    </dependency>
+-    <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.compendium</artifactId>
+-      <scope>provided</scope>
++      <groupId>org.apache.felix</groupId>
++      <artifactId>org.apache.felix.framework</artifactId>
+     </dependency>
+     <dependency>
+       <groupId>com.redhat.thermostat</groupId>
+diff --git a/vm-io/client-swing/pom.xml b/vm-io/client-swing/pom.xml
+--- a/vm-io/client-swing/pom.xml
++++ b/vm-io/client-swing/pom.xml
+@@ -87,14 +87,8 @@
+       <scope>test</scope>
+     </dependency>
+     <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.core</artifactId>
+-      <scope>provided</scope>
+-    </dependency>
+-    <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.compendium</artifactId>
+-      <scope>provided</scope>
++      <groupId>org.apache.felix</groupId>
++      <artifactId>org.apache.felix.framework</artifactId>
+     </dependency>
+     <dependency>
+       <groupId>org.jfree</groupId>
+diff --git a/vm-io/common/pom.xml b/vm-io/common/pom.xml
+--- a/vm-io/common/pom.xml
++++ b/vm-io/common/pom.xml
+@@ -98,14 +98,8 @@
+       <scope>test</scope>
+     </dependency>
+     <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.core</artifactId>
+-      <scope>provided</scope>
+-    </dependency>
+-    <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.compendium</artifactId>
+-      <scope>provided</scope>
++      <groupId>org.apache.felix</groupId>
++      <artifactId>org.apache.felix.framework</artifactId>
+     </dependency>
+     <dependency>
+       <groupId>com.redhat.thermostat</groupId>
+diff --git a/vm-jmx/agent/pom.xml b/vm-jmx/agent/pom.xml
+--- a/vm-jmx/agent/pom.xml
++++ b/vm-jmx/agent/pom.xml
+@@ -86,14 +86,8 @@
+       <scope>test</scope>
+     </dependency>
+     <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.core</artifactId>
+-      <scope>provided</scope>
+-    </dependency>
+-    <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.compendium</artifactId>
+-      <scope>provided</scope>
++      <groupId>org.apache.felix</groupId>
++      <artifactId>org.apache.felix.framework</artifactId>
+     </dependency>
+     <dependency>
+       <groupId>com.redhat.thermostat</groupId>
+diff --git a/vm-jmx/client-core/pom.xml b/vm-jmx/client-core/pom.xml
+--- a/vm-jmx/client-core/pom.xml
++++ b/vm-jmx/client-core/pom.xml
+@@ -88,14 +88,8 @@
+       <scope>test</scope>
+     </dependency>
+     <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.core</artifactId>
+-      <scope>provided</scope>
+-    </dependency>
+-    <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.compendium</artifactId>
+-      <scope>provided</scope>
++      <groupId>org.apache.felix</groupId>
++      <artifactId>org.apache.felix.framework</artifactId>
+     </dependency>
+     <dependency>
+       <groupId>com.redhat.thermostat</groupId>
+diff --git a/vm-jmx/client-swing/pom.xml b/vm-jmx/client-swing/pom.xml
+--- a/vm-jmx/client-swing/pom.xml
++++ b/vm-jmx/client-swing/pom.xml
+@@ -96,14 +96,8 @@
+       <scope>test</scope>
+     </dependency>
+     <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.core</artifactId>
+-      <scope>provided</scope>
+-    </dependency>
+-    <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.compendium</artifactId>
+-      <scope>provided</scope>
++      <groupId>org.apache.felix</groupId>
++      <artifactId>org.apache.felix.framework</artifactId>
+     </dependency>
+     <dependency>
+       <groupId>com.redhat.thermostat</groupId>
+diff --git a/vm-jmx/common/pom.xml b/vm-jmx/common/pom.xml
+--- a/vm-jmx/common/pom.xml
++++ b/vm-jmx/common/pom.xml
+@@ -88,14 +88,8 @@
+       <scope>test</scope>
+     </dependency>
+     <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.core</artifactId>
+-      <scope>provided</scope>
+-    </dependency>
+-    <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.compendium</artifactId>
+-      <scope>provided</scope>
++      <groupId>org.apache.felix</groupId>
++      <artifactId>org.apache.felix.framework</artifactId>
+     </dependency>
+     <dependency>
+       <groupId>com.redhat.thermostat</groupId>
+diff --git a/vm-memory/agent/pom.xml b/vm-memory/agent/pom.xml
+--- a/vm-memory/agent/pom.xml
++++ b/vm-memory/agent/pom.xml
+@@ -80,14 +80,8 @@
+       <scope>test</scope>
+     </dependency>
+     <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.core</artifactId>
+-      <scope>provided</scope>
+-    </dependency>
+-    <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.compendium</artifactId>
+-      <scope>provided</scope>
++      <groupId>org.apache.felix</groupId>
++      <artifactId>org.apache.felix.framework</artifactId>
+     </dependency>
+     <dependency>
+       <groupId>com.redhat.thermostat</groupId>
+diff --git a/vm-memory/client-cli/pom.xml b/vm-memory/client-cli/pom.xml
+--- a/vm-memory/client-cli/pom.xml
++++ b/vm-memory/client-cli/pom.xml
+@@ -80,14 +80,8 @@
+       <scope>test</scope>
+     </dependency>
+     <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.core</artifactId>
+-      <scope>provided</scope>
+-    </dependency>
+-    <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.compendium</artifactId>
+-      <scope>provided</scope>
++      <groupId>org.apache.felix</groupId>
++      <artifactId>org.apache.felix.framework</artifactId>
+     </dependency>
+     <dependency>
+       <groupId>com.redhat.thermostat</groupId>
+diff --git a/vm-memory/client-core/pom.xml b/vm-memory/client-core/pom.xml
+--- a/vm-memory/client-core/pom.xml
++++ b/vm-memory/client-core/pom.xml
+@@ -84,14 +84,8 @@
+       <scope>test</scope>
+     </dependency>
+     <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.core</artifactId>
+-      <scope>provided</scope>
+-    </dependency>
+-    <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.compendium</artifactId>
+-      <scope>provided</scope>
++      <groupId>org.apache.felix</groupId>
++      <artifactId>org.apache.felix.framework</artifactId>
+     </dependency>
+     <dependency>
+       <groupId>org.jfree</groupId>
+diff --git a/vm-memory/client-swing/pom.xml b/vm-memory/client-swing/pom.xml
+--- a/vm-memory/client-swing/pom.xml
++++ b/vm-memory/client-swing/pom.xml
+@@ -90,14 +90,8 @@
+       <scope>test</scope>
+     </dependency>
+     <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.core</artifactId>
+-      <scope>provided</scope>
+-    </dependency>
+-    <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.compendium</artifactId>
+-      <scope>provided</scope>
++      <groupId>org.apache.felix</groupId>
++      <artifactId>org.apache.felix.framework</artifactId>
+     </dependency>
+     <dependency>
+       <groupId>org.jfree</groupId>
+diff --git a/vm-memory/common/pom.xml b/vm-memory/common/pom.xml
+--- a/vm-memory/common/pom.xml
++++ b/vm-memory/common/pom.xml
+@@ -99,14 +99,8 @@
+       <scope>test</scope>
+     </dependency>
+     <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.core</artifactId>
+-      <scope>provided</scope>
+-    </dependency>
+-    <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.compendium</artifactId>
+-      <scope>provided</scope>
++      <groupId>org.apache.felix</groupId>
++      <artifactId>org.apache.felix.framework</artifactId>
+     </dependency>
+     <dependency>
+       <groupId>com.redhat.thermostat</groupId>
+diff --git a/vm-overview/client-core/pom.xml b/vm-overview/client-core/pom.xml
+--- a/vm-overview/client-core/pom.xml
++++ b/vm-overview/client-core/pom.xml
+@@ -83,14 +83,8 @@
+       <scope>test</scope>
+     </dependency>
+     <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.core</artifactId>
+-      <scope>provided</scope>
+-    </dependency>
+-    <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.compendium</artifactId>
+-      <scope>provided</scope>
++      <groupId>org.apache.felix</groupId>
++      <artifactId>org.apache.felix.framework</artifactId>
+     </dependency>
+     <dependency>
+       <groupId>com.redhat.thermostat</groupId>
+diff --git a/vm-overview/client-swing/pom.xml b/vm-overview/client-swing/pom.xml
+--- a/vm-overview/client-swing/pom.xml
++++ b/vm-overview/client-swing/pom.xml
+@@ -87,14 +87,8 @@
+       <scope>test</scope>
+     </dependency>
+     <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.core</artifactId>
+-      <scope>provided</scope>
+-    </dependency>
+-    <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.compendium</artifactId>
+-      <scope>provided</scope>
++      <groupId>org.apache.felix</groupId>
++      <artifactId>org.apache.felix.framework</artifactId>
+     </dependency>
+     <dependency>
+       <groupId>org.jfree</groupId>
+diff --git a/vm-profiler/agent/pom.xml b/vm-profiler/agent/pom.xml
+--- a/vm-profiler/agent/pom.xml
++++ b/vm-profiler/agent/pom.xml
+@@ -96,14 +96,8 @@
+       <scope>test</scope>
+     </dependency>
+     <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.core</artifactId>
+-      <scope>provided</scope>
+-    </dependency>
+-    <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.compendium</artifactId>
+-      <scope>provided</scope>
++      <groupId>org.apache.felix</groupId>
++      <artifactId>org.apache.felix.framework</artifactId>
+     </dependency>
+     <dependency>
+       <groupId>com.redhat.thermostat</groupId>
+diff --git a/vm-profiler/client-cli/pom.xml b/vm-profiler/client-cli/pom.xml
+--- a/vm-profiler/client-cli/pom.xml
++++ b/vm-profiler/client-cli/pom.xml
+@@ -80,14 +80,8 @@
+       <scope>test</scope>
+     </dependency>
+     <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.core</artifactId>
+-      <scope>provided</scope>
+-    </dependency>
+-    <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.compendium</artifactId>
+-      <scope>provided</scope>
++      <groupId>org.apache.felix</groupId>
++      <artifactId>org.apache.felix.framework</artifactId>
+     </dependency>
+     <dependency>
+       <groupId>com.redhat.thermostat</groupId>
+diff --git a/vm-profiler/client-core/pom.xml b/vm-profiler/client-core/pom.xml
+--- a/vm-profiler/client-core/pom.xml
++++ b/vm-profiler/client-core/pom.xml
+@@ -98,14 +98,8 @@
+       <scope>test</scope>
+     </dependency>
+     <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.core</artifactId>
+-      <scope>provided</scope>
+-    </dependency>
+-    <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.compendium</artifactId>
+-      <scope>provided</scope>
++      <groupId>org.apache.felix</groupId>
++      <artifactId>org.apache.felix.framework</artifactId>
+     </dependency>
+     <dependency>
+       <groupId>com.redhat.thermostat</groupId>
+diff --git a/vm-profiler/client-swing/pom.xml b/vm-profiler/client-swing/pom.xml
+--- a/vm-profiler/client-swing/pom.xml
++++ b/vm-profiler/client-swing/pom.xml
+@@ -87,14 +87,8 @@
+       <scope>test</scope>
+     </dependency>
+     <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.core</artifactId>
+-      <scope>provided</scope>
+-    </dependency>
+-    <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.compendium</artifactId>
+-      <scope>provided</scope>
++      <groupId>org.apache.felix</groupId>
++      <artifactId>org.apache.felix.framework</artifactId>
+     </dependency>
+     <dependency>
+       <groupId>org.jfree</groupId>
+diff --git a/vm-profiler/common/pom.xml b/vm-profiler/common/pom.xml
+--- a/vm-profiler/common/pom.xml
++++ b/vm-profiler/common/pom.xml
+@@ -98,14 +98,8 @@
+       <scope>test</scope>
+     </dependency>
+     <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.core</artifactId>
+-      <scope>provided</scope>
+-    </dependency>
+-    <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.compendium</artifactId>
+-      <scope>provided</scope>
++      <groupId>org.apache.felix</groupId>
++      <artifactId>org.apache.felix.framework</artifactId>
+     </dependency>
+     <dependency>
+       <groupId>com.redhat.thermostat</groupId>
+diff --git a/web/client/pom.xml b/web/client/pom.xml
+--- a/web/client/pom.xml
++++ b/web/client/pom.xml
+@@ -64,12 +64,6 @@
+     </dependency>
+ 
+     <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.core</artifactId>
+-      <scope>provided</scope>
+-    </dependency>
+-
+-    <dependency>
+       <groupId>org.eclipse.jetty</groupId>
+       <artifactId>jetty-server</artifactId>
+       <version>${jetty.version}</version>
+@@ -93,11 +87,9 @@
+       <artifactId>httpclient-osgi</artifactId>
+       <version>${httpcomponents.client.version}</version>
+     </dependency>
+-    <!-- httpclient 4.3 needs this bundle, but does only
+-         specify it's dep on it with scope provided -->
+     <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.compendium</artifactId>
++      <groupId>org.apache.felix</groupId>
++      <artifactId>org.apache.felix.framework</artifactId>
+     </dependency>
+     <dependency>
+       <groupId>org.apache.httpcomponents</groupId>
+diff --git a/web/server/pom.xml b/web/server/pom.xml
+--- a/web/server/pom.xml
++++ b/web/server/pom.xml
+@@ -131,9 +131,8 @@
+     </dependency>
+ 
+     <dependency>
+-      <groupId>org.osgi</groupId>
+-      <artifactId>org.osgi.core</artifactId>
+-      <scope>provided</scope>
++      <groupId>org.apache.felix</groupId>
++      <artifactId>org.apache.felix.framework</artifactId>
+     </dependency>
+ 
+     <dependency>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/rpmbuild/SOURCES/remove-apache-aries-versioning-plugin.patch	Wed Jun 03 09:59:33 2015 -0400
@@ -0,0 +1,28 @@
+Index: pom.xml
+===================================================================
+--- pom.xml	(revision 1681751)
++++ pom.xml	(working copy)
+@@ -422,23 +422,6 @@
+                     <excludePackageNames>*.impl</excludePackageNames>
+                 </configuration>
+             </plugin>
+-             <plugin>
+-                <groupId>org.apache.aries.versioning</groupId>
+-                <artifactId>org.apache.aries.versioning.plugin</artifactId>
+-                <version>0.1.0</version>
+-                <executions>
+-                    <execution>
+-                        <id>default-verify</id>
+-                        <phase>verify</phase>
+-                        <goals>
+-                            <goal>version-check</goal>
+-                        </goals>
+-                        <configuration>
+-                            <oldArtifact>org.apache.felix:org.apache.felix.scr:1.6.2</oldArtifact>
+-                        </configuration>
+-                    </execution>
+-                </executions>
+-            </plugin>
+         </plugins>
+     </build>
+ 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/rpmbuild/SOURCES/remove-system-scope.patch	Wed Jun 03 09:59:33 2015 -0400
@@ -0,0 +1,32 @@
+# HG changeset patch
+# Parent 155dbcc9aed889720e8e099e61a47a902c34507a
+
+diff --git a/pom.xml b/pom.xml
+--- a/pom.xml
++++ b/pom.xml
+@@ -57,6 +57,7 @@
+         <license.skip>false</license.skip>
+       </properties>
+     </profile>
++
+     <profile>
+       <!-- Some thermostat code uses sun.jvmstat and com.sun.tools.attach.
+            These are only available via tools.jar prior to JDK 9 -->
+@@ -68,13 +69,14 @@
+         <dependency>
+           <groupId>com.sun</groupId>
+           <artifactId>tools</artifactId>
+-          <version>${jdktools.version}</version>
+-          <scope>system</scope>
+-          <systemPath>${java.home}/../lib/tools.jar</systemPath>
++          <!--<version>${jdktools.version}</version>-->
++          <!--<scope>system</scope>-->
++          <!--<systemPath>${java.home}/../lib/tools.jar</systemPath>-->
+         </dependency>
+       </dependencies>
+     </profile>
+ 
++
+     <!-- Profile for running performance tests. Performance tests are
+          excluded from normal builds. That is, they'll only run if
+          explicitly requested via -Pperf-tests. See web/common/pom.xml 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/rpmbuild/SOURCES/scl-thermostat-tomcat-service-sysconfig	Wed Jun 03 09:59:33 2015 -0400
@@ -0,0 +1,5 @@
+# Custom configuration for Thermostat's tomcat. Thermostat's
+# CATALINA_BASE == /var/lib/tomcats/thermostat
+#
+# All we need to set is the JAAS config.
+JAVA_OPTS="-Djava.security.auth.login.config=__jaas_config__"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/rpmbuild/SOURCES/test-ambiguity.patch	Wed Jun 03 09:59:33 2015 -0400
@@ -0,0 +1,43 @@
+--- ./src/test/java/org/apache/felix/framework/BundleWiringImplTest.java.orig	2015-01-27 10:44:39.842669153 +0000
++++ ./src/test/java/org/apache/felix/framework/BundleWiringImplTest.java	2015-01-27 10:45:09.340240425 +0000
+@@ -222,10 +222,10 @@
+         assertEquals("There should be 2 state changes fired by the weaving", 2,
+                 dummyWovenClassListener.stateList.size());
+         assertEquals("The first state change should transform the class",
+-                WovenClass.TRANSFORMED,
+-                dummyWovenClassListener.stateList.get(0));
++                (long)WovenClass.TRANSFORMED,
++                (long)dummyWovenClassListener.stateList.get(0));
+         assertEquals("The second state change should define the class",
+-                WovenClass.DEFINED, dummyWovenClassListener.stateList.get(1));
++                (long)WovenClass.DEFINED, (long)dummyWovenClassListener.stateList.get(1));
+     }
+ 
+     @SuppressWarnings({ "unchecked", "rawtypes" })
+@@ -292,8 +292,8 @@
+                 dummyWovenClassListener.stateList.size());
+         assertEquals(
+                 "The only state change should be a failed transform on the class",
+-                WovenClass.TRANSFORMING_FAILED,
+-                dummyWovenClassListener.stateList.get(0));
++                (long)WovenClass.TRANSFORMING_FAILED,
++                (long)dummyWovenClassListener.stateList.get(0));
+ 
+     }
+ 
+@@ -358,11 +358,11 @@
+         assertEquals("There should be 2 state changes fired by the weaving", 2,
+                 dummyWovenClassListener.stateList.size());
+         assertEquals("The first state change should transform the class",
+-                WovenClass.TRANSFORMED,
+-                dummyWovenClassListener.stateList.get(0));
++                (long)WovenClass.TRANSFORMED,
++                (long)dummyWovenClassListener.stateList.get(0));
+         assertEquals("The second state change failed the define on the class",
+-                WovenClass.DEFINE_FAILED,
+-                dummyWovenClassListener.stateList.get(1));
++                (long)WovenClass.DEFINE_FAILED,
++                (long)dummyWovenClassListener.stateList.get(1));
+     }
+ 
+     @SuppressWarnings("rawtypes")
Binary file rpmbuild/SOURCES/thermostat-1.99.2-SNAPSHOT.tar.gz has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/rpmbuild/SOURCES/thermostat-local	Wed Jun 03 09:59:33 2015 -0400
@@ -0,0 +1,43 @@
+#!/bin/bash
+#
+# Starts thermostat storage (i.e. DB), attaches a
+# local thermostat agent and opens up the
+# thermostat gui (swing client).
+#
+#set -xv
+
+function stop_agent() {
+    if [ -e "${THERMOSTAT_AGENT_PID}" ]; then
+        pid=$(cat "${THERMOSTAT_AGENT_PID}")
+        kill ${pid}
+        retval=$?
+        # cleanup pid
+        rm -rf "${THERMOSTAT_AGENT_PID}"
+        return ${retval}
+    else
+        return 1
+    fi
+}
+
+USER_THERMOSTAT_HOME=${HOME}/.thermostat
+if [! -e ${USER_THERMOSTAT_HOME} ]; then
+  mkdir -p ${USER_THERMOSTAT_HOME} 
+fi
+if [! -e ${USER_THERMOSTAT_HOME}/run ]; then
+  mkdir ${USER_THERMOSTAT_HOME} 
+fi
+
+THERMOSTAT=@thermostat.home@/bin/thermostat
+THERMOSTAT_AGENT_SCRIPT=@thermostat.home@
+THERMOSTAT_AGENT_PID=${USER_THERMOSTAT_HOME}/run/thermostat-local-agent.pid
+
+# Start storage
+${THERMOSTAT} storage --start
+# Start an agent in the background
+${THERMOSTAT} -Tbg "${THERMOSTAT_AGENT_PID}" agent
+# Start the gui; this blocks
+${THERMOSTAT} gui
+
+# This means gui finished, stop agent and storage
+stop_agent
+${THERMOSTAT} storage --stop
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/rpmbuild/SOURCES/thermostat-sysconfig	Wed Jun 03 09:59:33 2015 -0400
@@ -0,0 +1,10 @@
+# This file is "sourced" for systemd services only
+#
+# If thermostat {storage,agent} is run via systemd,
+# data directories are in __thermostat_home__
+#
+# Do not change this unless you know what you are doing
+THERMOSTAT_HOME=__thermostat_home__
+USER_THERMOSTAT_HOME=__thermostat_user_home__
+# any value vor this env var will do
+THERMOSTAT_SYSTEM_USER=true
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/rpmbuild/SOURCES/thermostat_icon_64px.svg	Wed Jun 03 09:59:33 2015 -0400
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
+	 width="64px" height="59.667px" viewBox="0 0 64 59.667" enable-background="new 0 0 64 59.667" xml:space="preserve">
+<g>
+	<path fill="#27426E" d="M42.784,15.393l-2.005-1.643c-0.867-1.703-1.208-4.423-1.255-4.839l0.019-0.051c0,0-0.01,0.008-0.023,0.021
+		c-0.002-0.018-0.003-0.032-0.003-0.032l-0.022,0.048c-0.327,0.264-2.485,1.951-4.301,2.548l-2.343-0.224
+		C22.383,9.409,11.607,14.769,6.992,24.883C1.501,36.919,6.805,51.126,18.838,56.616c12.035,5.491,26.24,0.186,31.732-11.848
+		C55.398,34.188,51.88,21.933,42.784,15.393z"/>
+	<circle fill="#3970AF" cx="31.146" cy="29.642" r="15.494"/>
+	<circle fill="#FFFFFF" cx="31.464" cy="28.886" r="13.944"/>
+	<path fill="#3970AF" d="M38.798,16.854l1.98,0.656l-1.593-1.315c-0.653-1.292-0.909-3.343-0.946-3.661l0.014-0.037
+		c0,0-0.008,0.009-0.017,0.016c-0.002-0.016-0.003-0.024-0.003-0.024l-0.017,0.038c-0.248,0.197-1.889,1.479-3.268,1.934
+		l-2.042-0.196l1.872,0.904l-3.314,13.718L38.798,16.854z"/>
+</g>
+<g>
+	<path fill="#27426E" d="M5.93,16.927l-3.868-2.781c-0.126-0.09-0.33-0.199-0.59-0.199c-0.312,0-0.59,0.152-0.789,0.43
+		c-0.206,0.287-0.258,0.611-0.144,0.914c0.086,0.23,0.247,0.381,0.364,0.467l3.87,2.785c0.176,0.124,0.376,0.189,0.579,0.189
+		c0.313,0,0.606-0.152,0.799-0.421C6.484,17.846,6.393,17.265,5.93,16.927z"/>
+	<path fill="#27426E" d="M10.119,12.554l-3.2-3.534C6.722,8.801,6.463,8.681,6.191,8.681c-0.167,0-0.42,0.049-0.67,0.273
+		c-0.428,0.387-0.459,0.977-0.076,1.396l3.202,3.535c0.194,0.215,0.451,0.333,0.724,0.333c0.243,0,0.482-0.095,0.673-0.269
+		c0.263-0.238,0.384-0.558,0.331-0.879C10.337,12.834,10.214,12.658,10.119,12.554z"/>
+	<path fill="#27426E" d="M12.765,5.015c-0.276-0.479-0.861-0.643-1.355-0.355c-0.495,0.286-0.648,0.854-0.366,1.35l2.39,4.128
+		c0.18,0.313,0.494,0.499,0.839,0.499c0.175,0,0.354-0.05,0.514-0.143c0.308-0.179,0.493-0.465,0.508-0.789
+		c0.013-0.24-0.07-0.438-0.141-0.561L12.765,5.015z"/>
+	<path fill="#27426E" d="M19.29,2.329c-0.171-0.529-0.704-0.811-1.251-0.63c-0.342,0.11-0.51,0.326-0.591,0.484
+		c-0.117,0.229-0.131,0.501-0.046,0.759l1.478,4.535c0.135,0.414,0.497,0.684,0.922,0.684c0.11,0,0.221-0.018,0.33-0.055
+		c0.545-0.178,0.813-0.701,0.637-1.244L19.29,2.329z"/>
+	<path fill="#27426E" d="M26.239,1.054c-0.056-0.519-0.453-0.881-0.965-0.881L25.147,0.18c-0.571,0.062-0.942,0.517-0.883,1.085
+		l0.503,4.742c0.056,0.519,0.457,0.881,0.975,0.881L25.86,6.88c0.352-0.036,0.639-0.225,0.785-0.514
+		c0.109-0.215,0.113-0.43,0.098-0.57L26.239,1.054z"/>
+	<path fill="#27426E" d="M32.428,0.177l-0.124-0.006c-0.515,0-0.912,0.364-0.966,0.883l-0.504,4.74
+		c-0.06,0.561,0.32,1.024,0.885,1.086l0.125,0.008c0.513,0,0.91-0.364,0.966-0.883l0.501-4.742
+		C33.372,0.696,33.001,0.239,32.428,0.177z"/>
+	<path fill="#27426E" d="M39.531,1.702c-0.542-0.177-1.076,0.1-1.25,0.627l-1.486,4.529c-0.174,0.533,0.098,1.07,0.637,1.248
+		c0.117,0.037,0.23,0.055,0.343,0.055c0.42,0,0.767-0.262,0.907-0.684l1.485-4.528c0.045-0.134,0.085-0.346,0.024-0.579
+		C40.108,2.058,39.869,1.814,39.531,1.702z"/>
+	<path fill="#27426E" d="M46.157,4.663c-0.494-0.287-1.079-0.121-1.353,0.355l-2.39,4.129c-0.28,0.487-0.121,1.066,0.369,1.352
+		c0.169,0.098,0.344,0.145,0.52,0.145c0.339,0,0.65-0.188,0.831-0.502l2.389-4.128c0.139-0.24,0.179-0.507,0.114-0.755
+		C46.589,5.085,46.469,4.841,46.157,4.663z"/>
+	<path fill="#27426E" d="M52.38,9.64c-0.009-0.18-0.076-0.444-0.343-0.686c-0.249-0.229-0.501-0.276-0.67-0.276
+		c-0.271,0-0.527,0.121-0.728,0.338l-3.201,3.536c-0.182,0.199-0.275,0.452-0.262,0.708c0.013,0.261,0.132,0.505,0.337,0.69
+		c0.25,0.226,0.503,0.273,0.671,0.273c0.272,0,0.531-0.123,0.726-0.34l3.2-3.531C52.296,10.148,52.392,9.896,52.38,9.64z"/>
+	<path fill="#27426E" d="M57.086,15.132c0.031-0.178,0.021-0.45-0.189-0.741c-0.199-0.278-0.48-0.429-0.79-0.429
+		c-0.26,0-0.462,0.105-0.59,0.197l-3.874,2.783c-0.22,0.156-0.363,0.382-0.406,0.637c-0.042,0.256,0.023,0.52,0.183,0.744
+		c0.201,0.276,0.48,0.43,0.792,0.43c0.258,0,0.463-0.107,0.589-0.199l3.874-2.781C56.9,15.612,57.046,15.385,57.086,15.132z"/>
+	<path fill="#27426E" d="M60.428,21.624c0.178-0.271,0.2-0.61,0.058-0.936c-0.166-0.379-0.496-0.603-0.881-0.603
+		c-0.179,0-0.327,0.046-0.422,0.088l-4.366,1.918c-0.248,0.107-0.435,0.299-0.527,0.539c-0.095,0.242-0.085,0.515,0.024,0.766
+		c0.166,0.377,0.496,0.605,0.879,0.605c0.141,0,0.286-0.03,0.423-0.093l4.365-1.917C60.112,21.935,60.296,21.826,60.428,21.624z"/>
+	<path fill="#27426E" d="M57.268,29.762l4.668-0.97c0.272-0.057,0.496-0.204,0.636-0.418c0.101-0.149,0.201-0.4,0.129-0.758
+		c-0.101-0.48-0.472-0.792-0.945-0.792c-0.076,0-0.152,0.008-0.222,0.021l-4.671,0.971c-0.549,0.115-0.876,0.62-0.761,1.174
+		c0.101,0.482,0.471,0.793,0.944,0.793C57.119,29.783,57.193,29.776,57.268,29.762z"/>
+	<path fill="#27426E" d="M63.146,34.131c-0.179-0.181-0.431-0.281-0.707-0.285l-4.773-0.028c-0.557,0-0.98,0.424-0.985,0.985
+		c-0.002,0.359,0.147,0.587,0.273,0.716c0.181,0.181,0.43,0.282,0.707,0.282l4.773,0.03c0.566,0,0.979-0.415,0.983-0.985
+		C63.421,34.485,63.271,34.259,63.146,34.131z"/>
+</g>
+</svg>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/rpmbuild/SOURCES/web_storage_endpoint_fix.patch	Wed Jun 03 09:59:33 2015 -0400
@@ -0,0 +1,390 @@
+# HG changeset patch
+# Parent fe42baddfcd5c317fd2cc75b3b9f35d4e46ae08d
+diff --git a/distribution/config/thermostat_webstorageservice_jaas.conf b/distribution/config/thermostat_webstorageservice_jaas.conf
+new file mode 100644
+--- /dev/null
++++ b/distribution/config/thermostat_webstorageservice_jaas.conf
+@@ -0,0 +1,10 @@
++ThermostatJAASLogin {
++   com.redhat.thermostat.web.server.auth.spi.DelegateLoginModule required debug=false;
++};
++ 
++ThermostatJAASDelegate {
++   com.redhat.thermostat.web.server.auth.spi.PropertiesUsernameRolesLoginModule required
++   debug=false
++   users.properties="\${user.home}/.thermostat/etc/thermostat-users.properties"
++   roles.properties="\${user.home}/.thermostat/etc/thermostat-roles.properties" ;
++};
+diff --git a/distribution/config/web.auth b/distribution/config/web.auth
+new file mode 100644
+--- /dev/null
++++ b/distribution/config/web.auth
+@@ -0,0 +1,11 @@
++# Credentials to use for connecting to the backing storage
++# (currently mongodb). Uncomment the following two blocks in
++# order to use this username/password for the connection.
++
++# Username to use for connecting to the backing storage
++# implementation
++${web.war.backingstorage.username.snippet}
++
++# Password to use for connecting to the backing storage
++# implementation
++${web.war.backingstorage.password.snippet}
+diff --git a/distribution/pom.xml b/distribution/pom.xml
+--- a/distribution/pom.xml
++++ b/distribution/pom.xml
+@@ -157,6 +157,7 @@
+                     <include>agent.properties</include>
+                     <include>web-storage-service.properties</include>
+                     <include>agent.auth</include>
++                    <include>web.auth</include>
+                     <include>ssl.properties</include>
+                     <include>thermostat-users.properties</include>
+                     <include>thermostat-roles.properties</include>
+diff --git a/distribution/scripts/thermostat-setup b/distribution/scripts/thermostat-setup
+--- a/distribution/scripts/thermostat-setup
++++ b/distribution/scripts/thermostat-setup
+@@ -184,20 +184,7 @@
+ runSetup() {
+   unlockThermostat
+   setupMongodbUser
+-  # Location of the exploded web archive. We need this
+-  # in order to be able to inject mongodb user credentials
+-  # in there. Allow THERMOSTAT_WEBAPP_LOCATION to be set
+-  # as env variable. This allows for running setup on
+-  # packaged thermostat.
+-  if [ "x$THERMOSTAT_WEBAPP_LOCATION" = "x" ]; then
+-    # Expecting an upstream build where THERMOSTAT_HOME is
+-    # distribution/target/image. The web archive gets copied
+-    # as an exploded archive to the webapp subdir of the
+-    # image.
+-    default_webapp="$THERMOSTAT_HOME/webapp"
+-    THERMOSTAT_WEBAPP_LOCATION="$(readlink -f $default_webapp)"
+-  fi
+-  TH_WEB_AUTH="$THERMOSTAT_WEBAPP_LOCATION/WEB-INF/web.auth"
++  TH_WEB_AUTH="$THERMOSTAT_HOME/etc/web.auth"
+   
+   if [ ! -e $TH_WEB_AUTH ]; then
+     echo "File not found: $TH_WEB_AUTH" 1>&2
+diff --git a/web/server/src/main/java/com/redhat/thermostat/web/server/FileBasedStorageCredentials.java b/web/server/src/main/java/com/redhat/thermostat/web/server/FileBasedStorageCredentials.java
+--- a/web/server/src/main/java/com/redhat/thermostat/web/server/FileBasedStorageCredentials.java
++++ b/web/server/src/main/java/com/redhat/thermostat/web/server/FileBasedStorageCredentials.java
+@@ -66,10 +66,6 @@
+ 
+     }
+ 
+-    public FileBasedStorageCredentials(InputStream in) throws IOException {
+-        initialize(in);
+-    }
+-
+     private void initialize(InputStream in) throws IOException {
+         props = new Properties();
+         props.load(in);
+diff --git a/web/server/src/main/java/com/redhat/thermostat/web/server/WebStorageEndPoint.java b/web/server/src/main/java/com/redhat/thermostat/web/server/WebStorageEndPoint.java
+--- a/web/server/src/main/java/com/redhat/thermostat/web/server/WebStorageEndPoint.java
++++ b/web/server/src/main/java/com/redhat/thermostat/web/server/WebStorageEndPoint.java
+@@ -141,6 +141,7 @@
+     // our strings can contain non-ASCII characters. Use UTF-8
+     // see also PR 1344
+     private static final String RESPONSE_JSON_CONTENT_TYPE = "application/json; charset=UTF-8";
++    private static final String CREDENTIALS_FILE = "web.auth";
+ 
+     private static final Logger logger = LoggingUtils.getLogger(WebStorageEndPoint.class);
+ 
+@@ -243,23 +244,11 @@
+     @Override
+     protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws IOException, ServletException {
+         if (storage == null) {
+-            StorageCredentials creds = null;
+-            final String CREDENTIALS_FILE = "web.auth";
+-            // this assumes this is always an exploded war
+-            File systemFile = new File(getServletContext().getRealPath("/WEB-INF/" + CREDENTIALS_FILE));
+-            if (systemFile.exists() && systemFile.canRead()) {
+-                logger.log(Level.CONFIG, "Loading authentication data from WEB-INF/" + CREDENTIALS_FILE);
+-                try (InputStream in = new FileInputStream(systemFile)) {
+-                    creds = new FileBasedStorageCredentials(in);
+-                }
+-            } else {
+-                File userCredentials = new File(paths.getUserConfigurationDirectory(), CREDENTIALS_FILE);
+-                logger.log(Level.CONFIG, "Loading authentication data from " + userCredentials);
+-                if (userCredentials.isFile() && userCredentials.canRead()) {
+-                    creds = new FileBasedStorageCredentials(userCredentials);
+-                } else {
+-                    logger.warning("Unable to read database credentials from " + userCredentials);
+-                }
++            StorageCredentials creds = getStorageCredentials(paths);
++            // if creds are null there is no point to continue, fail prominently.
++            if (creds == null) {
++                String errorMsg = "No backing storage credentials file (" + CREDENTIALS_FILE + ") available";
++                throw new InvalidConfigurationException(errorMsg);
+             }
+             String storageClass = getServletConfig().getInitParameter(STORAGE_CLASS);
+             String storageEndpoint = getServletConfig().getInitParameter(STORAGE_ENDPOINT);
+@@ -292,6 +281,34 @@
+             getMore(req, resp);
+         }
+     }
++    
++    // package private for testing
++    StorageCredentials getStorageCredentials(CommonPaths commonPaths) throws IOException {
++        File systemFile = getStorageCredentialsFile(commonPaths.getSystemConfigurationDirectory());
++        if (systemFile.exists() && systemFile.canRead()) {
++            logger.log(Level.CONFIG, "Loading authentication data from " + systemFile);
++            return createStorageCredentials(systemFile);
++        } else {
++            File userCredentials = getStorageCredentialsFile(commonPaths.getUserConfigurationDirectory());
++            logger.log(Level.CONFIG, "Loading authentication data from " + userCredentials);
++            if (userCredentials.isFile() && userCredentials.canRead()) {
++                return createStorageCredentials(userCredentials);
++            } else {
++                logger.warning("Unable to read database credentials from " + userCredentials);
++                return null;
++            }
++        }
++    }
++    
++    // package private for testing
++    File getStorageCredentialsFile(File parent) {
++        return new File(parent, CREDENTIALS_FILE);
++    }
++    
++    // package private for testing
++    StorageCredentials createStorageCredentials(File underlyingFile) {
++        return new FileBasedStorageCredentials(underlyingFile);
++    }
+ 
+     // Side effect: sets this.paths
+     private void sanityCheckNecessaryFiles() {
+diff --git a/web/server/src/test/java/com/redhat/thermostat/web/server/WebStorageEndPointUnitTest.java b/web/server/src/test/java/com/redhat/thermostat/web/server/WebStorageEndPointUnitTest.java
+--- a/web/server/src/test/java/com/redhat/thermostat/web/server/WebStorageEndPointUnitTest.java
++++ b/web/server/src/test/java/com/redhat/thermostat/web/server/WebStorageEndPointUnitTest.java
+@@ -39,6 +39,7 @@
+ import static org.junit.Assert.assertEquals;
+ import static org.junit.Assert.assertFalse;
+ import static org.junit.Assert.assertNotNull;
++import static org.junit.Assert.assertNull;
+ import static org.junit.Assert.assertTrue;
+ import static org.junit.Assert.fail;
+ import static org.mockito.Mockito.mock;
+@@ -64,6 +65,8 @@
+ import org.junit.Test;
+ import org.mockito.ArgumentCaptor;
+ 
++import com.redhat.thermostat.shared.config.CommonPaths;
++import com.redhat.thermostat.storage.core.StorageCredentials;
+ import com.redhat.thermostat.web.server.auth.WebStoragePathHandler;
+ 
+ /**
+@@ -250,6 +253,114 @@
+         verify(registry).shutDown();
+     }
+     
++    /**
++     * Storage credentials should be read from USER_THERMOSTAT_HOME if
++     * relevant credentials file is not readable or does not exist in
++     * THERMOSTAT_HOME.
++     * 
++     * Only the user file is readable.
++     * 
++     * @throws IOException 
++     */
++    @Test
++    public void canGetUserStorageCredentials() throws IOException {
++        StorageCredsTestSetupResult setupResult = setupForStorageCredentialsTest(false, true);
++        WebStorageEndPoint endPoint = setupResult.endpoint;
++        CommonPaths paths = setupResult.commonPaths;
++        StorageCredentials creds = endPoint.getStorageCredentials(paths);
++        assertNotNull(creds);
++        assertTrue(creds instanceof TestStorageCredentials);
++        TestStorageCredentials testCreds = (TestStorageCredentials)creds;
++        assertTrue(setupResult.userCredsFile == testCreds.underlyingFile);
++    }
++    
++    /**
++     * If Storage credentials file exists and is readable it should
++     * get used over USER_THERMOSTAT_HOME's version. In this test *both*
++     * files are present and readable.
++     * 
++     * @throws IOException 
++     */
++    @Test
++    public void canGetSystemStorageCredentialsBothReadable() throws IOException {
++        StorageCredsTestSetupResult setupResult = setupForStorageCredentialsTest(true, true);
++        WebStorageEndPoint endPoint = setupResult.endpoint;
++        CommonPaths paths = setupResult.commonPaths;
++        StorageCredentials creds = endPoint.getStorageCredentials(paths);
++        assertNotNull(creds);
++        assertTrue(creds instanceof TestStorageCredentials);
++        TestStorageCredentials testCreds = (TestStorageCredentials)creds;
++        assertTrue(setupResult.systemCredsFile == testCreds.underlyingFile);
++    }
++    
++    /**
++     * If Storage credentials file exists and is readable it should
++     * get used over USER_THERMOSTAT_HOME's version. In this test only the
++     * system version is readable.
++     * 
++     * @throws IOException 
++     */
++    @Test
++    public void canGetSystemStorageCredentialsOnlySystemReadable() throws IOException {
++        StorageCredsTestSetupResult setupResult = setupForStorageCredentialsTest(true, false);
++        WebStorageEndPoint endPoint = setupResult.endpoint;
++        CommonPaths paths = setupResult.commonPaths;
++        StorageCredentials creds = endPoint.getStorageCredentials(paths);
++        assertNotNull(creds);
++        assertTrue(creds instanceof TestStorageCredentials);
++        TestStorageCredentials testCreds = (TestStorageCredentials)creds;
++        assertTrue(setupResult.systemCredsFile == testCreds.underlyingFile);
++    }
++    
++    private StorageCredsTestSetupResult setupForStorageCredentialsTest(boolean systemCanRead, boolean userCanRead) {
++        final File systemCredsFile = mock(File.class);
++        when(systemCredsFile.canRead()).thenReturn(systemCanRead);
++        when(systemCredsFile.exists()).thenReturn(true);
++        when(systemCredsFile.getPath()).thenReturn("system_creds_file");
++        final File systemCredsDirectory = mock(File.class);
++        final File userCredsDirectory = mock(File.class);
++        final File userCredsFile = mock(File.class);
++        when(userCredsFile.canRead()).thenReturn(userCanRead);
++        when(userCredsFile.isFile()).thenReturn(true);
++        when(userCredsFile.getPath()).thenReturn("user_creds_file");
++        CommonPaths paths = mock(CommonPaths.class);
++        when(paths.getSystemConfigurationDirectory()).thenReturn(systemCredsDirectory);
++        when(paths.getUserConfigurationDirectory()).thenReturn(userCredsDirectory);
++        @SuppressWarnings("serial")
++        WebStorageEndPoint endpoint = new WebStorageEndPoint() {
++            @Override
++            File getStorageCredentialsFile(File parent) {
++                // intentionally compare exact instances
++                if (systemCredsDirectory == parent) {
++                    return systemCredsFile;
++                }
++                // intentionally compare exact instances
++                if (userCredsDirectory == parent) {
++                    return userCredsFile;
++                }
++                return null;
++            }
++            
++            @Override
++            StorageCredentials createStorageCredentials(File underlyingFile) {
++                return new TestStorageCredentials(underlyingFile);
++            }
++        };
++        return new StorageCredsTestSetupResult(endpoint, paths, systemCredsFile, userCredsFile);
++    }
++    
++    /**
++     * If neither storage credentials exist (none in USER_THERMOSTAT_HOME *and*
++     * in THERMOSTAT_HOME) then null is expected to get returned.
++     * @throws IOException 
++     */
++    @Test
++    public void storageCredentialsNull() throws IOException {
++        StorageCredsTestSetupResult setupResult = setupForStorageCredentialsTest(false, false);
++        StorageCredentials creds = setupResult.endpoint.getStorageCredentials(setupResult.commonPaths);
++        assertNull(creds);
++    }
++    
+     private ThCreatorResult creatWorkingThermostatHome() throws IOException {
+         Path testThermostatHome = Files.createTempDirectory(
+                 "foo-thermostat-home-", new FileAttribute[] {});
+@@ -276,4 +387,44 @@
+         }
+     }
+     
++    private static class StorageCredsTestSetupResult {
++        private WebStorageEndPoint endpoint;
++        private CommonPaths commonPaths;
++        private File systemCredsFile;
++        private File userCredsFile;
++        
++        private StorageCredsTestSetupResult(WebStorageEndPoint endpoint,
++                                            CommonPaths commonPaths,
++                                            File systemCredsFile,
++                                            File userCredsFile) {
++            this.endpoint = endpoint;
++            this.commonPaths = commonPaths;
++            this.systemCredsFile = systemCredsFile;
++            this.userCredsFile = userCredsFile;
++        }
++        
++    }
++    
++    private static class TestStorageCredentials implements StorageCredentials {
++
++        private File underlyingFile;
++        
++        private TestStorageCredentials(File underlyingFile) {
++            this.underlyingFile = underlyingFile;
++        }
++        
++        @Override
++        public String getUsername() {
++            // not implemented
++            return null;
++        }
++
++        @Override
++        public char[] getPassword() {
++            // not implemented
++            return null;
++        }
++        
++    }
++    
+ }
+diff --git a/web/server/src/test/java/com/redhat/thermostat/web/server/WebStorageEndpointTest.java b/web/server/src/test/java/com/redhat/thermostat/web/server/WebStorageEndpointTest.java
+--- a/web/server/src/test/java/com/redhat/thermostat/web/server/WebStorageEndpointTest.java
++++ b/web/server/src/test/java/com/redhat/thermostat/web/server/WebStorageEndpointTest.java
+@@ -266,6 +266,13 @@
+                 } catch (IOException e) {
+                     throw new RuntimeException(e);
+                 }
++                File webAuthFile = new File(configDirectory, "web.auth");
++                // only creates file if it doesn't exist yet
++                try {
++                    webAuthFile.createNewFile();
++                } catch (IOException e) {
++                    throw new RuntimeException(e);
++                }
+             }
+ 
+             @Override
+diff --git a/web/war/pom.xml b/web/war/pom.xml
+--- a/web/war/pom.xml
++++ b/web/war/pom.xml
+@@ -226,7 +226,6 @@
+                   <directory>src/main/webapp</directory>
+                   <includes>
+                     <include>**/web.xml</include>
+-                    <include>**/web.auth</include>
+                   </includes>
+                 </resource>
+               </webResources>
+@@ -249,7 +248,6 @@
+                   <directory>src/main/webapp</directory>
+                   <includes>
+                     <include>**/web.xml</include>
+-                    <include>**/web.auth</include>
+                   </includes>
+                 </resource>
+               </webResources>
+diff --git a/web/war/src/main/webapp/WEB-INF/web.auth b/web/war/src/main/webapp/WEB-INF/web.auth
+deleted file mode 100644
+--- a/web/war/src/main/webapp/WEB-INF/web.auth
++++ /dev/null
+@@ -1,11 +0,0 @@
+-# Credentials to use for connecting to the backing storage
+-# (currently mongodb). Uncomment the following two blocks in
+-# order to use this username/password for the connection.
+-
+-# Username to use for connecting to the backing storage
+-# implementation
+-${web.war.backingstorage.username.snippet}
+-
+-# Password to use for connecting to the backing storage
+-# implementation
+-${web.war.backingstorage.password.snippet}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/rpmbuild/SOURCES/webstorage_service_custom_jaas.patch	Wed Jun 03 09:59:33 2015 -0400
@@ -0,0 +1,33 @@
+# HG changeset patch
+# Parent 5a0c88b443bdc02f027fd15ab17fd5275e81ce1c
+diff --git a/distribution/pom.xml b/distribution/pom.xml
+--- a/distribution/pom.xml
++++ b/distribution/pom.xml
+@@ -161,6 +161,7 @@
+                     <include>thermostat-users.properties</include>
+                     <include>thermostat-roles.properties</include>
+                     <include>thermostat_jaas.conf</include>
++                    <include>thermostat_webstorageservice_jaas.conf</include>
+                     <include>devsetup.input</include>
+                     <include>db.properties</include>
+                     <include>logging.properties</include>
+@@ -203,6 +204,7 @@
+                   <filtering>true</filtering>
+                 </resource>
+               </resources>
++              <escapeString>\</escapeString>
+             </configuration>
+           </execution>
+           <execution>
+diff --git a/web/endpoint-plugin/web-service/src/main/java/com/redhat/thermostat/web/endpoint/internal/EmbeddedServletContainerConfiguration.java b/web/endpoint-plugin/web-service/src/main/java/com/redhat/thermostat/web/endpoint/internal/EmbeddedServletContainerConfiguration.java
+--- a/web/endpoint-plugin/web-service/src/main/java/com/redhat/thermostat/web/endpoint/internal/EmbeddedServletContainerConfiguration.java
++++ b/web/endpoint-plugin/web-service/src/main/java/com/redhat/thermostat/web/endpoint/internal/EmbeddedServletContainerConfiguration.java
+@@ -177,7 +177,7 @@
+     
+     String getAbsolutePathToJaasConfig() throws InvalidConfigurationException {
+         File etcPath = paths.getSystemConfigurationDirectory();
+-        File thermostatJaasConf = new File(etcPath, "thermostat_jaas.conf");
++        File thermostatJaasConf = new File(etcPath, "thermostat_webstorageservice_jaas.conf");
+         try {
+             return thermostatJaasConf.getCanonicalPath();
+         } catch (IOException e) {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/rpmbuild/SPECS/felix-framework.spec	Wed Jun 03 09:59:33 2015 -0400
@@ -0,0 +1,124 @@
+%global bundle org.apache.felix.framework
+
+Name:           felix-framework
+Version:        4.6.0
+Release:        1%{?dist}
+Summary:        Apache Felix Framework
+License:        ASL 2.0
+URL:            http://felix.apache.org
+Source0:        %{bundle}-%{version}.tar.gz
+
+Patch0:         test-ambiguity.patch
+
+BuildArch:      noarch
+
+BuildRequires: maven-local
+BuildRequires: mvn(org.apache.felix:felix-parent:pom:)
+BuildRequires: mvn(org.osgi:org.osgi.annotation)
+BuildRequires: mvn(org.osgi:org.osgi.compendium)
+BuildRequires: mvn(org.osgi:org.osgi.core)
+BuildRequires: mvn(org.mockito:mockito-core)
+
+%description
+Apache Felix Framework Interfaces and Classes.
+
+%package javadoc
+Summary:        API documentation for %{name}
+
+%description javadoc
+This package contains the API documentation for %{name}.
+
+%prep
+%setup -q -n %{bundle}-%{version}
+%patch0
+
+# This test needs porting to easymock3
+rm src/test/java/org/apache/felix/framework/ServiceRegistryTest.java
+%mvn_file :%{bundle} "felix/%{bundle}"
+
+%build
+%mvn_build -f
+
+%install
+%mvn_install
+
+%files -f .mfiles
+
+%files javadoc -f .mfiles-javadoc
+
+%changelog
+* Mon Jan 26 2015 Mat Booth <mat.booth@redhat.com> - 4.6.0-1
+- Update to upstream 4.6.0 release
+
+* Tue Oct 21 2014 Mat Booth <mat.booth@redhat.com> - 4.4.1-1
+- Update to upstream 4.4.1 release.
+
+* Tue Jun 10 2014 Alexander Kurtakov <akurtako@redhat.com> 4.4.0-1
+- Update to upstream 4.4.0 release.
+
+* Tue Jun 10 2014 Alexander Kurtakov <akurtako@redhat.com> 4.2.1-8
+- Add missing BR on felix-parent.
+
+* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.2.1-7
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
+
+* Mon May 26 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 4.2.1-6
+- Remove BuildRequires on maven-surefire-provider-junit4
+
+* Tue Mar 04 2014 Stanislav Ochotnicky <sochotnicky@redhat.com> - 4.2.1-5
+- Use Requires: java-headless rebuild (#1067528)
+
+* Mon Aug 05 2013 Mat Booth <fedora@matbooth.co.uk> - 4.2.1-4
+- Update for latest guidelines
+
+* Sat Aug 03 2013 Mat Booth <fedora@matbooth.co.uk> - 4.2.1-3
+- Add missing BRs
+
+* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.2.1-2
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
+
+* Mon Apr 15 2013 Mat Booth <fedora@matbooth.co.uk> - 4.2.1-1
+- Update to latest upstream version rhbz #951006.
+
+* Thu Feb 21 2013 Mat Booth <fedora@matbooth.co.uk> - 4.2.0-1
+- Update to latest upstream version rhbz #895404.
+- No longer need to remove maven-compiler-plugin invocation.
+
+* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.0.2-6
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
+
+* Wed Feb 06 2013 Java SIG <java-devel@lists.fedoraproject.org> - 4.0.2-5
+- Update for https://fedoraproject.org/wiki/Fedora_19_Maven_Rebuild
+- Replace maven BuildRequires with maven-local
+
+* Mon Aug 27 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 4.0.2-4
+- Remove maven-compiler-plugin invocation, resolves: #842591
+- Remove unneeded BR: maven-invoker-plugin
+
+* Thu Aug 16 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 4.0.2-3
+- Install NOTICE files
+
+* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.0.2-2
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
+
+* Thu Jan 05 2012 Tomas Radej <tradej@redhat.com> - 4.0.2-1
+- Updated to latest version
+- Guidelines fixes
+
+* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.5-5
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
+
+* Sun Dec 12 2010 Mat Booth <fedora@matbooth.co.uk> - 2.0.5-4
+- Fix pom filename (Resolves rhbz#655798)
+- Fix various packaging things according to new guidelines
+
+* Tue Jul 13 2010 Victor G. Vasilyev <victor.vasilyev@sun.com> 2.0.5-3
+- BR: maven-invoker-plugin required for maven-javadoc-plugin
+- Use new names of the maven plgins
+- Add license file to independent subpackage javadoc
+
+* Tue Jul 13 2010 Victor G. Vasilyev <victor.vasilyev@sun.com> 2.0.5-2
+- Use maven instead of ant
+
+* Tue Jun 22 2010 Victor G. Vasilyev <victor.vasilyev@sun.com> 2.0.5-1
+- Release 2.0.5
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/rpmbuild/SPECS/felix-scr-annotations.spec	Wed Jun 03 09:59:33 2015 -0400
@@ -0,0 +1,58 @@
+%global project felix
+%global bundle  org.apache.felix.scr.annotations
+
+Name:           felix-scr-annotations 
+Version:        1.9.6
+Release:        1%{?dist}
+Summary:        Apache Felix Service Component Runtime Annotations
+License:	Apache License V2.0
+URL:		http://felix.apache.org/	
+
+# For building from source tarball
+#Source0:        http://www.apache.org/dist/felix/%{name}-%{version}-source-release.tar.gz
+
+# For building from version control
+# The source for this package was built from upstream's vcs. Use the following
+# commands to generate the tarball:
+# svn checkout http://svn.apache.org/repos/asf/felix/releases/org.apache.felix.scr.annotations-1.9.6
+# tar -cJvf org.apache.felix.scr.annotations-1.9.6.tar.gz org.apache.felix.annotations-1.9.6
+Source0:	%{bundle}-%{version}.tar.gz	
+
+BuildArch:      noarch
+
+BuildRequires:	javapackages-tools
+BuildRequires:  maven-local
+BuildRequires:  java-devel >= 1:1.8.0
+
+BuildRequires:  mvn(org.apache.felix:felix-parent:pom:) 
+BuildRequires:  mvn(org.apache.felix:org.apache.felix.scr.generator)
+
+
+Requires:       java-headless >= 1:1.8.0
+
+%description
+Apache Felix' Service Component Runtime
+
+%package javadoc
+Summary:        Javadoc for %{name}
+
+%description javadoc
+This package contains javadoc for %{name}.
+
+%prep
+%setup -q -n %{bundle}-%{version}
+
+%build
+%mvn_file :%{bundle} %{project}/%{bundle}
+%mvn_build -f --
+
+%install
+%mvn_install
+
+%files -f .mfiles
+
+%files javadoc -f .mfiles-javadoc
+
+%changelog
+* Fri May 22 2015 Jie Kang <jkang@redhat.com>
+- Initial package
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/rpmbuild/SPECS/felix-scr-generator.spec	Wed Jun 03 09:59:33 2015 -0400
@@ -0,0 +1,67 @@
+%global project   felix
+%global bundle    org.apache.felix.scr.generator
+Name:          felix-scr-generator
+Version:       1.12.0
+Release:       2%{?dist}
+Summary:       Descriptor Generator Implementation
+License:       ASL 2.0
+URL:           http://felix.apache.org/
+
+# For building from source tarball
+#Source0:        http://www.apache.org/dist/felix/%{name}-%{version}-source-release.tar.gz
+
+# For building from version control
+# The source for this package was built from upstream's vcs. Use the following
+# commands to generate the tarball:
+# svn checkout http://svn.apache.org/repos/asf/felix/releases/org.apache.felix.scr.generator-1.12.0
+# tar -cJvf org.apache.felix.scr.generator-1.12.0.tar.gz org.apache.felix.scr.generator-1.12.0
+Source0:       %{bundle}-%{version}.tar.gz
+
+BuildRequires: mvn(org.osgi:org.osgi.compendium)
+BuildRequires: mvn(org.osgi:org.osgi.core)
+BuildRequires: mvn(org.ow2.asm:asm-all)
+BuildRequires: mvn(org.apache.felix:felix-parent:pom:)
+
+# Test deps
+BuildRequires: mvn(commons-io:commons-io)
+BuildRequires: mvn(commons-lang:commons-lang)
+BuildRequires: mvn(junit:junit)
+BuildRequires: mvn(org.easymock:easymock)
+BuildRequires: mvn(org.mockito:mockito-all)
+# BuildRequires: mvn(org.apache.felix:org.apache.felix.scr.annotations)
+
+BuildRequires: maven-local
+BuildRequires: maven-remote-resources-plugin
+BuildRequires: maven-site-plugin
+
+BuildArch:     noarch
+
+%description
+Provides the implementation to generate Declarative Services and Metatype
+Service descriptors from Java 5 Annotations and/or JavaDoc tags.
+
+%package javadoc
+Summary:       Javadoc for %{name}
+
+%description javadoc
+This package contains javadoc for %{name}.
+
+%prep
+%setup -q -n %{bundle}-%{version}
+
+%mvn_file :%{bundle} %{project}/%{bundle}
+
+%build
+
+%mvn_build -f -- 
+
+%install
+%mvn_install
+
+%files -f .mfiles
+
+%files javadoc -f .mfiles-javadoc
+
+%changelog
+* Tue Jun 02 2015 Jie Kang <jkang@redhat.com>
+- Initial package
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/rpmbuild/SPECS/felix-scr.spec	Wed Jun 03 09:59:33 2015 -0400
@@ -0,0 +1,76 @@
+%global project felix
+%global bundle org.apache.felix.scr
+
+Name:           felix-scr
+Version:        1.8.2
+Release:        1%{?dist}
+Summary:        Apache Felix Service Component Runtime	
+License:	Apache License V2.0
+URL:		http://felix.apache.org/	
+
+# For building from source tarball
+#Source0:        http://www.apache.org/dist/felix/%{name}-%{version}-source-release.tar.gz
+
+# For building from version control
+# The source for this package was built from upstream's vcs. Use the following
+# commands to generate the tarball:
+# svn checkout http://svn.apache.org/repos/asf/felix/releases/org.apache.felix.scr-1.8.2
+# tar -cJvf org.apache.felix.scr-1.8.2.tar.gz org.apache.felix.scr-1.8.2
+Source0:	%{bundle}-%{version}.tar.gz	
+
+Patch0:         felix-scr-fix.patch
+
+BuildArch:      noarch
+
+BuildRequires:	javapackages-tools
+BuildRequires:  maven-local
+BuildRequires:  java-devel >= 1:1.8.0
+
+BuildRequires: mvn(net.sf.kxml:kxml2)
+BuildRequires: mvn(org.apache.felix:felix-parent:pom:)
+BuildRequires: mvn(org.apache.felix:org.apache.felix.framework)
+BuildRequires: mvn(org.apache.felix:org.apache.felix.gogo.runtime)
+BuildRequires: mvn(org.apache.felix:org.apache.felix.shell)
+BuildRequires: mvn(org.apache.felix:org.apache.felix.utils)
+BuildRequires: mvn(org.apache.felix:maven-bundle-plugin)
+BuildRequires: mvn(org.apache.maven.plugins:maven-failsafe-plugin)
+BuildRequires: mvn(org.osgi:org.osgi.compendium)
+BuildRequires: mvn(org.osgi:org.osgi.core)
+
+
+Requires:       java-headless >= 1:1.8.0
+
+%description
+Apache Felix' Service Component Runtime
+
+%package javadoc
+Summary:       Javadoc for %{name}
+
+%description javadoc
+This package contains javadoc for %{name}.
+
+
+%prep
+%setup -q -n %{bundle}-%{version}
+%patch0
+%pom_remove_plugin :animal-sniffer-maven-plugin
+%pom_xpath_remove "pom:project/pom:dependencies/pom:dependency[pom:scope='test']"
+
+%pom_remove_dep org.ops4j.base:
+%pom_remove_dep org.codehaus.mojo:animal-sniffer-annotations
+
+%mvn_file :%{name} %{project}/%{name}
+
+%build
+%mvn_build -f
+
+%install
+%mvn_install
+
+%files -f .mfiles
+
+%files javadoc -f .mfiles-javadoc
+
+%changelog
+* Fri May 22 2015 Jie Kang <jkang@redhat.com>
+- Initial package
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/rpmbuild/SPECS/felix-utils.spec	Wed Jun 03 09:59:33 2015 -0400
@@ -0,0 +1,110 @@
+%global bundle org.apache.felix.utils
+
+Name:             felix-utils
+Version:          1.6.0
+Release:          1%{?dist}
+Summary:          Utility classes for OSGi
+License:          ASL 2.0
+URL:              http://felix.apache.org
+Source0:          http://repo1.maven.org/maven2/org/apache/felix/%{bundle}/%{version}/%{bundle}-%{version}-source-release.tar.gz
+
+BuildArch:        noarch
+
+BuildRequires:    maven-local
+BuildRequires:    mvn(org.apache.felix:felix-parent:pom:)
+BuildRequires:    mvn(org.osgi:org.osgi.compendium)
+BuildRequires:    mvn(org.osgi:org.osgi.core)
+BuildRequires:    mvn(org.mockito:mockito-core)
+
+%description
+Utility classes for OSGi
+
+%package javadoc
+Summary:          API documentation for %{name}
+
+%description javadoc
+This package contains the API documentation for %{name}.
+
+%prep
+%setup -q -n %{bundle}-%{version}
+
+# Remove compiler plugin so default target is used instead of 1.5
+%pom_remove_plugin :maven-compiler-plugin
+# Remove rat plugin that is not in Fedora
+%pom_remove_plugin org.codehaus.mojo:rat-maven-plugin
+
+%mvn_file :%{bundle} "felix/%{bundle}"
+
+%build
+%mvn_build
+
+%install
+%mvn_install
+
+%files -f .mfiles
+%doc LICENSE NOTICE DEPENDENCIES
+
+%files javadoc -f .mfiles-javadoc
+%doc LICENSE NOTICE
+
+%changelog
+* Tue Jan 27 2015 Michael Simacek <msimacek@redhat.com> - 1.6.0-1
+- Update to upstream version 1.6.0
+
+* Tue Jan 27 2015 Mat Booth <mat.booth@redhat.com> - 1.4.0-1
+- Update to upstream 1.4.0 release
+- Re-enable tests
+
+* Mon Aug  4 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.2.0-8
+- Add build-requires on mockito
+
+* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.0-7
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
+
+* Fri May 30 2014 Michal Srb <msrb@redhat.com> - 1.2.0-6
+- Update BR
+
+* Mon May 26 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.2.0-5
+- Remove BuildRequires on maven-surefire-provider-junit4
+
+* Tue Mar 04 2014 Stanislav Ochotnicky <sochotnicky@redhat.com> - 1.2.0-4
+- Use Requires: java-headless rebuild (#1067528)
+
+* Mon Aug 05 2013 Mat Booth <fedora@matbooth.co.uk> - 1.2.0-3
+- Update for latest guidelines
+
+* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.0-2
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
+
+* Wed Apr 17 2013 Mat Booth <fedora@matbooth.co.uk> - 1.2.0-1
+- Update to latest upstream version rhbz #892553.
+- Drop patch, use preferred %%pom_* macros instead.
+
+* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.0-9
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
+
+* Wed Feb 06 2013 Java SIG <java-devel@lists.fedoraproject.org> - 1.1.0-8
+- Update for https://fedoraproject.org/wiki/Fedora_19_Maven_Rebuild
+- Replace maven BuildRequires with maven-local
+
+* Thu Jan 03 2013 Jaromir Capik <jcapik@redhat.com> - 1.1.0-7
+- Changing target from jsr14 to 1.5 (#842593)
+
+* Tue Sep  4 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.1.0-6
+- Install NOTICE with javadoc pakcage
+
+* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.0-5
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
+
+* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.0-4
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
+
+* Thu Oct 13 2011 Jaromir Capik <jcapik@redhat.com> - 1.1.0-3
+- osgi.org groupId patch removed (fixed in felix-osgi-* packages)
+
+* Thu Sep 08 2011 Jaromir Capik <jcapik@redhat.com> - 1.1.0-2
+- Moved to felix subdir
+- Minor spec file changes
+
+* Wed Jul 13 2011 Jaromir Capik <jcapik@redhat.com> - 1.1.0-1
+- Initial version
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/rpmbuild/SPECS/maven-scr-plugin.spec	Wed Jun 03 09:59:33 2015 -0400
@@ -0,0 +1,59 @@
+Name:           maven-scr-plugin
+Version:        1.20.0
+Release:        1%{?dist}
+Summary:        Apache Felix Maven SCR Plugin	
+License:        Apache License V2.0
+URL:	        http://felix.apache.org/	
+BuildArch:      noarch
+
+# For building from version control
+# The source for this package was built from upstream's vcs. Use the following
+# commands to generate the tarball:
+# svn checkout http://svn.apache.org/repos/asf/felix/releases/maven-scr-plugin-1.20.0/
+# tar -cJvf maven-scr-plugin-1.20.0.tar.gz maven-scr-plugin-1.20.0
+Source0:        %{name}-%{version}.tar.gz	
+
+BuildRequires:	javapackages-tools
+BuildRequires:  maven-local
+
+BuildRequires:  mvn(org.apache.felix:felix-parent:pom:)
+BuildRequires:  mvn(org.apache.felix:org.apache.felix.scr.generator) = 1.12.0 
+BuildRequires:  mvn(org.apache.maven:maven-archiver)
+BuildRequires:  mvn(org.apache.maven:maven-plugin-api)
+BuildRequires:  mvn(org.sonatype.plexus:plexus-build-api)
+
+BuildRequires:  mvn(org.mockito:mockito-all)
+
+Requires:       objectweb-asm
+Requires:       felix-osgi-core
+Requires:       felix-osgi-compendium
+
+%description
+Apache Felix' Service Component Runtime
+
+%package javadoc
+Summary:       Javadoc for %{name}
+
+%description javadoc
+This package contains javadoc for %{name}.
+
+%prep
+%setup -q
+
+%pom_remove_plugin :maven-invoker-plugin
+
+%mvn_file : %{name}
+
+%build
+%mvn_build -f
+
+%install
+%mvn_install
+
+%files -f .mfiles
+
+%files javadoc -f .mfiles-javadoc
+
+%changelog
+* Mon May 25 2015 Jie Kang <jkang@redhat.com>
+- Initial package
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/rpmbuild/SPECS/osgi-annotation.spec	Wed Jun 03 09:59:33 2015 -0400
@@ -0,0 +1,72 @@
+Name:    osgi-annotation
+Version: 6.0.0
+Release: 1%{?dist}
+Summary: Annotations for use in compiling OSGi bundles
+
+License: ASL 2.0
+URL:     http://www.osgi.org/
+# Upstream project is behind an account registration system with no anonymous
+# read access, so we download the source from maven central instead
+Source0: http://repo1.maven.org/maven2/org/osgi/osgi.annotation/%{version}/osgi.annotation-%{version}-sources.jar
+Source1: http://repo1.maven.org/maven2/org/osgi/osgi.annotation/%{version}/osgi.annotation-%{version}.pom
+
+BuildArch:     noarch
+
+BuildRequires: maven-local
+
+%description
+Annotations for use in compiling OSGi bundles. This package is not normally
+needed at run-time.
+
+%package javadoc
+Summary: API documentation for %{name}
+
+%description javadoc
+This package contains the API documentation for %{name}.
+
+%prep
+%setup -c -q
+
+mkdir -p src/main/resources && mv about.html src/main/resources
+mkdir -p src/main/java && mv org src/main/java
+cp -p %{SOURCE1} pom.xml
+
+# Ensure OSGi metadata is generated
+%pom_xpath_inject pom:project "
+  <packaging>bundle</packaging>
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.felix</groupId>
+        <artifactId>maven-bundle-plugin</artifactId>
+        <extensions>true</extensions>
+        <configuration>
+          <instructions>
+            <Bundle-Name>\${project.artifactId}</Bundle-Name>
+            <Bundle-SymbolicName>\${project.artifactId}</Bundle-SymbolicName>
+          </instructions>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>"
+
+# Known by two names in maven central, so add an alias for the older name
+%mvn_alias org.osgi:osgi.annotation org.osgi:org.osgi.annotation
+
+%build
+%mvn_build
+
+%install
+%mvn_install
+
+%files -f .mfiles
+%doc LICENSE
+%dir %{_javadir}/osgi-annotation
+%dir %{_mavenpomdir}/osgi-annotation
+
+%files javadoc -f .mfiles-javadoc
+%doc LICENSE
+
+%changelog
+* Mon Jan 26 2015 Mat Booth <mat.booth@redhat.com> - 6.0.0-1
+- Initial package
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/rpmbuild/SPECS/thermostat.spec	Wed Jun 03 09:59:33 2015 -0400
@@ -0,0 +1,1178 @@
+# Thermostat version
+%global major        1
+%global minor        99
+%global patchlevel   2
+# Thermostat requires exact versions for bundle dependencies.
+# We use those versions to pass to the maven build in order for
+# it to set it in relevant files.
+
+# Real OSGi Bundle-Version is 3.6.6.Final
+%global netty_bundle_version       3.6.6
+%global jcommon_bundle_version     1.0.23
+%global jfreechart_bundle_version  1.0.19
+# apache-commons-beanutils
+%global beanutils_bundle_version   1.9.2
+# apache-commons-codec
+%global codec_bundle_version       1.9.0
+# apache-commons-collections
+%global collections_bundle_version 3.2.1
+# apache-commons-logging
+%global logging_bundle_version     1.1.3
+# Real OSGi Bundle-Version is 2.11.3.RELEASE
+%global mongo_bundle_version       2.11.3
+%global hc_core_bundle_version     4.3.2
+%global hc_client_bundle_version   4.3.5
+%global gson_bundle_version        2.2.4
+# Declarative Services
+%global scr_version                1.8.2
+%global scr_annotations_version    1.9.6
+%global maven_scr_version          1.20.0
+# Flag set to 1 if it's an SCL build. 0 otherwise.
+%global is_scl_build %( test -n "$(rpm --eval '%{?scl}')" && echo 1 || echo 0)
+
+# Base path to the JDK which will be used in boot scripts
+%global jdk_base /etc/alternatives/java_sdk_openjdk
+
+%{?scl:%scl_package thermostat}
+%{!?scl:%global pkg_name %{name}}
+
+# Global directory definitions
+%global system_datadir %{_localstatedir}/lib/%{pkg_name}
+%global system_cachedir %{_localstatedir}/cache/%{pkg_name}
+%global system_logdir %{_localstatedir}/log/%{pkg_name}
+%global system_statedir %{_localstatedir}/run/%{pkg_name}
+# _root_<foo> don't seem to be defined in non-SCL context.
+# Define some vars we use instead in order for the build to work
+# for SCL/non-SCL contexts.
+%if %{is_scl_build}
+  %global system_confdir %{_root_sysconfdir}
+  %global system_root_datadir %{_root_datadir}
+  %global system_tmpfilesdir %{_root_exec_prefix}/lib/tmpfiles.d
+%else
+  %global system_confdir %{_sysconfdir}
+  %global system_root_datadir %{_datadir}
+  %global system_tmpfilesdir %{_tmpfilesdir}
+%endif
+# system java dir definition (non-scl)
+%global system_javadir %{system_root_datadir}/java
+%global scl_javadir %{_javadir}
+
+# THERMOSTAT_HOME and USER_THERMOSTAT_HOME variables. Note that
+# we use USER_THERMOSTAT_HOME only for systemd related setup.
+%global thermostat_home %{_datarootdir}/%{pkg_name}
+%if %{is_scl_build}
+  %global user_thermostat_home %{_scl_root}
+%else
+  # Prefix is "/" for non-scl
+  %global user_thermostat_home /
+%endif
+
+# thermostat-webapp specific variables
+%if %{is_scl_build}
+  %global thermostat_catalina_base %{_datarootdir}/tomcat
+%else
+  %global thermostat_catalina_base %{_localstatedir}/lib/tomcats/%{pkg_name}
+%endif
+# The port tomcat will be listening on
+%global thermostat_catalina_port 8999
+
+# Uncomment to build from snapshot out of hg.  See also Release and Source0
+#%%global hgrev b7c6db90e034
+
+Name:       %{?scl_prefix}thermostat
+Version:    %{major}.%{minor}.%{patchlevel}
+# If building from snapshot out of hg, uncomment and adjust below value as appropriate
+#Release:    0.1.20131122hg%{hgrev}%{?dist}
+Release:    9%{?dist}
+Summary:    A monitoring and serviceability tool for OpenJDK
+License:    GPLv2+ with exceptions and OFL
+URL:        http://icedtea.classpath.org/thermostat/
+# This is the source URL to be used for released versions
+Source0:    %{pkg_name}-%{version}-SNAPSHOT.tar.gz
+# This is the source to be used for hg snapshot versions from HEAD
+#wget -O thermostat-%{hgrev}.tar.bz2 http://icedtea.classpath.org/hg/%{pkg_name}/archive/%{hgrev}.tar.bz2
+#Source0:    thermostat-%{hgrev}.tar.bz2
+# This is the source to be used for hg snapshot versions from a release branch
+#wget -O thermostat-%{major}.%{minor}-%{hgrev}.tar.bz2 http://icedtea.classpath.org/hg/release/%{pkg_name}-%{major}.${minor}/archive/%{hgrev}.tar.bz2
+#Source0:    thermostat-%{major}.%{minor}-%{hgrev}.tar.bz2
+# This is _NOT_ suitable for upstream at this point.
+# It's very Fedora specific.
+Source1:    thermostat-sysconfig
+Source2:    thermostat_icon_64px.svg
+# SCL only sources
+Source3:    scl-thermostat-tomcat-service-sysconfig
+Source4:    thermostat-local
+# This is _NOT_ suitable for upstream at this point.
+# jfreechart isn't a bundle upstream. Also some httpclient* related bundles
+# include transitive deps upstream, which isn't the case in Fedora (i.e. is
+# properly done in Fedora)
+Patch0:     fix_bundle_loading-new.patch
+# Patch proposed upstream, but was denied.
+# See http://icedtea.classpath.org/pipermail/thermostat/2013-October/008602.html
+# For now _NOT_ suitable for upstream until felix ships an API only package which
+# is 4.3 OSGi spec.
+Patch1:     osgi_spec_fixes.patch
+# This is _NOT_ suitable for upstream at this point.
+# Adds an CLI option to the Thermostat main class so that it ignores
+# bundle symbolic names and versions it has in the config files.
+# The config files are set in stone at build time and updates of
+# transitive deps (which we can't control) might break thermostat.
+# We rely on RPM's dep solving mechanism instead.
+# See: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1591
+Patch2:     ignore_bundle_versions.patch
+
+Patch3:     remove-system-scope.patch
+
+# Play nice with mongodb 2.6
+# FIXME: Propose a variant of this upstream
+#Patch3:     mongodb26_setup_changes.patch
+# Allow 'thermostat web-storage-service' to read configs from
+# ~/.thermostat, by using a custom jaas config.
+Patch4:     webstorage_service_custom_jaas.patch
+Patch5:     web_storage_endpoint_fix.patch
+
+# Self-BR in order for xmvn-subst to work for symlinking
+# thermostat deps.
+#BuildRequires: thermostat-webapp = %{version}
+# BRs for core thermostat
+BuildRequires: java-devel >= 1:1.8.0
+BuildRequires: javapackages-tools
+BuildRequires: maven-local
+BuildRequires: maven-dependency-plugin
+BuildRequires: maven-surefire-plugin
+BuildRequires: maven-war-plugin
+BuildRequires: maven-clean-plugin
+BuildRequires: maven-assembly-plugin
+BuildRequires: maven-plugin-bundle
+BuildRequires: maven-javadoc-plugin
+BuildRequires: libgnome-keyring-devel
+# laf-utils JNI need pkconfig files for gtk2+
+BuildRequires: gtk2-devel
+BuildRequires: mvn(org.apache.felix:org.apache.felix.framework)
+BuildRequires: mvn(org.fusesource:fusesource-pom:pom:)
+BuildRequires: mvn(org.apache.commons:commons-cli)
+# jline 2.10 is known to work
+BuildRequires: mvn(jline:jline) >= 2.10
+BuildRequires: mvn(org.fusesource.jansi:jansi)
+# Lucene 4.7.0-2 has the BREE fix which made thermostat
+# to not boot at all.
+#
+# lucene a bootstrap bundle, eh? nonesense!
+# See: http://icedtea.classpath.org/hg/thermostat/rev/9f495243fcd7
+BuildRequires: mvn(org.apache.lucene:lucene-core) >= 4.7.0
+BuildRequires: mvn(org.apache.lucene:lucene-analyzers) >= 4.7.0
+BuildRequires: mvn(com.google.code.gson:gson)
+BuildRequires: mvn(org.jfree:jfreechart)
+BuildRequires: mvn(org.jfree:jcommon)
+BuildRequires: mvn(org.apache.commons:commons-beanutils)
+BuildRequires: mvn(org.mongodb:mongo-java-driver)
+# Change to netty 4 once RHBZ#1053619 is
+# resolved.
+# The version number in mvn() means it's a compat package.
+BuildRequires: mvn(io.netty:netty:%{netty_bundle_version})
+
+# BRs for webapp sub-package
+BuildRequires: tomcat
+BuildRequires: mvn(javax.servlet:servlet-api) >= 2.5
+BuildRequires: mvn(org.apache.commons:commons-fileupload)
+
+# thermostat web-storage-service BRs
+BuildRequires: mvn(org.eclipse.jetty:jetty-server)
+BuildRequires: mvn(org.eclipse.jetty:jetty-jaas)
+BuildRequires: mvn(org.eclipse.jetty:jetty-webapp)
+BuildRequires: mvn(org.eclipse.jetty.toolchain:jetty-schemas)
+
+###################################################
+# The following BRs are specified via osgi's
+# symbolic name. This is to ensure exact versions
+# as specified in thermostat's bundle list has
+# a chance of working at runtime.
+###################################################
+# 1.0.14-7 has OSGi metadata and itext dep fix
+BuildRequires: osgi(org.jfree.jfreechart) = %{jfreechart_bundle_version}
+# 1.0.17-4 has OSGi metadata
+BuildRequires: osgi(org.jfree.jcommon) = %{jcommon_bundle_version}
+BuildRequires: osgi(org.apache.commons.logging) = %{logging_bundle_version}
+BuildRequires: osgi(org.apache.commons.beanutils) = %{beanutils_bundle_version}
+BuildRequires: osgi(org.apache.commons.codec) = %{codec_bundle_version}
+BuildRequires: osgi(org.mongodb.mongo-java-driver) = %{mongo_bundle_version}
+BuildRequires: osgi(org.jboss.netty) = %{netty_bundle_version}
+BuildRequires: osgi(com.google.gson) = %{gson_bundle_version}
+BuildRequires: osgi(org.apache.httpcomponents.httpcore) = %{hc_core_bundle_version}
+# httpmime comes from httpcomponents-client just like httpclient itself
+BuildRequires: osgi(org.apache.httpcomponents.httpclient) = %{hc_client_bundle_version}
+BuildRequires: osgi(org.apache.httpcomponents.httpmime) = %{hc_client_bundle_version}
+
+#Declarative Services
+BuildRequires: osgi(org.apache.felix.scr) = %{scr_version}
+BuildRequires: mvn(org.apache.felix:org.apache.felix.scr.annotations) = %{scr_annotations_version}
+BuildRequires: mvn(org.apache.felix:maven-scr-plugin) = %{maven_scr_version}
+
+Requires: java >= 1:1.8.0
+Requires: jpackage-utils
+Requires: java-devel >= 1:1.8.0
+# Only require mongodb-server on arches where it's available
+%ifarch %{arm} %{ix86} x86_64
+Requires: mongodb-server
+# Fedora's thermostat-setup uses mongo directly
+Requires: mongodb
+%endif
+Requires: libgnome-keyring
+Requires(post): systemd
+Requires(preun): systemd
+Requires(postun): systemd
+###################################################
+# The following Rs are specified via osgi's
+# symbolic name. This is to ensure exact versions
+# as specified in thermostat's bundle list has
+# a chance of working at runtime.
+###################################################
+Requires: osgi(org.jfree.jfreechart) >= %{jfreechart_bundle_version}
+Requires: osgi(org.jfree.jcommon) >= %{jcommon_bundle_version}
+Requires: osgi(org.apache.commons.logging) >= %{logging_bundle_version}
+Requires: osgi(org.apache.commons.beanutils) >= %{beanutils_bundle_version}
+Requires: osgi(org.apache.commons.codec) >= %{codec_bundle_version}
+Requires: osgi(org.mongodb.mongo-java-driver) >= %{mongo_bundle_version}
+Requires: osgi(org.jboss.netty) = %{netty_bundle_version}
+Requires: osgi(com.google.gson) >= %{gson_bundle_version}
+Requires: osgi(org.apache.httpcomponents.httpcore) >= %{hc_core_bundle_version}
+# httpmime comes from httpcomponents-client just like httpclient itself
+Requires: osgi(org.apache.httpcomponents.httpclient) >= %{hc_client_bundle_version}
+Requires: osgi(org.apache.httpcomponents.httpmime) >= %{hc_client_bundle_version}
+
+#Declarative Services
+Requires: osgi(org.apache.felix.scr) = %{scr_version}
+Requires: mvn(org.apache.felix:org.apache.felix.scr.annotations) = %{scr_annotations_version}
+
+# This module has been removed to fix CVE-2014-8120
+Obsoletes: %{?scl_prefix}mvn(com.redhat.thermostat:thermostat-agent-proxy-common) <= %{version}
+
+%{?scl:Requires: %scl_runtime}
+
+%description
+Thermostat is a monitoring and instrumentation tool for the Hotspot JVM,
+with support for monitoring multiple JVM instances. The system is made
+up of two processes: an Agent, which collects data, and a Client which
+allows users to visualize this data. These components communicate via
+a MongoDB-based storage layer. A pluggable agent and gui framework
+allows for collection and visualization of performance data beyond that
+which is included out of the box.
+
+%package javadoc
+Summary:    Javadocs for %{name}
+Group:      Documentation
+Requires:   jpackage-utils
+
+BuildArch:  noarch
+
+%description javadoc
+This package contains the API documentation for %{name}
+
+%package webapp
+Summary:    Web storage endpoint for Thermostat
+BuildArch:  noarch
+# Not sure if we need this, but better be safe than sorry.
+# This version will allow custom catalina-base/systemd stuff as
+# we do it.
+Requires:   tomcat >= 7.0.42-3
+Requires:   %{name} = %{version}-%{release}
+
+%description webapp
+This package contains the exploded web archive. This web application
+contains the server-side parts for deploying thermostat with improved
+security.
+
+%prep
+# When Source0 is released version.
+%setup -q -n %{pkg_name}-%{version}-SNAPSHOT
+# When Source0 is a snapshot from HEAD.
+#%%setup -q -n %%{pkg_name}-%%{hgrev}
+# When Source 0 is a snapshot from a release branch.
+#%%setup -q -n %%{pkg_name}-%%{major}-%%{minor}-%%{hgrev}
+%patch0 -p1
+%patch1 -p1
+%patch2 -p1
+%patch3 -p1
+%patch4 -p1
+%patch5 -p1
+
+# Fix up artifact names which have different name upstream
+#  lucene
+%pom_remove_dep "org.apache.servicemix.bundles:org.apache.servicemix.bundles.lucene" vm-heap-analysis/common
+%pom_remove_dep "org.apache.servicemix.bundles:org.apache.servicemix.bundles.lucene" vm-heap-analysis/distribution
+%pom_remove_dep "org.apache.servicemix.bundles:org.apache.servicemix.bundles.lucene-analyzers-common" vm-heap-analysis/common
+%pom_remove_dep "org.apache.servicemix.bundles:org.apache.servicemix.bundles.lucene-analyzers-common" vm-heap-analysis/distribution
+%pom_add_dep "org.apache.lucene:lucene-analyzers:4.7.0" vm-heap-analysis/common
+%pom_add_dep "org.apache.lucene:lucene-analyzers:4.7.0" vm-heap-analysis/distribution
+%pom_add_dep "org.apache.lucene:lucene-core:4.7.0" vm-heap-analysis/common
+%pom_add_dep "org.apache.lucene:lucene-core:4.7.0" vm-heap-analysis/distribution
+#  httpclient
+%pom_remove_dep org.apache.httpcomponents:httpclient-osgi web/client
+%pom_add_dep org.apache.httpcomponents:httpclient:4.4.0 web/client
+%pom_remove_dep org.apache.httpcomponents:httpclient-osgi client/command
+%pom_add_dep org.apache.httpcomponents:httpclient:4.4.0 client/command
+#  add httpmime dep. this is included in upstreams' strange jar
+%pom_add_dep org.apache.httpcomponents:httpmime:4.4.0 web/client
+#  httpcore
+%pom_remove_dep org.apache.httpcomponents:httpcore-osgi web/client
+%pom_add_dep org.apache.httpcomponents:httpcore:4.4.0 web/client
+# need jline 2.10 (otherwise this resolves to jline 1)
+%pom_xpath_remove "pom:properties/pom:jline.version"
+%pom_xpath_inject "pom:properties" "<jline.version>2.10</jline.version>"
+#  netty
+#%%pom_remove_dep org.jboss.netty:netty 
+%pom_remove_dep org.jboss.netty:netty common/command
+%pom_remove_dep org.jboss.netty:netty client/command
+%pom_remove_dep org.jboss.netty:netty agent/command
+%pom_add_dep io.netty:netty:%{netty_bundle_version} common/command
+%pom_add_dep io.netty:netty:%{netty_bundle_version} client/command
+%pom_add_dep io.netty:netty:%{netty_bundle_version} agent/command
+
+# Don't use maven-exec-plugin. We do things manually in order to avoid this
+# additional dep. It's used in agent/core/pom.xml and in keyring/pom.xml
+%pom_remove_plugin org.codehaus.mojo:exec-maven-plugin agent/core
+%pom_remove_plugin org.codehaus.mojo:exec-maven-plugin keyring
+%pom_remove_plugin org.codehaus.mojo:exec-maven-plugin laf-utils
+
+# Remove license plugin in main pom.xml
+%pom_remove_plugin com.mycila:license-maven-plugin
+
+# Remove javacoco-coverage plugin (in main pom.xml and web/war/pom.xml)
+%pom_remove_plugin org.jacoco:jacoco-maven-plugin
+%pom_remove_plugin org.jacoco:jacoco-maven-plugin web/war
+
+# Remove pmd plugin
+%pom_remove_plugin org.apache.maven.plugins:maven-pmd-plugin
+
+# Remove m2e's lifecyle plugin
+%pom_remove_plugin org.eclipse.m2e:lifecycle-mapping
+
+# Disable dev and test modules
+%pom_disable_module dev
+%pom_disable_module testutils storage
+%pom_disable_module test common
+%pom_disable_module integration-tests
+%pom_remove_dep com.redhat.thermostat:thermostat-storage-testutils vm-cpu/common
+%pom_remove_dep com.redhat.thermostat:thermostat-storage-testutils vm-profiler/common
+%pom_remove_dep com.redhat.thermostat:thermostat-storage-testutils thread/collector
+
+# Remove depencency on the web archive for web-storage-service we'll make deps
+# available manually
+%pom_remove_dep "com.redhat.thermostat:thermostat-web-war" web/endpoint-plugin/web-service
+
+# Skip automatic installation of zip artifacts. We only use it for our build
+# to assemble plug-ins.
+%mvn_package com.redhat.thermostat::zip: __noinstall
+# Skip automatic installation of the war module.
+# We install it manually. Without this "config" %mvn_build -f
+# fails. See RHBZ#963838
+%mvn_package com.redhat.thermostat:thermostat-web-war __noinstall
+# Don't install :thermostat-common-test, it's a test only dep which
+# aren't run during the build.
+%mvn_package com.redhat.thermostat:thermostat-common-test __noinstall
+
+# These are just upstream build helpers. Don't install them.
+%mvn_package com.redhat.thermostat:thermostat-distribution __noinstall
+%mvn_package com.redhat.thermostat:thermostat-assembly __noinstall
+# The automatic requires generator gets confused by build-deps. We have
+# to __noinstall it in order for mvn() requires generation to work.
+%mvn_package com.redhat.thermostat:thermostat-build-deps __noinstall
+
+# thermostat-web-server and thermostat-web-endpoint should be part of
+# the webapp sub-package
+%mvn_package com.redhat.thermostat:thermostat-web-server webapp
+%mvn_package "com.redhat.thermostat:thermostat-web-endpoint-plugin" webapp
+%mvn_package "com.redhat.thermostat:thermostat-web-endpoint:pom:" webapp
+%mvn_package "com.redhat.thermostat:thermostat-web-endpoint-distribution:pom:" webapp
+
+# copy the thermostat-local script into place. This is downstream only.
+cp %{SOURCE4} distribution/scripts
+
+%build
+export CFLAGS="$RPM_OPT_FLAGS" LDFLAGS="$RPM_LD_FLAGS"
+# Set JAVA_HOME. make uses this
+. /usr/share/java-utils/java-functions
+set_jvm
+export JAVA_HOME
+
+################## Build JNI bits ########################
+# JNI bits depend on NativeLibraryResolver so compile that
+# first and relevant Java classes with native methods
+# after.
+pushd annotations
+  mkdir -p target/classes
+  javac -d target/classes \
+           src/main/java/com/redhat/thermostat/annotations/Service.java
+popd
+pushd config
+  mkdir -p target/classes
+  javac -d target/classes \
+        -cp ../annotations/target/classes \
+           src/main/java/com/redhat/thermostat/shared/config/NativeLibraryResolver.java \
+           src/main/java/com/redhat/thermostat/shared/config/CommonPaths.java \
+           src/main/java/com/redhat/thermostat/shared/config/internal/CommonPathsImpl.java \
+           src/main/java/com/redhat/thermostat/shared/config/InvalidConfigurationException.java \
+           src/main/java/com/redhat/thermostat/shared/locale/Translate.java \
+           src/main/java/com/redhat/thermostat/shared/locale/LocalizedString.java \
+           src/main/java/com/redhat/thermostat/shared/locale/internal/LocaleResources.java
+popd
+pushd keyring
+  mkdir -p target/classes
+  javac -cp ../config/target/classes:../annotations/target/classes \
+        -d target/classes \
+           src/main/java/com/redhat/thermostat/utils/keyring/Keyring.java \
+           src/main/java/com/redhat/thermostat/utils/keyring/KeyringException.java \
+           src/main/java/com/redhat/thermostat/utils/keyring/impl/KeyringImpl.java
+  make all
+popd
+pushd agent/core
+  mkdir -p target/classes
+  javac -cp ../../config/target/classes:../../annotations/target/classes \
+        -d target/classes \
+         src/main/java/com/redhat/thermostat/agent/utils/hostname/HostName.java \
+         src/main/java/com/redhat/thermostat/agent/utils/username/UserNameUtil.java \
+         src/main/java/com/redhat/thermostat/agent/utils/username/UserNameLookupException.java \
+         src/main/java/com/redhat/thermostat/utils/username/internal/UserNameUtilImpl.java
+  make all
+popd
+pushd laf-utils
+  mkdir -p target/classes
+  javac -cp ../config/target/classes \
+        -d target/classes src/main/java/com/redhat/thermostat/internal/utils/laf/gtk/GTKThemeUtils.java
+  make all
+popd
+################## Build JNI bits (end) ##################
+
+# This is roughly equivalent to:
+#   mvn 
+#     -Dthermostat.home=%{_datarootdir}/%{pkg_name} \
+#    install javadoc:aggregate
+# Everything after '--' is passed to plain xmvn/mvn
+%mvn_build -f -- -Dthermostat.home=%{thermostat_home} \
+                 -Dthermostat.web.deploy.dir=$(pwd)/webstorage-webapp \
+                 -Dthermostat.system.user=thermostat \
+                 -Dthermostat.system.group=thermostat \
+                 -Dnetty.version=%{netty_bundle_version}.Final \
+                 -Dcommons-logging.version=%{logging_bundle_version} \
+                 -Dcommons-collections.version=%{collections_bundle_version} \
+                 -Dcommons-codec.osgi-version=%{codec_bundle_version} \
+                 -Dcommons-beanutils.version=%{beanutils_bundle_version} \
+                 -Dgson.version=%{gson_bundle_version} \
+                 -Dmongo-driver.osgi-version=%{mongo_bundle_version}.RELEASE \
+                 -Dhttpcomponents.core.version=%{hc_core_bundle_version} \
+                 -Dhttpcomponents.client.version=%{hc_client_bundle_version} \
+                 -Dhttpcomponents.mime.version=%{hc_client_bundle_version} \
+                 -Djcommon.osgi.version=%{jcommon_bundle_version} \
+                 -Djfreechart.osgi.version=%{jfreechart_bundle_version} \
+                 -Dlucene-core.bundle.symbolic-name=org.apache.lucene.core \
+                 -Dlucene-analysis.bundle.symbolic-name=org.apache.lucene.analysis \
+                 -Dosgi.compendium.bundle.symbolic-name=org.osgi.compendium \
+                 -Dosgi.compendium.osgi-version=4.1.0
+
+# Make path to java so that it keeps working after updates.
+# We require java >= 1.7.0
+sed -i 's|^JAVA=.*|JAVA="%{jdk_base}/bin/java"|' distribution/target/image/bin/thermostat
+sed -i 's|^JAVA=.*|JAVA="%{jdk_base}/bin/java"|' distribution/target/image/bin/thermostat-agent-proxy
+# Fix path to tools.jar
+sed -i 's|^TOOLS_JAR=.*|TOOLS_JAR="%{jdk_base}/lib/tools.jar"|' distribution/target/image/bin/thermostat
+sed -i 's|^TOOLS_JAR=.*|TOOLS_JAR="%{jdk_base}/lib/tools.jar"|' distribution/target/image/bin/thermostat-agent-proxy
+
+# Remove duplicate tools-SYSTEM.jar. The startup scripts add tools.jar
+# to the classpath for us
+pushd distribution/target
+find -name tools-SYSTEM.jar -delete
+popd
+
+%install
+#######################################################
+# Thermostat core
+#######################################################
+mkdir -p %{buildroot}%{_bindir}
+mkdir -p %{buildroot}%{_sysconfdir}/%{pkg_name}
+mkdir -p %{buildroot}%{system_confdir}/sysconfig
+mkdir -p %{buildroot}%{_datarootdir}/java/%{?scl_prefix}%{pkg_name}
+# JNI things live there
+mkdir -p %{buildroot}%{_libdir}/%{pkg_name}
+mkdir -p %{buildroot}%{_jnidir}
+# Systemd files live there
+mkdir -p %{buildroot}%{_unitdir}
+# Thermostat icon lives there
+mkdir -p %{buildroot}%{_datarootdir}/icons/hicolor/scalable/apps
+# Thermostat desktop lives there
+mkdir -p %{buildroot}%{_datarootdir}/applications
+
+# Dance the xmvn install limbo. This only makes sense if %mvn_build does NOT
+# have the '-i' switch.
+%mvn_install
+
+pushd distribution/target/image/libs
+# JNI jars need to be in %{_jnidir}, we symlink to
+# %{_libdir}/%{pkg_name} files. Files are moved to
+# %{_libdir}/%{pkg_name} next.
+for i in thermostat-keyring-*.jar \
+    thermostat-agent-core-*.jar \
+    thermostat-laf-utils-*.jar; do
+  ln -s %{_libdir}/%{pkg_name}/$i %{buildroot}%{_jnidir}/$i
+done
+# JNI files are in %{_libdir}
+mv thermostat-keyring-*.jar \
+   thermostat-agent-core-*.jar \
+   thermostat-laf-utils-*.jar \
+   %{buildroot}%{_libdir}/%{pkg_name}
+# Make native libs executable so that debuginfos get properly
+# generated
+chmod +x native/*.so
+mv native/* %{buildroot}%{_libdir}/%{pkg_name}
+popd
+
+# Install systemd unit files
+pushd distribution/target/packaging/systemd
+  sed -i 's/User=thermostat/User=root/g' thermostat-agent.service
+  sed -i 's/Group=thermostat/Group=root/g' thermostat-agent.service
+  # FIXME: install or not-to-install agent service running as root?
+  #        Currently: Don't install.
+  cp -a thermostat-storage.service %{buildroot}%{_unitdir}/
+popd
+
+# Move the thermostat desktop file to /usr/share/applications
+# This makes "thermostat gui" show up in gnome shell.
+pushd distribution/target/packaging/desktop
+sed -i 's#Exec=.*#Exec=%{thermostat_home}/bin/thermostat-local#g' %{pkg_name}.desktop
+cp %{pkg_name}.desktop %{buildroot}%{_datarootdir}/applications/%{pkg_name}.desktop
+# Install the SVG icon
+cp %{SOURCE2} %{buildroot}%{_datarootdir}/icons/hicolor/scalable/apps/%{pkg_name}.svg
+popd
+
+# Install tmpfiles.d config file for /var/run/%{pkg_name}
+pushd distribution/target/packaging/systemd
+mkdir -p %{buildroot}%{system_tmpfilesdir}
+install -m 0644 tmpfiles.d/%{pkg_name}.conf %{buildroot}%{system_tmpfilesdir}/%{pkg_name}.conf
+popd
+
+rm -rf distribution/target/image/bin/%{pkg_name}.orig
+# Remove developer setup things. They woudn't work anyway.
+rm distribution/target/image/bin/thermostat-devsetup
+rm distribution/target/image/etc/devsetup.input
+
+# For some reason webapp as produced by the build doesn't
+# include WEB-INF/web.xml. I wasn't able to convince maven-war-plugin
+# to NOT ignore that file.
+rm -rf distribution/target/image/webapp
+# Move everything else into $THERMOSTAT_HOME
+cp -a distribution/target/image %{buildroot}%{thermostat_home}
+
+# Replace jars with symlinks to installed libs
+pushd %{buildroot}%{thermostat_home}/libs
+  xmvn-subst .
+popd
+# Provide version-less symlinks so as for our bootstrap bundles
+# to work correctly
+pushd %{buildroot}%{thermostat_home}/libs
+  for i in $(find -type l -name '*.jar'); do
+    newFileName=$(echo $i | sed 's/-\([0-9]\+\.\)\+[0-9]\+\(-[a-zA-Z0-9]\+\)\?//')
+    if [ ! -e $newFileName ]; then
+      ln -s $i $newFileName
+    fi
+  done
+  # We have jline2.jar in properties files.
+  ln -s jline.jar jline2.jar
+popd
+# Do the same for thermostat plugin dirs
+pushd %{buildroot}%{thermostat_home}/plugins
+for plugin_name in $(ls); do
+  pushd $plugin_name
+    xmvn-subst .
+  popd
+done
+popd
+
+pushd %{buildroot}%{_libdir}/%{pkg_name}
+# symlink JNI jars
+for i in *.jar; do
+  ln -s %{_libdir}/%{pkg_name}/$i \
+        %{buildroot}%{thermostat_home}/libs/$i
+done
+# symlink shared libs
+for i in *.so; do
+  ln -s %{_libdir}/%{pkg_name}/$i \
+        %{buildroot}%{thermostat_home}/libs/native/$i
+done
+popd
+
+# symlink the tools jar coming from the JVM
+ln -s /usr/lib/jvm/java-openjdk/lib/tools.jar \
+    %{buildroot}%{thermostat_home}/libs/
+
+# Symlink the thermostat script(s) in /usr/bin
+ln -s %{_datarootdir}/%{pkg_name}/bin/thermostat \
+    %{buildroot}%{_bindir}/thermostat
+ln -s %{_datarootdir}/%{pkg_name}/bin/thermostat-setup \
+    %{buildroot}%{_bindir}/thermostat-setup
+
+# create required config directory
+mkdir -p %{buildroot}%{thermostat_home}/etc/plugins.d/
+# move config files to /etc and symlink stuff under $THERMOSTAT_HOME/etc to it
+mv %{buildroot}%{thermostat_home}/etc/* \
+   %{buildroot}%{_sysconfdir}/%{pkg_name}
+rmdir %{buildroot}%{thermostat_home}/etc
+ln -s %{_sysconfdir}/%{pkg_name}/ \
+          %{buildroot}%{thermostat_home}/etc
+
+# Install sysconfig file. This is so as to set various env vars
+# which controls how thermostat behaves. In the systemd case we
+# want thermostat to run as system user.
+sed 's#__thermostat_home__#%{thermostat_home}/#g' %{SOURCE1} > thermostat_sysconfig.env
+sed -i 's#__thermostat_user_home__#%{user_thermostat_home}#g' thermostat_sysconfig.env
+cp thermostat_sysconfig.env %{buildroot}%{system_confdir}/sysconfig/%{pkg_name}
+
+# Set up directory structure for running thermostat storage/
+# thermostat agend via systemd
+%{__install} -d -m 0775 %{buildroot}%{system_datadir}
+echo "setup-complete.stamp for thermostat-storage systemd service" > %{buildroot}%{system_datadir}/setup-complete.stamp
+%{__install} -d -m 0775 %{buildroot}%{system_cachedir}
+%{__install} -d -m 0775 %{buildroot}%{system_logdir}
+%{__install} -d -m 0775 %{buildroot}%{system_statedir}
+# Symlink storage/agent directories so that they can be run
+# as systemd services. The target directories will have
+# appropriate permissions for the thermostat user to allow
+# writing.
+ln -s %{system_datadir} %{buildroot}%{thermostat_home}/data
+ln -s %{system_statedir} %{buildroot}%{thermostat_home}/run
+ln -s %{system_logdir} %{buildroot}%{thermostat_home}/logs
+ln -s %{system_cachedir} %{buildroot}%{thermostat_home}/cache
+#######################################################
+# Thermostat web storage webapp
+#######################################################
+mkdir -p %{buildroot}%{thermostat_catalina_base}/webapps
+pushd webstorage-webapp
+# Fixup THERMOSTAT_HOME in web.xml
+ sed -i '/<param-name>THERMOSTAT_HOME<[/]param-name>/,/<param-value>.*<[/]param-value>/{ s$<param-value>.*</param-value>$<param-value>%{thermostat_home}</param-value>$ }' \
+ WEB-INF/web.xml
+popd
+cp -r webstorage-webapp %{buildroot}%{thermostat_catalina_base}/webapps/%{pkg_name}
+# Provide a link to webapp in THERMOSTAT_HOME
+ln -s %{thermostat_catalina_base}/webapps/%{pkg_name} %{buildroot}%{thermostat_home}/webapp
+ 
+# Replace jars with symlinks
+pushd %{buildroot}%{thermostat_catalina_base}/webapps/%{pkg_name}/WEB-INF/lib
+  xmvn-subst .
+popd
+
+# We use a custom CATALINA_BASE with core tomcat directories
+# symlinked. This allows us to deploy the thermostat webapp
+# nicely configured without any configuration required prior
+# starting tomcat via systemd.
+sed 's#__jaas_config__#%{_sysconfdir}/%{pkg_name}/%{pkg_name}_jaas.conf#g' %{SOURCE3} > tomcat_service_thermostat.txt
+cp tomcat_service_thermostat.txt %{buildroot}%{system_confdir}/sysconfig/tomcat@%{pkg_name}
+# Create a symlinked CATALINA_BASE in order to make tomcat deploy
+# the scl-ized tomcat web-app. We use our own copy of conf/server.xml in order
+# to not port-conflict with system tomcat. See RHBZ#1054396
+pushd %{buildroot}/%{thermostat_catalina_base}
+  for i in lib logs work temp; do
+    ln -s %{system_root_datadir}/tomcat/$i $i
+  done
+  mkdir conf
+popd
+# Symlink everything other than server.xml
+pushd %{system_root_datadir}/tomcat/conf
+  for i in *; do
+    ln -s %{system_root_datadir}/tomcat/conf/$i %{buildroot}/%{thermostat_catalina_base}/conf/$i
+  done
+  rm %{buildroot}/%{thermostat_catalina_base}/conf/server.xml
+  cp -p server.xml %{buildroot}/%{thermostat_catalina_base}/conf/server.xml
+popd
+pushd %{buildroot}/%{thermostat_catalina_base}/conf
+  # Fix the connector port, use a different access log file name
+  sed -i -e 's/<Connector port="8080"/<Connector port="%{thermostat_catalina_port}"/g' \
+         -e 's/prefix="localhost_access_log."/prefix="localhost_thermostat_access_log."/g' server.xml
+popd
+
+%check
+# Perform some sanity checks on paths to JAVA/TOOLS_JAR
+# in important boot scripts. See RHBZ#1052992 and
+# RHBZ#1053123
+TOOLS_JAR="$(grep 'TOOLS_JAR=' %{buildroot}/%{thermostat_home}/bin/thermostat | cut -d= -f2 | cut -d\" -f2)"
+test "${TOOLS_JAR}" = "%{jdk_base}/lib/tools.jar"
+TOOLS_JAR="$(grep 'TOOLS_JAR=' %{buildroot}/%{thermostat_home}/bin/thermostat-agent-proxy | cut -d= -f2 | cut -d\" -f2)"
+test "${TOOLS_JAR}" = "%{jdk_base}/lib/tools.jar"
+JAVA="$(grep 'JAVA=' %{buildroot}/%{thermostat_home}/bin/thermostat | cut -d= -f2 | cut -d\" -f2)"
+test "${JAVA}" = "%{jdk_base}/bin/java"
+JAVA="$(grep 'JAVA=' %{buildroot}/%{thermostat_home}/bin/thermostat-agent-proxy | cut -d= -f2 | cut -d\" -f2)"
+test "${JAVA}" = "%{jdk_base}/bin/java"
+
+%pre
+# add the thermostat user and group
+%{_sbindir}/groupadd -r thermostat 2>/dev/null || :
+%{_sbindir}/useradd -c "Thermostat system user" -g thermostat \
+    -s /sbin/nologin -r -d %{thermostat_home} thermostat 2>/dev/null || :
+
+%post
+# Install but don't activate
+%systemd_post %{pkg_name}-storage.service
+# Required for icon cache (i.e. Thermostat icon)
+/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
+
+%preun
+%systemd_preun %{pkg_name}-storage.service
+
+%postun
+# Required for icon cache (i.e. Thermostat icon)
+if [ $1 -eq 0 ] ; then
+    /bin/touch --no-create %{_datadir}/icons/hicolor &> /dev/null
+    /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
+fi
+%systemd_postun %{pkg_name}-storage.service
+
+%posttrans
+# Required for icon cache (i.e. Thermostat icon)
+/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
+
+# The 1.0.2-2 update changed the conf symlink in CATALINA_BASE with
+# a directory. This is necessary in order for the update using rpm
+# to work. YUM based updates are still broken with this. See:
+# RHBZ#447156 and RHBZ#975909
+%pretrans webapp -p <lua>
+src = "%{thermostat_catalina_base}/conf"
+if posix.stat(src, "type") == "link" then
+  os.remove(src)
+  posix.mkdir(src)
+end
+
+%files -f .mfiles
+%doc LICENSE
+%license COPYING
+%license OFL.txt
+%doc README
+%doc README.api
+# Own appropriate files in /etc/ part of them belong to the
+# webapp sub-package
+%config(noreplace) %dir %{_sysconfdir}/%{pkg_name}
+# This file is only used by the systemd service running agent.
+# Only root should be able to read/write to it.
+%attr(0600,root,root) %config(noreplace) %{_sysconfdir}/%{pkg_name}/agent.auth
+%attr(0600,root,root) %config(noreplace) %{_sysconfdir}/%{pkg_name}/web.auth
+%config(noreplace) %{_sysconfdir}/%{pkg_name}/agent.properties
+%config(noreplace) %{_sysconfdir}/%{pkg_name}/db.properties
+%config(noreplace) %{_sysconfdir}/%{pkg_name}/logging.properties
+%config(noreplace) %{_sysconfdir}/%{pkg_name}/plugins.d
+%config(noreplace) %{_sysconfdir}/%{pkg_name}/ssl.properties
+%config %{_sysconfdir}/%{pkg_name}/commands
+%config %{_sysconfdir}/%{pkg_name}/osgi-export.properties
+# Required for systemd services
+%config(noreplace) %{system_confdir}/sysconfig/%{pkg_name}
+# thermostat.desktop lives in /usr/share/applications
+%{_datadir}/applications/%{pkg_name}.desktop
+# thermostat icon
+%{_datadir}/icons/hicolor/scalable/apps/%{pkg_name}.svg
+%{_datadir}/%{pkg_name}/etc
+%{_datadir}/%{pkg_name}/bin
+%{_datadir}/%{pkg_name}/libs
+%{_datadir}/%{pkg_name}/plugins/host-cpu
+%{_datadir}/%{pkg_name}/plugins/host-memory
+%{_datadir}/%{pkg_name}/plugins/host-overview
+%{_datadir}/%{pkg_name}/plugins/killvm
+%{_datadir}/%{pkg_name}/plugins/notes
+%{_datadir}/%{pkg_name}/plugins/numa
+%{_datadir}/%{pkg_name}/plugins/storage-profile
+%{_datadir}/%{pkg_name}/plugins/thread
+%{_datadir}/%{pkg_name}/plugins/validate
+%{_datadir}/%{pkg_name}/plugins/vm-classstat
+%{_datadir}/%{pkg_name}/plugins/vm-cpu
+%{_datadir}/%{pkg_name}/plugins/vm-gc
+%{_datadir}/%{pkg_name}/plugins/vm-heap-analysis
+%{_datadir}/%{pkg_name}/plugins/vm-jmx
+%{_datadir}/%{pkg_name}/plugins/vm-memory
+%{_datadir}/%{pkg_name}/plugins/vm-overview
+%{_datadir}/%{pkg_name}/plugins/vm-profiler
+%{_datadir}/%{pkg_name}/plugins/vm-io
+%{_datadir}/%{pkg_name}/cache
+%{_datadir}/%{pkg_name}/data
+%{_datadir}/%{pkg_name}/logs
+%{_datadir}/%{pkg_name}/run
+%{_libdir}/%{pkg_name}
+%{_jnidir}/thermostat-*.jar
+%{_bindir}/thermostat
+%{_bindir}/thermostat-setup
+%{_unitdir}/%{pkg_name}-storage.service
+%{system_tmpfilesdir}/%{pkg_name}.conf
+# To these directories get written to when thermostat storage/agent
+# run as systemd services
+%attr(0770,thermostat,thermostat) %dir %{system_datadir}
+%attr(0660,thermostat,thermostat) %{system_datadir}/setup-complete.stamp
+%attr(0770,thermostat,thermostat) %dir %{system_cachedir}
+%attr(0770,thermostat,thermostat) %dir %{system_logdir}
+%attr(0770,thermostat,thermostat) %dir %{system_statedir}
+
+%files javadoc
+%doc LICENSE
+%license COPYING
+%license OFL.txt
+%{_datarootdir}/javadoc/%{?scl_prefix}%{pkg_name}
+
+%files webapp -f .mfiles-webapp
+%{thermostat_catalina_base}
+%config(noreplace) %{_sysconfdir}/%{pkg_name}/%{pkg_name}_jaas.conf
+%config(noreplace) %{_sysconfdir}/%{pkg_name}/%{pkg_name}_webstorageservice_jaas.conf
+%config(noreplace) %{_sysconfdir}/%{pkg_name}/web-storage-service.properties
+# Those files should be readable by root and tomcat only
+%attr(0640,root,tomcat) %config(noreplace) %{_sysconfdir}/%{pkg_name}/%{pkg_name}-users.properties
+%attr(0640,root,tomcat) %config(noreplace) %{_sysconfdir}/%{pkg_name}/%{pkg_name}-roles.properties
+%attr(0640,root,tomcat) %config(noreplace) %{_sysconfdir}/%{pkg_name}/web.auth
+# We need an extra file in order to make thermostat-webapp work with
+# our custom CATALINA_BASE. This sets the JAAS-config option.
+%config(noreplace) %{system_confdir}/sysconfig/tomcat@%{pkg_name}
+%{_datadir}/%{pkg_name}/webapp
+%{_datadir}/%{pkg_name}/plugins/embedded-web-endpoint
+
+%changelog
+* Thu May 21 2015 Severin Gehwolf <sgehwolf@redhat.com> - 1.2.2-9
+- Read mongodb credentials from separate file.
+- Resolves: CVE-2015-3201
+
+* Tue Mar 31 2015 Severin Gehwolf <sgehwolf@redhat.com> - 1.2.2-8
+- Rebuild for updated httpcomponents-client.
+
+* Tue Mar 24 2015 Severin Gehwolf <sgehwolf@redhat.com> - 1.2.2-7
+- Fix vm-stat bundle wiring issues.
+
+* Mon Mar 23 2015 Severin Gehwolf <sgehwolf@redhat.com> - 1.2.2-6
+- Move endpoint plugin to thermostat-webapp package.
+
+* Mon Mar 23 2015 Severin Gehwolf <sgehwolf@redhat.com> - 1.2.2-5
+- Use custom JAAS config for web-storage-service.
+
+* Fri Mar 20 2015 Severin Gehwolf <sgehwolf@redhat.com> - 1.2.2-4
+- Rebuild for updated httpcomponents-core.
+
+* Wed Mar 18 2015 Severin Gehwolf <sgehwolf@redhat.com> - 1.2.2-3
+- Fix thermostat-storage systemd service.
+
+* Mon Mar 16 2015 Severin Gehwolf <sgehwolf@redhat.com> - 1.2.2-2
+- Re-enable self-BR (for proper xmvn-subst substitution).
+
+* Mon Mar 16 2015 Severin Gehwolf <sgehwolf@redhat.com> - 1.2.2-1
+- Update to upstream 1.2.2 release.
+
+* Thu Feb 26 2015 Severin Gehwolf <sgehwolf@redhat.com> - 1.2.0-13
+- Add mongodb requirement for thermostat-setup.
+
+* Mon Feb 16 2015 Severin Gehwolf <sgehwolf@redhat.com> - 1.2.0-12
+- Re-enable self-BR (for proper xmvn-subst substitution).
+
+* Mon Feb 16 2015 Severin Gehwolf <sgehwolf@redhat.com> - 1.2.0-11
+- Rebuild with latest netty3.
+- Disable self-BR.
+
+* Thu Jan 29 2015 Omair Majid <omajid@redhat.com> - 1.2.0-10
+- Do not create an admin account in thermostat database.
+
+* Thu Jan 29 2015 Omair Majid <omajid@redhat.com> - 1.2.0-9
+- Fix setup script for mongodb 2.6 compatiblity.
+
+* Wed Jan 28 2015 Omair Majid <omajid@redhat.com> - 1.2.0-8
+- Use %%license instead of %%doc for license files
+- Include README.api as %%doc
+
+* Tue Jan 27 2015 Omair Majid <omajid@redhat.com> - 1.2.0-7
+- Add a plugins.d configuration directory
+- Do not build common-test module
+
+* Tue Jan 27 2015 Omair Majid <omajid@redhat.com> - 1.2.0-6
+- Fix various bundle loading issues.
+
+* Mon Jan 26 2015 Severin Gehwolf <sgehwolf@redhat.com> - 1.2.0-5
+- Re-introduce self-BR (for proper xmvn-subst substitution).
+
+* Mon Jan 26 2015 Severin Gehwolf <sgehwolf@redhat.com> - 1.2.0-4
+- Disable self-BR and conditionalize mongodb-server requires.
+
+* Fri Jan 23 2015 Severin Gehwolf <sgehwolf@redhat.com> - 1.2.0-3
+- BR thermostat in order for xmvn-subst to properly generate
+  symlinks to own jars. Using jars from same reactor does not yet
+  work.
+
+* Thu Jan 22 2015 Severin Gehwolf <sgehwolf@redhat.com> - 1.2.0-2
+- Clean up spec file and make it buildable.
+
+* Wed Jan 21 2015 Severin Gehwolf <sgehwolf@redhat.com> - 1.2.0-1
+- Initial 1.2 build (contributed by Omair Majid <omajid@redhat.com>).
+
+* Thu Dec 18 2014 Elliott Baron <ebaron@redhat.com> - 1.0.6-1
+- Update to latest maintenance release.
+- Update apache-commons-codec to v1.10.0.
+- Resolves: CVE-2014-8120
+
+* Mon Oct 13 2014 Severin Gehwolf <sgehwolf@redhat.com> - 1.0.4-9
+- Use /etc/alternatives/java_sdk_openjdk as jdk_base.
+
+* Mon Oct 13 2014 Severin Gehwolf <sgehwolf@redhat.com> - 1.0.4-8
+- Remove obsolete gnome-icon-theme requires.
+
+* Thu Sep 04 2014 Severin Gehwolf <sgehwolf@redhat.com> - 1.0.4-7
+- Fix package to use java-1.8.0-openjdk.
+- Fix hawtjni-runtime.jar symlink.
+
+* Tue Sep 02 2014 Severin Gehwolf <sgehwolf@redhat.com> - 1.0.4-6
+- Rebuild for updated jcommon/jfreechart versions.
+
+* Mon Aug 18 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.4-5
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
+
+* Tue Aug 05 2014 Severin Gehwolf <sgehwolf@redhat.com> - 1.0.4-4
+- Rebuild for updated httpcomponents-client (v4.3.5) and
+  apache-commons-logging (v1.2.0) builds.
+
+* Tue Jun 10 2014 Severin Gehwolf <sgehwolf@redhat.com> - 1.0.4-3
+- Drop manual requires in favour of mvn()-style auto-requires.
+- Switch to mvn()-style BRs.
+- Use io.netty:netty over org.jboss.netty:netty in order to keep
+  thermostat installable.
+
+* Fri Jun 06 2014 Severin Gehwolf <sgehwolf@redhat.com> - 1.0.4-2
+- Rebuild for updated httpcomonents-client (v4.3.4) and
+  apache-commons-beanutils (v1.9.2) builds.
+
+* Wed Jun 04 2014 Severin Gehwolf <sgehwolf@redhat.com> - 1.0.4-1
+- Update to latest bugfix release.
+- Drop maven-surefire-provider-junit4 BR.
+
+* Mon May 12 2014 Severin Gehwolf <sgehwolf@redhat.com> - 1.0.2-8
+- Rebuild for updated httpcomponents-core (v4.3.2) build.
+
+* Thu Mar 20 2014 Severin Gehwolf <sgehwolf@redhat.com> - 1.0.2-7
+- Make thermostat-webapp's tomcat listen on non-conflicting
+  tomcat port. Fixes RHBZ#1054396.
+- Require exact core version in -webapp subpackage.
+
+* Wed Mar 19 2014 Severin Gehwolf <sgehwolf@redhat.com> - 1.0.2-6
+- Add lucene-analysis BR due to package split of lucene.
+- Fix symlink to lucene analyzers.
+
+* Thu Mar 06 2014 Severin Gehwolf <sgehwolf@redhat.com> - 1.0.2-5
+- Also start lucene-analyzers as bootstrap bundle.
+
+* Wed Mar 05 2014 Severin Gehwolf <sgehwolf@redhat.com> - 1.0.2-4
+- Update to lucene 4.7.0
+- Contributed-by: Michael Simacek
+
+* Wed Mar 05 2014 Severin Gehwolf <sgehwolf@redhat.com> - 1.0.2-3
+- Fix netty3 symlink.
+
+* Tue Mar 04 2014 Severin Gehwolf <sgehwolf@redhat.com> - 1.0.2-2
+- Update spec due to newer httpcomponents-client version.
+
+* Fri Feb 14 2014 Severin Gehwolf <sgehwolf@redhat.com> - 1.0.2-1
+- Update to latest upstream release.
+
+* Tue Feb 11 2014 Omair Majid <omajid@redhat.com> - 1.0.0-3
+- Fix License to match what the source tarball says
+
+* Tue Feb 11 2014 Severin Gehwolf <sgehwolf@redhat.com> - 1.0.0-3
+- Fix FTBFS (changed dependency).
+
+* Fri Jan 17 2014 Severin Gehwolf <sgehwolf@redhat.com> - 1.0.0-2
+- Fix path to jdk/tools.jar in boot scripts.
+- Build against netty3 for now. See RHBZ#1053619.
+- Fix build bundle versions.
+
+* Thu Nov 28 2013 Severin Gehwolf <sgehwolf@redhat.com> - 1.0.0-1
+- Update to upstream 1.0.0 release.
+- Add support for building release branch snapshots.
+
+* Tue Nov 05 2013 Severin Gehwolf <sgehwolf@redhat.com> - 0.15.0-2
+- Change BR/R from jline2 to jline. Resolves RHBZ#1023024
+
+* Tue Nov 05 2013 Severin Gehwolf <sgehwolf@redhat.com> - 0.15.0-1
+- Update to latest upstream release.
+- Use osgi-style R/BR in order to ensure that things work during
+  runtime.
+- Use custom CATALINA_BASE for thermostat-webapp deployment.
+- Reduce symlinked jars in thermostat-webapp classpath.
+- Thermostat tomcat is started via:
+  $ systemctl start tomcat@thermostat
+
+* Wed Oct 23 2013 Severin Gehwolf <sgehwolf@redhat.com> - 0.9.2-7
+- SCL-ize thermostat.
+
+* Fri Aug 23 2013 Omair Majid <omajid@redhat.com> 0.9.2-6
+- Don't use %{_var}.
+
+* Fri Aug 02 2013 Severin Gehwolf <sgehwolf@redhat.com> 0.9.2-5
+- Bump release, rebuild for arm.
+
+* Wed Jun 05 2013 Severin Gehwolf <sgehwolf@redhat.com> 0.9.2-4
+- Don't install thermostat-agent.service due to IcedTea BZ#1460.
+
+* Fri May 31 2013 Severin Gehwolf <sgehwolf@redhat.com> 0.9.2-3
+- Add thermostat SVG icon.
+- Add systemd requires.
+
+* Wed May 29 2013 Severin Gehwolf <sgehwolf@redhat.com> 0.9.2-2
+- Fix warning on uninstall.
+
+* Fri May 24 2013 Severin Gehwolf <sgehwolf@redhat.com> 0.9.2-1
+- Update to upstream 0.9.2 release.
+- With this update, storage/agent systemd services work in
+  permissive mode.
+
+* Wed May 22 2013 Severin Gehwolf <sgehwolf@redhat.com> 0.9.0-1
+- Update to upstream 0.9.0 release.
+- Remove thermostat-client script.
+- Fixes RHBZ#966892.
+
+* Tue May 21 2013 Severin Gehwolf <sgehwolf@redhat.com> 0.8.0-0.1.20130521hg97e66ed2e4ae
+- Update to 0.8.0 pre-release.
+- Install systemd unit files.
+
+* Tue May 21 2013 Severin Gehwolf <sgehwolf@redhat.com> 0.6.0-18
+- Move require of servlet API to webapp sub-package.
+
+* Mon May 20 2013 Omair Majid <omajid@redhat.com> 0.6.0-17
+- COPYING and LICENSE should be included in all packages
+- javadoc subpackage should be noarch
+
+* Fri May 17 2013 Severin Gehwolf <sgehwolf@redhat.com> 0.6.0-17
+- Finish move to new-style mvn packaging.
+
+* Fri May 17 2013 Severin Gehwolf <sgehwolf@redhat.com> 0.6.0-16
+- More xmvn + proper pom installation packaging progress.
+
+* Fri May 17 2013 Severin Gehwolf <sgehwolf@redhat.com> 0.6.0-15
+- Require xmvn >= 0.4.2-1.1 in order to be able to skip installation
+  of the web archive module.
+- More work towards new-style packaging.
+
+* Thu May 16 2013 Severin Gehwolf <sgehwolf@redhat.com> 0.6.0-14
+- More fixes using pom macros.
+- Experiment with new-style packaging. Hit a road-block. Need a
+  web archive installer which xmvn doesn't support :(
+
+* Thu May 16 2013 Severin Gehwolf <sgehwolf@redhat.com> 0.6.0-13
+- Remove one more patch which can be replaced by pom macros.
+
+* Fri Mar 15 2013 Severin Gehwolf <sgehwolf@redhat.com> 0.6.0-12
+- Remove plugins we don't need via pom macros.
+- Add missing BR maven-javadoc-plugin.
+
+* Fri Mar 15 2013 Severin Gehwolf <sgehwolf@redhat.com> 0.6.0-11
+- Fix webapp so as to allow symlinking deps.
+- Add default users for webstorage.
+
+* Fri Mar 15 2013 Severin Gehwolf <sgehwolf@redhat.com> 0.6.0-10
+- Fixup web.xml in thermostat-webapp.
+
+* Thu Mar 14 2013 Severin Gehwolf <sgehwolf@redhat.com> 0.6.0-9
+- Fix thermostat-webapp so as to include web-server.jar
+
+* Thu Mar 14 2013 Severin Gehwolf <sgehwolf@redhat.com> 0.6.0-8
+- Make disable_webservice_cmd.patch smaller (use pom macros instead).
+- Remove unwanted files in /usr/share/thermostat which are generated by
+  maven.
+- Put all config files in /etc and symlink from appropriate places.
+
+* Thu Mar 14 2013 Severin Gehwolf <sgehwolf@redhat.com> 0.6.0-7
+- Use pom macros instead of patches.
+
+* Wed Mar 13 2013 Severin Gehwolf <sgehwolf@redhat.com> 0.6.0-6
+- Add webapp subpackage.
+
+* Wed Mar 13 2013 Severin Gehwolf <sgehwolf@redhat.com> 0.6.0-5
+- Fix NPE on help.
+- Fix bundle resolution errors for heap analysis commands.
+
+* Tue Mar 12 2013 Severin Gehwolf <sgehwolf@redhat.com> 0.6.0-4
+- Fix bundle-loading patch so that all commands depending on
+  httpcomponents-*.jars also start httpmime.
+
+* Tue Mar 12 2013 Severin Gehwolf <sgehwolf@redhat.com> 0.6.0-3
+- Update init-layout-patch (was missing plugins symlink).
+- Fix OSGi filter syntax (prevented thermostat gui from booting).
+
+* Mon Mar 11 2013 Severin Gehwolf <sgehwolf@redhat.com> 0.6.0-2
+- Disable webservice command.
+- Do a tomcat-only build.
+- Work around jline2 jar not being there (see RHBZ#919640).
+
+* Fri Mar 8 2013 Jon VanAlten <jon.vanalten@redhat.com> - 0.6.0-1
+- Update to upstream 0.6.0 release.
+- Also fix RHBZ 914544 (ftbfs)
+
+* Fri Feb 15 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.0-0.28.20121123hgd6145521e208
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
+
+* Wed Feb 06 2013 Java SIG <java-devel@lists.fedoraproject.org> - 0.5.0-0.27.20121123hgd6145521e208
+- Update for https://fedoraproject.org/wiki/Fedora_19_Maven_Rebuild
+- Replace maven BuildRequires with maven-local
+
+* Mon Jan 7 2013 Severin Gehwolf <sgehwolf@redhat.com> 0.5.0-0.26.20121123hgd6145521e208
+- Remove felix-osgi-compendium BR/R since we don't use it (yet).
+
+* Mon Jan 7 2013 Severin Gehwolf <sgehwolf@redhat.com> 0.5.0-0.25.20121123hgd6145521e208
+- Fix for RHBZ 891840 (NoSuchMethodError on boot).
+
+* Thu Dec 20 2012 Severin Gehwolf <sgehwolf@redhat.com> 0.5.0-0.24.20121123hgd6145521e208
+- Fix broken symlinks in %{_jnidir}. See RHBZ#889187.
+
+* Wed Dec 19 2012 Stanislav Ochotnicky <sochotnicky@redhat.com> - 0.5.0-0.23.20121123hgd6145521e208
+- revbump after jnidir change
+
+* Fri Nov 23 2012 Severin Gehwolf <sgehwolf@redhat.com> 0.5.0-0.22.20121123hgd6145521e208
+- Update to more recent snapshot.
+- New BR maven-war-plugin.
+
+* Fri Nov 23 2012 Severin Gehwolf <sgehwolf@redhat.com> 0.5.0-0.21.20121121hg09c2918d8656
+- Require better lucene which has the javax.management
+  ImportPackage header.
+
+* Thu Nov 22 2012 Severin Gehwolf <sgehwolf@redhat.com> 0.5.0-0.20.20121121hg09c2918d8656
+- Build a first pre-release version of thermostat.
+- Includes web layer.
+
+* Thu Nov 15 2012 Severin Gehwolf <sgehwolf@redhat.com> 0.4.0-7
+- Export JAVA_HOME before calling make.
+
+* Thu Nov 15 2012 Severin Gehwolf <sgehwolf@redhat.com> 0.4.0-6
+- Set JAVA_HOME via set_jvm.
+
+* Wed Nov 14 2012 Severin Gehwolf <sgehwolf@redhat.com> 0.4.0-5
+- Don't use maven-exec-plugin for compiling native bits.
+
+* Mon Oct 22 2012 Severin Gehwolf <sgehwolf@redhat.com> 0.4.0-4
+- Require >= jline2-2.5-7 since it has the import-package fix
+  (see RHBZ#868291).
+
+* Mon Oct 22 2012 Severin Gehwolf <sgehwolf@redhat.com> 0.4.0-3
+- Fix RHBZ#868486
+- Debug-infos were not properly generated.
+- Do not override CFLAGS/LDFLAGS.
+
+* Fri Oct 19 2012 Severin Gehwolf <sgehwolf@redhat.com> 0.4.0-2
+- Fix jfreechart.jar symlink name.
+
+* Tue Oct 16 2012 Severin Gehwolf <sgehwolf@redhat.com> 0.4.0-1
+- Update to upstream 0.4 release.
+- Starts dependencies as bundles.
+
+* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3-3
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
+
+* Thu Jul 19 2012 Severin Gehwolf <sgehwolf@redhat.com> 0.3-2
+- Removed now obsolete patch (with jfreechart updated to 1.0.14)
+- Added BR
+
+* Thu Jul 12 2012 Omair Majid <omajid@redhat.com> - 0.3-1
+- Update to upstream 0.3 release
+
+* Sun May 06 2012 Omair Majid <omajid@redhat.com> - 0.2-0.20120506hg2140a7c81a4b
+- Resolve RH813539
+- Remove uneeded require on fusesource-pom
+- Fix jar to use jline2 instead of jline
+
+* Fri May 04 2012 Omair Majid <omajid@redhat.com> - 0.2-0.20120503hg2140a7c81a4b
+- Update to pre-release upstream snapshot
+
+* Mon Feb 13 2012 Omair Majid <omajid@redhat.com> - 0.1-1
+- Updated description
+
+* Tue Feb 07 2012 Omair Majid <omajid@redhat.com> - 0.1-1
+- Intial package