changeset 725:3c82d501a8e1

Update Eclipse bits to use Web storage. Existing and checked-in Eclipse bits were broken due to a recent ApplicationContext refactoring. This patch removes ApplicationContext.getDAOFactory() calls and uses DAOs via registered services. DAOs are registered via the DbService.connect() API. Unfortunately, DbService lives in the launcher bundle and, hence, eclipse bits depend on it as well. I'll fix this in a subsequent patch very soon. I've also added p2.inf files for web-client, web-common and launcher bundles so that web bundles get started in eclipse on boot, RestStorage is properly registered as a service and thus DAOs can get registered as services via DbService.connect(). This patch also removes pom.xml~ files. Gedit - for example - creates them as temp files. Not sure how they got version controlled. I've added a pattern to .hgignore for *~ files, too. With this patch Thermostat-Eclipse build jobs can be re-enabled. Reviewed-by: ebaron Review-thread: http://icedtea.classpath.org/pipermail/thermostat/2012-October/003795.html
author Severin Gehwolf <sgehwolf@redhat.com>
date Fri, 19 Oct 2012 17:34:42 +0200
parents 743c15d87009
children 024d6d6901fb
files .hgignore common/core/p2.inf common/core/pom.xml common/core/src/main/resources/META-INF/p2.inf eclipse/com.redhat.thermostat.eclipse.feature/pom.xml eclipse/com.redhat.thermostat.eclipse.p2-repo/pom.xml eclipse/com.redhat.thermostat.eclipse.test/pom.xml eclipse/com.redhat.thermostat.eclipse/META-INF/MANIFEST.MF eclipse/com.redhat.thermostat.eclipse/pom.xml eclipse/com.redhat.thermostat.eclipse/src/com/redhat/thermostat/eclipse/Activator.java eclipse/com.redhat.thermostat.eclipse/src/com/redhat/thermostat/eclipse/ConnectionConfiguration.java eclipse/com.redhat.thermostat.eclipse/src/com/redhat/thermostat/eclipse/controllers/ConnectionJobListener.java eclipse/com.redhat.thermostat.eclipse/src/com/redhat/thermostat/eclipse/jobs/ConnectDbJob.java eclipse/com.redhat.thermostat.eclipse/src/com/redhat/thermostat/eclipse/views/HostOverviewViewPart.java eclipse/com.redhat.thermostat.eclipse/src/com/redhat/thermostat/eclipse/views/HostsVmsTreeViewPart.java eclipse/core-p2-repository/pom.xml launcher/src/main/resources/META-INF/p2.inf web/client/pom.xml~ web/client/src/main/resources/META-INF/p2.inf web/common/pom.xml~ web/common/src/main/resources/META-INF/p2.inf web/server/pom.xml~
diffstat 22 files changed, 174 insertions(+), 398 deletions(-) [+]
line wrap: on
line diff
--- a/.hgignore	Tue Oct 23 17:10:23 2012 +0200
+++ b/.hgignore	Fri Oct 19 17:34:42 2012 +0200
@@ -10,3 +10,4 @@
 syntax: glob
 target/*
 bin/*
+*~
--- a/common/core/p2.inf	Tue Oct 23 17:10:23 2012 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,7 +0,0 @@
-# Instructs Eclipse update manager to auto-start this bundle
-instructions.configure = \
-org.eclipse.equinox.p2.touchpoint.eclipse.setStartLevel(startLevel: 4); \
-org.eclipse.equinox.p2.touchpoint.eclipse.markStarted(started: true);
-instructions.unconfigure = \
-org.eclipse.equinox.p2.touchpoint.eclipse.setStartLevel(startLevel: -1); \
-org.eclipse.equinox.p2.touchpoint.eclipse.markStarted(started: false);
--- a/common/core/pom.xml	Tue Oct 23 17:10:23 2012 +0200
+++ b/common/core/pom.xml	Fri Oct 19 17:34:42 2012 +0200
@@ -97,7 +97,6 @@
             </Private-Package>
             <!-- Do not autogenerate uses clauses in Manifests -->
             <_nouses>true</_nouses>
-            <Include-Resource>META-INF/p2.inf=p2.inf</Include-Resource>
           </instructions>
         </configuration>
       </plugin>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/common/core/src/main/resources/META-INF/p2.inf	Fri Oct 19 17:34:42 2012 +0200
@@ -0,0 +1,7 @@
+# Instructs Eclipse update manager to auto-start this bundle
+instructions.configure = \
+org.eclipse.equinox.p2.touchpoint.eclipse.setStartLevel(startLevel: 4); \
+org.eclipse.equinox.p2.touchpoint.eclipse.markStarted(started: true);
+instructions.unconfigure = \
+org.eclipse.equinox.p2.touchpoint.eclipse.setStartLevel(startLevel: -1); \
+org.eclipse.equinox.p2.touchpoint.eclipse.markStarted(started: false);
--- a/eclipse/com.redhat.thermostat.eclipse.feature/pom.xml	Tue Oct 23 17:10:23 2012 +0200
+++ b/eclipse/com.redhat.thermostat.eclipse.feature/pom.xml	Fri Oct 19 17:34:42 2012 +0200
@@ -19,6 +19,23 @@
       <artifactId>thermostat-common-core</artifactId>
       <version>0.5.0-SNAPSHOT</version>
     </dependency>
+    <!-- using Web storage -->
+    <dependency>
+      <groupId>com.redhat.thermostat</groupId>
+      <artifactId>thermostat-web-client</artifactId>
+      <version>0.5.0-SNAPSHOT</version>
+    </dependency>
+    <dependency>
+      <groupId>com.redhat.thermostat</groupId>
+      <artifactId>thermostat-web-common</artifactId>
+      <version>0.5.0-SNAPSHOT</version>
+    </dependency>
+    <!-- DbService is in the launcher bundle -->
+    <dependency>
+      <groupId>com.redhat.thermostat</groupId>
+      <artifactId>thermostat-launcher</artifactId>
+      <version>0.5.0-SNAPSHOT</version>
+    </dependency>
   </dependencies>
 
   <build>
--- a/eclipse/com.redhat.thermostat.eclipse.p2-repo/pom.xml	Tue Oct 23 17:10:23 2012 +0200
+++ b/eclipse/com.redhat.thermostat.eclipse.p2-repo/pom.xml	Fri Oct 19 17:34:42 2012 +0200
@@ -19,6 +19,23 @@
       <artifactId>thermostat-common-core</artifactId>
       <version>0.5.0-SNAPSHOT</version>
     </dependency>
+    <!-- using Web storage -->
+    <dependency>
+      <groupId>com.redhat.thermostat</groupId>
+      <artifactId>thermostat-web-client</artifactId>
+      <version>0.5.0-SNAPSHOT</version>
+    </dependency>
+    <dependency>
+      <groupId>com.redhat.thermostat</groupId>
+      <artifactId>thermostat-web-common</artifactId>
+      <version>0.5.0-SNAPSHOT</version>
+    </dependency>
+    <!-- DbService is in the launcher bundle -->
+    <dependency>
+      <groupId>com.redhat.thermostat</groupId>
+      <artifactId>thermostat-launcher</artifactId>
+      <version>0.5.0-SNAPSHOT</version>
+    </dependency>
   </dependencies>
 
   <build>
--- a/eclipse/com.redhat.thermostat.eclipse.test/pom.xml	Tue Oct 23 17:10:23 2012 +0200
+++ b/eclipse/com.redhat.thermostat.eclipse.test/pom.xml	Fri Oct 19 17:34:42 2012 +0200
@@ -20,6 +20,23 @@
       <artifactId>thermostat-common-core</artifactId>
       <version>0.5.0-SNAPSHOT</version>
     </dependency>
+    <!-- using Web storage -->
+    <dependency>
+      <groupId>com.redhat.thermostat</groupId>
+      <artifactId>thermostat-web-client</artifactId>
+      <version>0.5.0-SNAPSHOT</version>
+    </dependency>
+    <dependency>
+      <groupId>com.redhat.thermostat</groupId>
+      <artifactId>thermostat-web-common</artifactId>
+      <version>0.5.0-SNAPSHOT</version>
+    </dependency>
+    <!-- DbService is in the launcher bundle -->
+    <dependency>
+      <groupId>com.redhat.thermostat</groupId>
+      <artifactId>thermostat-launcher</artifactId>
+      <version>0.5.0-SNAPSHOT</version>
+    </dependency>
     <dependency>
       <groupId>com.redhat.thermostat.eclipse.parent</groupId>
       <artifactId>com.redhat.thermostat.eclipse.test-deps-repo</artifactId>
--- a/eclipse/com.redhat.thermostat.eclipse/META-INF/MANIFEST.MF	Tue Oct 23 17:10:23 2012 +0200
+++ b/eclipse/com.redhat.thermostat.eclipse/META-INF/MANIFEST.MF	Fri Oct 19 17:34:42 2012 +0200
@@ -15,7 +15,11 @@
  com.redhat.thermostat.common.config,
  com.redhat.thermostat.common.dao,
  com.redhat.thermostat.common.model,
- com.redhat.thermostat.common.storage
+ com.redhat.thermostat.common.storage,
+ com.redhat.thermostat.launcher,
+ com.redhat.thermostat.common.utils,
+ com.redhat.thermostat.web.client,
+ com.redhat.thermostat.web.common
 Export-Package: com.redhat.thermostat.eclipse;x-friends:=com.redhat.thermostat.eclipse.test,
  com.redhat.thermostat.eclipse.model;x-friends:=com.redhat.thermostat.eclipse.test,
  com.redhat.thermostat.eclipse.views;x-friends:=com.redhat.thermostat.eclipse.test
--- a/eclipse/com.redhat.thermostat.eclipse/pom.xml	Tue Oct 23 17:10:23 2012 +0200
+++ b/eclipse/com.redhat.thermostat.eclipse/pom.xml	Fri Oct 19 17:34:42 2012 +0200
@@ -20,6 +20,23 @@
       <artifactId>thermostat-common-core</artifactId>
       <version>0.5.0-SNAPSHOT</version>
     </dependency>
+    <!-- using Web storage -->
+    <dependency>
+      <groupId>com.redhat.thermostat</groupId>
+      <artifactId>thermostat-web-client</artifactId>
+      <version>0.5.0-SNAPSHOT</version>
+    </dependency>
+    <dependency>
+      <groupId>com.redhat.thermostat</groupId>
+      <artifactId>thermostat-web-common</artifactId>
+      <version>0.5.0-SNAPSHOT</version>
+    </dependency>
+    <!-- DbService is in the launcher bundle -->
+    <dependency>
+      <groupId>com.redhat.thermostat</groupId>
+      <artifactId>thermostat-launcher</artifactId>
+      <version>0.5.0-SNAPSHOT</version>
+    </dependency>
   </dependencies>
 
 </project>
--- a/eclipse/com.redhat.thermostat.eclipse/src/com/redhat/thermostat/eclipse/Activator.java	Tue Oct 23 17:10:23 2012 +0200
+++ b/eclipse/com.redhat.thermostat.eclipse/src/com/redhat/thermostat/eclipse/Activator.java	Fri Oct 19 17:34:42 2012 +0200
@@ -43,17 +43,15 @@
 import org.eclipse.ui.plugin.AbstractUIPlugin;
 import org.osgi.framework.BundleContext;
 
-import com.redhat.thermostat.common.appctx.ApplicationContext;
-import com.redhat.thermostat.common.storage.Connection;
+import com.redhat.thermostat.common.storage.ConnectionException;
+import com.redhat.thermostat.common.utils.OSGIUtils;
+import com.redhat.thermostat.launcher.DbService;
 
 /**
  * The activator class controls the plug-in life cycle
  */
 public class Activator extends AbstractUIPlugin {
 
-    // Storage connection status
-    private volatile boolean connected = false;
-
     // The plug-in ID
     public static final String PLUGIN_ID = "com.redhat.thermostat.eclipse"; //$NON-NLS-1$
 
@@ -66,14 +64,6 @@
     public Activator() {
     }
 
-    public boolean isConnected() {
-        return connected;
-    }
-
-    public void setConnected(boolean connected) {
-        this.connected = connected;
-    }
-
     /*
      * (non-Javadoc)
      * 
@@ -94,11 +84,13 @@
      * )
      */
     public void stop(BundleContext context) throws Exception {
-        if (isConnected()) {
-            Connection connection = ApplicationContext.getInstance()
-                    .getDAOFactory().getConnection();
-            connection.disconnect();
+        DbService dbService = OSGIUtils.getInstance().getService(DbService.class);
+        try {
+            dbService.disconnect();
+        } catch (ConnectionException e) {
+            e.printStackTrace();
         }
+        dbService.getServiceRegistration().unregister();
         plugin = null;
         super.stop(context);
     }
@@ -151,5 +143,10 @@
     public static ImageDescriptor getImageDescriptor(String path) {
         return imageDescriptorFromPlugin(PLUGIN_ID, path);
     }
+    
+    public boolean isDbConnected() {
+        DbService dbService = OSGIUtils.getInstance().getServiceAllowNull(DbService.class);
+        return dbService != null;
+    }
 
 }
--- a/eclipse/com.redhat.thermostat.eclipse/src/com/redhat/thermostat/eclipse/ConnectionConfiguration.java	Tue Oct 23 17:10:23 2012 +0200
+++ b/eclipse/com.redhat.thermostat.eclipse/src/com/redhat/thermostat/eclipse/ConnectionConfiguration.java	Fri Oct 19 17:34:42 2012 +0200
@@ -41,10 +41,21 @@
 public class ConnectionConfiguration implements StartupConfiguration {
 
     private String dbUrl;
+    private String username;
+    private String password;
+    
+    public ConnectionConfiguration(String username, String password, String dbUrl) {
+        this.dbUrl = dbUrl;
+        this.username = username;
+        this.password = password;
+    }
 
-    // FIXME: Adapt to more dynamic requirements
-    public ConnectionConfiguration(String dbUrl) {
-        this.dbUrl = dbUrl;
+    public String getUsername() {
+        return username;
+    }
+
+    public String getPassword() {
+        return password;
     }
 
     @Override
--- a/eclipse/com.redhat.thermostat.eclipse/src/com/redhat/thermostat/eclipse/controllers/ConnectionJobListener.java	Tue Oct 23 17:10:23 2012 +0200
+++ b/eclipse/com.redhat.thermostat.eclipse/src/com/redhat/thermostat/eclipse/controllers/ConnectionJobListener.java	Fri Oct 19 17:34:42 2012 +0200
@@ -60,7 +60,7 @@
         if (result.isOK()) {
             connectAction.setImageDescriptor(Activator
                     .getImageDescriptor("icons/online.png"));
-            connectAction.setEnabled(!Activator.getDefault().isConnected());
+            connectAction.setEnabled(!Activator.getDefault().isDbConnected());
             connectAction.setToolTipText("Online");
             view.showHostVmsPage();
         }
--- a/eclipse/com.redhat.thermostat.eclipse/src/com/redhat/thermostat/eclipse/jobs/ConnectDbJob.java	Tue Oct 23 17:10:23 2012 +0200
+++ b/eclipse/com.redhat.thermostat.eclipse/src/com/redhat/thermostat/eclipse/jobs/ConnectDbJob.java	Fri Oct 19 17:34:42 2012 +0200
@@ -40,22 +40,14 @@
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Status;
 import org.eclipse.core.runtime.jobs.Job;
+import org.osgi.framework.BundleContext;
 
-import com.redhat.thermostat.common.ThreadPoolTimerFactory;
-import com.redhat.thermostat.common.TimerFactory;
-import com.redhat.thermostat.common.appctx.ApplicationContext;
-import com.redhat.thermostat.common.config.InvalidConfigurationException;
-import com.redhat.thermostat.common.dao.DAOFactory;
-import com.redhat.thermostat.common.dao.MongoDAOFactory;
-import com.redhat.thermostat.common.storage.Connection;
-import com.redhat.thermostat.common.storage.Connection.ConnectionListener;
-import com.redhat.thermostat.common.storage.Connection.ConnectionStatus;
 import com.redhat.thermostat.common.storage.ConnectionException;
-import com.redhat.thermostat.common.storage.MongoStorageProvider;
-import com.redhat.thermostat.common.storage.StorageProvider;
 import com.redhat.thermostat.eclipse.Activator;
 import com.redhat.thermostat.eclipse.ConnectionConfiguration;
 import com.redhat.thermostat.eclipse.LoggerFacility;
+import com.redhat.thermostat.launcher.DbService;
+import com.redhat.thermostat.launcher.DbServiceFactory;
 
 public class ConnectDbJob extends Job {
 
@@ -74,7 +66,7 @@
         try {
             connectToBackEnd();
             return Status.OK_STATUS;
-        } catch (InvalidConfigurationException | ConnectionException e) {
+        } catch (ConnectionException e) {
             LoggerFacility.getInstance().log(IStatus.ERROR,
                     "Could not connect to DB", e);
             return new Status(IStatus.ERROR, Activator.PLUGIN_ID, "Could not connect to DB", e);
@@ -82,46 +74,15 @@
     }
     
     /*
-     * Establish a Mongo DB connection.
+     * Establish a DB connection.
      */
-    private void connectToBackEnd() throws InvalidConfigurationException, ConnectionException {
-        StorageProvider connProv = new MongoStorageProvider(configuration);
-        DAOFactory daoFactory = new MongoDAOFactory(connProv);
-        ApplicationContext.getInstance().setDAOFactory(daoFactory);
-        TimerFactory timerFactory = new ThreadPoolTimerFactory(1);
-        ApplicationContext.getInstance().setTimerFactory(timerFactory);
-
-        Connection connection = daoFactory.getConnection();
-        ConnectionListener connectionListener = new ConnectionListener() {
-            @Override
-            public void changed(ConnectionStatus newStatus) {
-                switch (newStatus) {
-                case DISCONNECTED:
-                    LoggerFacility.getInstance().log(IStatus.WARNING,
-                            "Unexpected disconnect event.");
-                    break;
-                case CONNECTING:
-                    LoggerFacility.getInstance().log(IStatus.INFO,
-                            "Connecting to storage.");
-                    break;
-                case CONNECTED:
-                    LoggerFacility.getInstance().log(IStatus.INFO,
-                            "Connected to storage.");
-                    Activator.getDefault().setConnected(true);
-                    break;
-                case FAILED_TO_CONNECT:
-                    LoggerFacility.getInstance().log(IStatus.WARNING,
-                            "Could not connect to storage.");
-                default:
-                    LoggerFacility.getInstance().log(IStatus.WARNING,
-                            "Unfamiliar ConnectionStatus value");
-                }
-            }
-        };
-        connection.addListener(connectionListener);
-        LoggerFacility.getInstance().log(IStatus.INFO,
-                "Connecting to storage...");
-        connection.connect();
+    private void connectToBackEnd() throws ConnectionException {
+        DbService dbService = DbServiceFactory.createDbService(configuration.getUsername(),
+                configuration.getPassword(), configuration.getDBConnectionString());
+        dbService.connect();
+        // register service in order to indicate that we are connected
+        BundleContext ctxt = Activator.getDefault().getBundle().getBundleContext();
+        ctxt.registerService(DbService.class, dbService, null);
     }
 
 }
--- a/eclipse/com.redhat.thermostat.eclipse/src/com/redhat/thermostat/eclipse/views/HostOverviewViewPart.java	Tue Oct 23 17:10:23 2012 +0200
+++ b/eclipse/com.redhat.thermostat.eclipse/src/com/redhat/thermostat/eclipse/views/HostOverviewViewPart.java	Fri Oct 19 17:34:42 2012 +0200
@@ -59,8 +59,6 @@
 import org.eclipse.ui.part.PageBook;
 import org.eclipse.ui.part.ViewPart;
 
-import com.redhat.thermostat.common.appctx.ApplicationContext;
-import com.redhat.thermostat.common.dao.DAOFactory;
 import com.redhat.thermostat.common.dao.HostInfoDAO;
 import com.redhat.thermostat.common.dao.HostRef;
 import com.redhat.thermostat.common.dao.NetworkInterfaceInfoDAO;
@@ -68,6 +66,7 @@
 import com.redhat.thermostat.common.dao.VmRef;
 import com.redhat.thermostat.common.model.HostInfo;
 import com.redhat.thermostat.common.model.NetworkInterfaceInfo;
+import com.redhat.thermostat.common.utils.OSGIUtils;
 import com.redhat.thermostat.eclipse.Activator;
 
 public class HostOverviewViewPart extends ViewPart {
@@ -103,7 +102,7 @@
                     && !selection.equals(oldSelection)) {
                 oldSelection = selection;
                 Ref ref = getRefFromSelection(selection);
-                if (Activator.getDefault().isConnected()) {
+                if (Activator.getDefault().isDbConnected()) {
                     if (ref != null) {
                         updateText(ref);
                         if (ref instanceof HostRef) {
@@ -252,7 +251,7 @@
         // Listen for VMtree changes
         getSite().getWorkbenchWindow().getSelectionService()
                 .addSelectionListener(listener);
-        if (Activator.getDefault().isConnected()) {
+        if (Activator.getDefault().isDbConnected()) {
             ISelection selection = getSite().getWorkbenchWindow()
                     .getSelectionService().getSelection();
             Ref ref = getRefFromSelection(selection);
@@ -287,11 +286,11 @@
     }
 
     private void updateText(final HostRef hostRef) {
-        DAOFactory df = ApplicationContext.getInstance().getDAOFactory();
-        HostInfoDAO hostInfoDAO = df.getHostInfoDAO();
+        HostInfoDAO hostInfoDAO = OSGIUtils.getInstance().getService(
+                HostInfoDAO.class);
         final HostInfo hostInfo = hostInfoDAO.getHostInfo(hostRef);
-        final NetworkInterfaceInfoDAO networkInfoDAO = df
-                .getNetworkInterfaceInfoDAO();
+        final NetworkInterfaceInfoDAO networkInfoDAO = OSGIUtils.getInstance()
+                .getService(NetworkInterfaceInfoDAO.class);
         PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
             @Override
             public void run() {
--- a/eclipse/com.redhat.thermostat.eclipse/src/com/redhat/thermostat/eclipse/views/HostsVmsTreeViewPart.java	Tue Oct 23 17:10:23 2012 +0200
+++ b/eclipse/com.redhat.thermostat.eclipse/src/com/redhat/thermostat/eclipse/views/HostsVmsTreeViewPart.java	Fri Oct 19 17:34:42 2012 +0200
@@ -53,9 +53,9 @@
 
 import com.redhat.thermostat.common.DefaultHostsVMsLoader;
 import com.redhat.thermostat.common.HostsVMsLoader;
-import com.redhat.thermostat.common.appctx.ApplicationContext;
 import com.redhat.thermostat.common.dao.HostInfoDAO;
 import com.redhat.thermostat.common.dao.VmInfoDAO;
+import com.redhat.thermostat.common.utils.OSGIUtils;
 import com.redhat.thermostat.eclipse.Activator;
 import com.redhat.thermostat.eclipse.ConnectionConfiguration;
 import com.redhat.thermostat.eclipse.controllers.ConnectDBAction;
@@ -81,7 +81,8 @@
     private PageBook pageBook;
 
     public HostsVmsTreeViewPart() {
-        ConnectionConfiguration configuration = new ConnectionConfiguration("mongodb://127.0.0.1:27518");
+        // FIXME: Get these values from preferences
+        ConnectionConfiguration configuration = new ConnectionConfiguration("dummyUser", "dummyPassword", "mongodb://127.0.0.1:27518");
         Job connectJob = new ConnectDbJob(
                 "Connecting to Thermostat storage...", configuration);
         connectJob.setSystem(true);
@@ -101,10 +102,10 @@
     }
 
     public void showHostVmsPage() {
-        HostInfoDAO hostDAO = ApplicationContext.getInstance().getDAOFactory()
-                .getHostInfoDAO();
-        VmInfoDAO vmsDAO = ApplicationContext.getInstance().getDAOFactory()
-                .getVmInfoDAO();
+        HostInfoDAO hostDAO = OSGIUtils.getInstance().getService(
+                HostInfoDAO.class);
+        VmInfoDAO vmsDAO = OSGIUtils.getInstance().getService(
+                VmInfoDAO.class);
         final HostsVMsLoader loader = new DefaultHostsVMsLoader(hostDAO,
                 vmsDAO, false);
 
@@ -152,8 +153,7 @@
             }
         });
         // Show appropriate page
-        boolean connected = Activator.getDefault().isConnected();
-        if (connected) {
+        if (Activator.getDefault().isDbConnected()) {
             showHostVmsPage();
         } else {
             showConnectionPage();
--- a/eclipse/core-p2-repository/pom.xml	Tue Oct 23 17:10:23 2012 +0200
+++ b/eclipse/core-p2-repository/pom.xml	Fri Oct 19 17:34:42 2012 +0200
@@ -197,6 +197,22 @@
                     <artifactId>thermostat-thread-collector</artifactId>
                     <version>${project.version}</version>
                 </artifactItem>      
+                <!-- Web bundles -->
+                <artifactItem>
+                    <groupId>com.redhat.thermostat</groupId>
+                    <artifactId>thermostat-web-client</artifactId>
+                    <version>${project.version}</version>
+                </artifactItem>
+                <artifactItem>
+                    <groupId>com.redhat.thermostat</groupId>
+                    <artifactId>thermostat-web-common</artifactId>
+                    <version>${project.version}</version>
+                </artifactItem>
+                <artifactItem>
+                    <groupId>com.redhat.thermostat</groupId>
+                    <artifactId>thermostat-web-server</artifactId>
+                    <version>${project.version}</version>
+                </artifactItem>      
               </artifactItems>
               <outputDirectory>${project.basedir}/target/source/plugins</outputDirectory>
             </configuration>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/launcher/src/main/resources/META-INF/p2.inf	Fri Oct 19 17:34:42 2012 +0200
@@ -0,0 +1,7 @@
+# Instructs Eclipse update manager to auto-start this bundle
+instructions.configure = \
+org.eclipse.equinox.p2.touchpoint.eclipse.setStartLevel(startLevel: 4); \
+org.eclipse.equinox.p2.touchpoint.eclipse.markStarted(started: true);
+instructions.unconfigure = \
+org.eclipse.equinox.p2.touchpoint.eclipse.setStartLevel(startLevel: -1); \
+org.eclipse.equinox.p2.touchpoint.eclipse.markStarted(started: false);
--- a/web/client/pom.xml~	Tue Oct 23 17:10:23 2012 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,100 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-
- Copyright 2012 Red Hat, Inc.
-
- This file is part of Thermostat.
-
- Thermostat is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published
- by the Free Software Foundation; either version 2, or (at your
- option) any later version.
-
- Thermostat is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with Thermostat; see the file COPYING.  If not see
- <http://www.gnu.org/licenses />.
-
- Linking this code with other modules is making a combined work
- based on this code.  Thus, the terms and conditions of the GNU
- General Public License cover the whole combination.
-
- As a special exception, the copyright holders of this code give
- you permission to link this code with independent modules to
- produce an executable, regardless of the license terms of these
- independent modules, and to copy and distribute the resulting
- executable under terms of your choice, provided that you also
- meet, for each linked independent module, the terms and conditions
- of the license of that module.  An independent module is a module
- which is not derived from or based on this code.  If you modify
- this code, you may extend this exception to your version of the
- library, but you are not obligated to do so.  If you do not wish
- to do so, delete this exception statement from your version.
-
--->
-<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/xsd/maven-4.0.0.xsd">
-  <modelVersion>4.0.0</modelVersion>
-
-  <parent>
-    <groupId>com.redhat.thermostat</groupId>
-    <artifactId>thermostat-web</artifactId>
-    <version>0.4.0-SNAPSHOT</version>
-  </parent>
-
-  <artifactId>thermostat-web-server</artifactId>
-  <packaging>war</packaging>
-
-  <name>Thermostat Web Server</name>
-
-  <dependencies>
-  
-    <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.mockito</groupId>
-      <artifactId>mockito-core</artifactId>
-      <scope>test</scope>
-    </dependency>
-
-    <dependency>
-      <groupId>org.eclipse.jetty</groupId>
-      <artifactId>jetty-server</artifactId>
-      <version>8.1.5.v20120716</version>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.eclipse.jetty</groupId>
-      <artifactId>jetty-webapp</artifactId>
-      <version>8.1.5.v20120716</version>
-      <scope>test</scope>
-    </dependency>
-
-
-    <dependency>
-      <groupId>javax.servlet</groupId>
-      <artifactId>servlet-api</artifactId>
-      <version>2.5</version>
-    </dependency>
-
-    <dependency>
-      <groupId>com.google.code.gson</groupId>
-      <artifactId>gson</artifactId>
-      <version>2.2.2</version>
-    </dependency>
-
-    <dependency>
-      <groupId>com.redhat.thermostat</groupId>
-      <artifactId>thermostat-common-core</artifactId>
-      <version>${project.version}</version>
-    </dependency>
-
-  </dependencies>
-
-</project>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/web/client/src/main/resources/META-INF/p2.inf	Fri Oct 19 17:34:42 2012 +0200
@@ -0,0 +1,7 @@
+# Instructs Eclipse update manager to auto-start this bundle
+instructions.configure = \
+org.eclipse.equinox.p2.touchpoint.eclipse.setStartLevel(startLevel: 4); \
+org.eclipse.equinox.p2.touchpoint.eclipse.markStarted(started: true);
+instructions.unconfigure = \
+org.eclipse.equinox.p2.touchpoint.eclipse.setStartLevel(startLevel: -1); \
+org.eclipse.equinox.p2.touchpoint.eclipse.markStarted(started: false);
--- a/web/common/pom.xml~	Tue Oct 23 17:10:23 2012 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,94 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-
- Copyright 2012 Red Hat, Inc.
-
- This file is part of Thermostat.
-
- Thermostat is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published
- by the Free Software Foundation; either version 2, or (at your
- option) any later version.
-
- Thermostat is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with Thermostat; see the file COPYING.  If not see
- <http://www.gnu.org/licenses />.
-
- Linking this code with other modules is making a combined work
- based on this code.  Thus, the terms and conditions of the GNU
- General Public License cover the whole combination.
-
- As a special exception, the copyright holders of this code give
- you permission to link this code with independent modules to
- produce an executable, regardless of the license terms of these
- independent modules, and to copy and distribute the resulting
- executable under terms of your choice, provided that you also
- meet, for each linked independent module, the terms and conditions
- of the license of that module.  An independent module is a module
- which is not derived from or based on this code.  If you modify
- this code, you may extend this exception to your version of the
- library, but you are not obligated to do so.  If you do not wish
- to do so, delete this exception statement from your version.
-
--->
-<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/xsd/maven-4.0.0.xsd">
-  <modelVersion>4.0.0</modelVersion>
-
-  <parent>
-    <groupId>com.redhat.thermostat</groupId>
-    <artifactId>thermostat-web</artifactId>
-    <version>0.4.0-SNAPSHOT</version>
-  </parent>
-
-  <artifactId>thermostat-web-client</artifactId>
-  <packaging>war</packaging>
-
-  <name>Thermostat Web Client</name>
-
-  <dependencies>
-  
-    <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.mockito</groupId>
-      <artifactId>mockito-core</artifactId>
-      <scope>test</scope>
-    </dependency>
-
-    <dependency>
-      <groupId>org.eclipse.jetty</groupId>
-      <artifactId>jetty-server</artifactId>
-      <version>8.1.5.v20120716</version>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.eclipse.jetty</groupId>
-      <artifactId>jetty-webapp</artifactId>
-      <version>8.1.5.v20120716</version>
-      <scope>test</scope>
-    </dependency>
-
-
-    <dependency>
-      <groupId>com.google.code.gson</groupId>
-      <artifactId>gson</artifactId>
-      <version>2.2.2</version>
-    </dependency>
-
-    <dependency>
-      <groupId>com.redhat.thermostat</groupId>
-      <artifactId>thermostat-common-core</artifactId>
-      <version>${project.version}</version>
-    </dependency>
-
-  </dependencies>
-
-</project>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/web/common/src/main/resources/META-INF/p2.inf	Fri Oct 19 17:34:42 2012 +0200
@@ -0,0 +1,7 @@
+# Instructs Eclipse update manager to auto-start this bundle
+instructions.configure = \
+org.eclipse.equinox.p2.touchpoint.eclipse.setStartLevel(startLevel: 4); \
+org.eclipse.equinox.p2.touchpoint.eclipse.markStarted(started: true);
+instructions.unconfigure = \
+org.eclipse.equinox.p2.touchpoint.eclipse.setStartLevel(startLevel: -1); \
+org.eclipse.equinox.p2.touchpoint.eclipse.markStarted(started: false);
--- a/web/server/pom.xml~	Tue Oct 23 17:10:23 2012 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,107 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-
- Copyright 2012 Red Hat, Inc.
-
- This file is part of Thermostat.
-
- Thermostat is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published
- by the Free Software Foundation; either version 2, or (at your
- option) any later version.
-
- Thermostat is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with Thermostat; see the file COPYING.  If not see
- <http://www.gnu.org/licenses />.
-
- Linking this code with other modules is making a combined work
- based on this code.  Thus, the terms and conditions of the GNU
- General Public License cover the whole combination.
-
- As a special exception, the copyright holders of this code give
- you permission to link this code with independent modules to
- produce an executable, regardless of the license terms of these
- independent modules, and to copy and distribute the resulting
- executable under terms of your choice, provided that you also
- meet, for each linked independent module, the terms and conditions
- of the license of that module.  An independent module is a module
- which is not derived from or based on this code.  If you modify
- this code, you may extend this exception to your version of the
- library, but you are not obligated to do so.  If you do not wish
- to do so, delete this exception statement from your version.
-
--->
-<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/xsd/maven-4.0.0.xsd">
-  <modelVersion>4.0.0</modelVersion>
-
-  <parent>
-    <groupId>com.redhat.thermostat</groupId>
-    <artifactId>thermostat</artifactId>
-    <version>0.4.0-SNAPSHOT</version>
-  </parent>
-
-  <artifactId>thermostat-web</artifactId>
-  <packaging>war</packaging>
-
-  <name>Thermostat Web</name>
-
-  <repositories>
-	<repository>
-      <id>JBoss repository</id>
-      <url>https://repository.jboss.org/nexus/content/groups/public-jboss/</url>
-    </repository>
-  </repositories>
-
-  <dependencies>
-  
-    <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.mockito</groupId>
-      <artifactId>mockito-core</artifactId>
-      <scope>test</scope>
-    </dependency>
-
-    <dependency>
-      <groupId>org.eclipse.jetty</groupId>
-      <artifactId>jetty-server</artifactId>
-      <version>8.1.5.v20120716</version>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.eclipse.jetty</groupId>
-      <artifactId>jetty-webapp</artifactId>
-      <version>8.1.5.v20120716</version>
-      <scope>test</scope>
-    </dependency>
-
-
-    <dependency>
-      <groupId>javax.servlet</groupId>
-      <artifactId>servlet-api</artifactId>
-      <version>2.5</version>
-    </dependency>
-
-    <dependency>
-      <groupId>com.google.code.gson</groupId>
-      <artifactId>gson</artifactId>
-      <version>2.2.2</version>
-    </dependency>
-
-    <dependency>
-      <groupId>com.redhat.thermostat.</groupId>
-      <artifactId>thermostat-common-core</artifactId>
-      <version>${project.version}</version>
-    </dependency>
-
-  </dependencies>
-
-</project>