changeset 607:c95ca376c9af

Enable Eclipse plug-in tests during build. What this patch does: * Wraps a few dependencies (hamcrest, objenenis, mockito). I had to do this in order to get a working mockito. This is using hamcrest 1.3 in order to avoid uses conflicts of packages imported from mockito via Import-Package. Eclipse ships junit, which depends on hamcrest 1.1.0. Since during Eclipse plug-in test runs those bundles are loaded I can only guess that this is what produced the uses conflict when using mockito-all or mockito from springsource. Unfortunately no good diagnostics from equinox. That's why I think mockito-all or mockito from com.springsource was a no-go. * Creates a local p2 repository with those wrapped bundles with proper metadata so they can be used during build. * The (only) eclipse plug-in which contains tests (com.redhat.thermostat.eclipse.test) optionally imports those wrapped bundles. This allows us to run tests on Fedora whith stock libs (bundles are resolved only via Import-Package there, optional bundles are ignored). * It attaches the tycho surefire "test" goal to the "package" lifecycle phase so that tests are actually run with "mvn clean package" (default is to attach to integration-test only). * Added README.building with instructions as to how to build and run tests. Building Eclipse bits and run tests works as follows: $ cd path/to/$THERMOSTAT_HOME $ mvn clean install $ cd eclipse/test-deps-bundle-wrapping $ mvn clean install $ cd .. $ mvn clean package Reviewed-by: vanaltj Review-thread: http://icedtea.classpath.org/pipermail/thermostat/2012-September/003074.html
author Severin Gehwolf <sgehwolf@redhat.com>
date Thu, 13 Sep 2012 10:42:48 +0200
parents 8516a3c7ed22
children 966edcd4a8ce
files eclipse/README.building eclipse/com.redhat.thermostat.eclipse.test/META-INF/MANIFEST.MF eclipse/com.redhat.thermostat.eclipse.test/pom.xml eclipse/com.redhat.thermostat.eclipse.test/src/com/redhat/thermostat/eclipse/model/HostVmsTreeContentProviderTest.java eclipse/com.redhat.thermostat.eclipse.test/src/com/redhat/thermostat/eclipse/model/HostsVmsLabelProviderTest.java eclipse/com.redhat.thermostat.eclipse.test/src/com/redhat/thermostat/eclipse/test/Activator.java eclipse/com.redhat.thermostat.eclipse/META-INF/MANIFEST.MF eclipse/composite-repo/pom.xml eclipse/pom.xml eclipse/test-deps-bundle-wrapping/org.hamcrest/pom.xml eclipse/test-deps-bundle-wrapping/org.mockito/pom.xml eclipse/test-deps-bundle-wrapping/org.objenesis/pom.xml eclipse/test-deps-bundle-wrapping/pom.xml eclipse/test-deps-p2-repository/pom.xml
diffstat 14 files changed, 715 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eclipse/README.building	Thu Sep 13 10:42:48 2012 +0200
@@ -0,0 +1,7 @@
+# perhaps rm -rf ~/.m2
+cd path/to/thermostat/home
+mvn clean install
+cd eclipse/test-deps-bundle-wrapping
+mvn clean install
+cd ..
+mvn clean package
--- a/eclipse/com.redhat.thermostat.eclipse.test/META-INF/MANIFEST.MF	Wed Sep 12 21:37:33 2012 +0200
+++ b/eclipse/com.redhat.thermostat.eclipse.test/META-INF/MANIFEST.MF	Thu Sep 13 10:42:48 2012 +0200
@@ -1,12 +1,22 @@
 Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Version: 0.4.0.qualifier
-Fragment-Host: com.redhat.thermostat.eclipse;bundle-version="0.4.0.qualifier"
 Bundle-Name: Eclipse client tests
-Bundle-SymbolicName: com.redhat.thermostat.eclipse.test
+Bundle-Activator: com.redhat.thermostat.eclipse.test.Activator
+Bundle-SymbolicName: com.redhat.thermostat.eclipse.test;singleton:=true
 Bundle-Vendor: Redhat Inc.
-Require-Bundle: org.eclipse.jdt.core,
- org.junit;bundle-version="3.8.2"
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.junit;bundle-version="4.10.0",
+ com.redhat.thermostat.bundles.org.hamcrest.core;resolution:=optional,
+ com.redhat.thermostat.bundles.org.objenesis;resolution:=optional,
+ com.redhat.thermostat.bundles.org.mockito.mockito-core;resolution:=optional
 Bundle-RequiredExecutionEnvironment: JavaSE-1.7
-Import-Package: org.mockito,
+Import-Package: com.redhat.thermostat.common,
+ com.redhat.thermostat.common.dao,
+ com.redhat.thermostat.eclipse.model,
+ org.eclipse.core.resources,
+ org.eclipse.ui.ide,
+ org.mockito,
  org.mockito.stubbing
+Export-Package: com.redhat.thermostat.eclipse.test.model
--- a/eclipse/com.redhat.thermostat.eclipse.test/pom.xml	Wed Sep 12 21:37:33 2012 +0200
+++ b/eclipse/com.redhat.thermostat.eclipse.test/pom.xml	Thu Sep 13 10:42:48 2012 +0200
@@ -20,6 +20,35 @@
       <artifactId>thermostat-common-core</artifactId>
       <version>0.4.0-SNAPSHOT</version>
     </dependency>
+    <dependency>
+      <groupId>com.redhat.thermostat.eclipse.parent</groupId>
+      <artifactId>com.redhat.thermostat.eclipse.test-deps-repo</artifactId>
+      <version>0.4.0-SNAPSHOT</version>
+      <type>pom</type>
+    </dependency>
   </dependencies>
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.eclipse.tycho</groupId>
+        <artifactId>tycho-surefire-plugin</artifactId>
+        <version>${tycho-version}</version>
+        <!--
+        <configuration>
+          <useUIHarness>true</useUIHarness>
+          <useUIThread>false</useUIThread>
+          <product>org.eclipse.platform.ide</product>
+          <dependencies>
+            <dependency>
+              <type>p2-installable-unit</type>
+              <artifactId>org.eclipse.sdk.feature.group</artifactId>
+              <version>${sdk-version}</version>
+            </dependency>
+          </dependencies>   
+        </configuration>
+        -->
+      </plugin>
+    </plugins>
+  </build>
 
 </project>
--- a/eclipse/com.redhat.thermostat.eclipse.test/src/com/redhat/thermostat/eclipse/model/HostVmsTreeContentProviderTest.java	Wed Sep 12 21:37:33 2012 +0200
+++ b/eclipse/com.redhat.thermostat.eclipse.test/src/com/redhat/thermostat/eclipse/model/HostVmsTreeContentProviderTest.java	Thu Sep 13 10:42:48 2012 +0200
@@ -34,7 +34,7 @@
  * to do so, delete this exception statement from your version.
  */
 
-package com.redhat.thermostat.eclipse.model;
+package com.redhat.thermostat.eclipse.test.model;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
@@ -53,6 +53,8 @@
 import com.redhat.thermostat.common.HostsVMsLoader;
 import com.redhat.thermostat.common.dao.HostRef;
 import com.redhat.thermostat.common.dao.VmRef;
+import com.redhat.thermostat.eclipse.model.HostsVmsTreeContentProvider;
+import com.redhat.thermostat.eclipse.model.HostsVmsTreeRoot;
 
 public class HostVmsTreeContentProviderTest {
 
--- a/eclipse/com.redhat.thermostat.eclipse.test/src/com/redhat/thermostat/eclipse/model/HostsVmsLabelProviderTest.java	Wed Sep 12 21:37:33 2012 +0200
+++ b/eclipse/com.redhat.thermostat.eclipse.test/src/com/redhat/thermostat/eclipse/model/HostsVmsLabelProviderTest.java	Thu Sep 13 10:42:48 2012 +0200
@@ -34,7 +34,7 @@
  * to do so, delete this exception statement from your version.
  */
 
-package com.redhat.thermostat.eclipse.model;
+package com.redhat.thermostat.eclipse.test.model;
 
 import org.junit.After;
 import org.junit.Before;
@@ -47,6 +47,8 @@
 
 import com.redhat.thermostat.common.dao.HostRef;
 import com.redhat.thermostat.common.dao.VmRef;
+import com.redhat.thermostat.eclipse.model.HostsVmsLabelProvider;
+import com.redhat.thermostat.eclipse.model.HostsVmsTreeRoot;
 
 public class HostsVmsLabelProviderTest {
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eclipse/com.redhat.thermostat.eclipse.test/src/com/redhat/thermostat/eclipse/test/Activator.java	Thu Sep 13 10:42:48 2012 +0200
@@ -0,0 +1,92 @@
+/*
+ * 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.
+ */
+
+package com.redhat.thermostat.eclipse.test;
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+    // The plug-in ID
+    public static final String PLUGIN_ID = "com.redhat.thermostat.eclipse.test"; //$NON-NLS-1$
+
+    // The shared instance
+    private static Activator plugin;
+
+    /**
+     * The constructor
+     */
+    public Activator() {
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext
+     * )
+     */
+    public void start(BundleContext context) throws Exception {
+        super.start(context);
+        plugin = this;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext
+     * )
+     */
+    public void stop(BundleContext context) throws Exception {
+        plugin = null;
+        super.stop(context);
+    }
+
+    /**
+     * Returns the shared instance
+     * 
+     * @return the shared instance
+     */
+    public static Activator getDefault() {
+        return plugin;
+    }
+
+}
--- a/eclipse/com.redhat.thermostat.eclipse/META-INF/MANIFEST.MF	Wed Sep 12 21:37:33 2012 +0200
+++ b/eclipse/com.redhat.thermostat.eclipse/META-INF/MANIFEST.MF	Thu Sep 13 10:42:48 2012 +0200
@@ -7,8 +7,8 @@
 Bundle-Vendor: Red Hat Inc.
 Bundle-RequiredExecutionEnvironment: JavaSE-1.7
 Bundle-ActivationPolicy: lazy
-Require-Bundle: org.eclipse.core.runtime;bundle-version="3.8.0",
- org.eclipse.ui;bundle-version="3.103.0"
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.ui
 Import-Package: com.mongodb,
  com.redhat.thermostat.common,
  com.redhat.thermostat.common.appctx,
@@ -16,4 +16,6 @@
  com.redhat.thermostat.common.dao,
  com.redhat.thermostat.common.model,
  com.redhat.thermostat.common.storage
-Eclipse-ExtensibleAPI: true
+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/composite-repo/pom.xml	Wed Sep 12 21:37:33 2012 +0200
+++ b/eclipse/composite-repo/pom.xml	Thu Sep 13 10:42:48 2012 +0200
@@ -53,7 +53,7 @@
     <main.basedir>${project.basedir}/..</main.basedir>  
   </properties>
 
-  <name>Thermostat Eclipse Composite p2 Repo</name>
+  <name>Thermostat Eclipse :: Composite p2 Repo</name>
 
   <build>
     <plugins>
--- a/eclipse/pom.xml	Wed Sep 12 21:37:33 2012 +0200
+++ b/eclipse/pom.xml	Thu Sep 13 10:42:48 2012 +0200
@@ -95,6 +95,11 @@
     <module>com.redhat.thermostat.eclipse.feature</module>
     <module>com.redhat.thermostat.eclipse.p2-repo</module>
     <module>core-p2-repository</module>
+    <module>test-deps-bundle-wrapping</module>
+    <!-- Adds p2 metadata and creates repo for plain (wrapped)
+         Java OSGi bundles so they can be found for building and
+         running tycho tests -->
+    <module>test-deps-p2-repository</module>
     <module>composite-repo</module>
   </modules>
 
@@ -110,6 +115,11 @@
       <url>${orbit-site}</url>
     </repository>
     <repository>
+      <id>local_eclipse_test_deps</id>
+      <layout>p2</layout>
+      <url>file://${basedir}/../eclipse-test-deps-repo/target/repository/</url>
+    </repository>
+    <repository>
       <id>maven.eclipse.org</id>
       <url>http://maven.eclipse.org/nexus/content/groups/public/</url>
     </repository>
@@ -155,10 +165,29 @@
           </execution>
         </executions>
       </plugin>
+      <plugin>
+        <groupId>org.eclipse.tycho</groupId>
+        <artifactId>tycho-surefire-plugin</artifactId>
+        <version>${tycho-version}</version>
+        <executions>
+          <execution>
+            <id>run-tests-during-package</id>
+            <phase>package</phase>
+            <goals>
+              <goal>test</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
     </plugins>
     <pluginManagement>
       <plugins>
         <plugin>
+          <groupId>org.apache.felix</groupId>
+          <artifactId>maven-bundle-plugin</artifactId>
+          <version>2.3.7</version>
+        </plugin>
+        <plugin>
           <groupId>org.eclipse.tycho</groupId>
           <artifactId>tycho-compiler-plugin</artifactId>
           <version>${tycho-version}</version>
@@ -171,7 +200,7 @@
           <artifactId>tycho-surefire-plugin</artifactId>
           <version>${tycho-version}</version>
           <configuration>
-            <useUIHarness>false</useUIHarness>
+            <useUIHarness>true</useUIHarness>
             <useUIThread>flase</useUIThread>
             <dependencies>
               <dependency>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eclipse/test-deps-bundle-wrapping/org.hamcrest/pom.xml	Thu Sep 13 10:42:48 2012 +0200
@@ -0,0 +1,95 @@
+<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">
+
+<!-- 
+
+ 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.
+
+-->
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+      <groupId>com.redhat.thermostat.eclipse.parent</groupId>
+      <artifactId>thermostat-eclipse-test-deps</artifactId>
+      <version>0.4.0-SNAPSHOT</version>
+    </parent>
+
+    <groupId>org.hamcrest</groupId>
+    <artifactId>com.redhat.thermostat.bundles.org.hamcrest.core</artifactId>
+    <packaging>bundle</packaging>
+    <version>1.3</version>
+    <name>Thermostat Eclipse :: Bundles :: ${pkgArtifactId}</name>
+    <description>
+        This bundle simply wraps ${pkgArtifactId}-${pkgVersion}.jar.
+    </description>
+
+    <properties>
+        <pkgGroupId>org.hamcrest</pkgGroupId>
+        <pkgArtifactId>hamcrest-core</pkgArtifactId>
+        <pkgVersion>1.3</pkgVersion>
+    </properties>
+
+    <dependencies>
+        <dependency>
+            <groupId>${pkgGroupId}</groupId>
+            <artifactId>${pkgArtifactId}</artifactId>
+            <version>${pkgVersion}</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+      <plugins>
+        <plugin>
+          <groupId>org.apache.felix</groupId>
+          <artifactId>maven-bundle-plugin</artifactId>
+          <extensions>true</extensions>
+          <configuration>
+            <instructions>
+              <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
+              <Bundle-Version>1.3.0</Bundle-Version>
+              <Export-Package>
+                org.hamcrest.core;uses:="org.hamcrest";version="1.3",
+                org.hamcrest;uses:="org.hamcrest.internal,
+                org.hamcrest.core";version="1.3"
+              </Export-Package>
+              <Private-Package>org.hamcrest.internal</Private-Package>
+              <Import-Package>*</Import-Package>
+            </instructions>
+          </configuration>
+        </plugin>
+      </plugins>
+    </build>
+
+</project>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eclipse/test-deps-bundle-wrapping/org.mockito/pom.xml	Thu Sep 13 10:42:48 2012 +0200
@@ -0,0 +1,135 @@
+<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">
+
+<!-- 
+
+ 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.
+
+-->
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+      <groupId>com.redhat.thermostat.eclipse.parent</groupId>
+      <artifactId>thermostat-eclipse-test-deps</artifactId>
+      <version>0.4.0-SNAPSHOT</version>
+    </parent>
+
+    <groupId>org.mockito</groupId>
+    <artifactId>com.redhat.thermostat.bundles.org.mockito.mockito-core</artifactId>
+    <packaging>bundle</packaging>
+    <version>1.9.0</version>
+    <name>Thermostat Eclipse :: Bundles :: ${pkgArtifactId}</name>
+    <description>
+        This bundle simply wraps ${pkgArtifactId}-${pkgVersion}.jar.
+    </description>
+
+    <properties>
+        <pkgGroupId>org.mockito</pkgGroupId>
+        <pkgArtifactId>mockito-core</pkgArtifactId>
+        <pkgVersion>1.9.0</pkgVersion>
+    </properties>
+
+    <dependencies>
+        <dependency>
+            <groupId>${pkgGroupId}</groupId>
+            <artifactId>${pkgArtifactId}</artifactId>
+            <version>${pkgVersion}</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+      <plugins>
+        <plugin>
+          <groupId>org.apache.felix</groupId>
+          <artifactId>maven-bundle-plugin</artifactId>
+          <extensions>true</extensions>
+          <configuration>
+            <instructions>
+              <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
+              <Private-Package>
+                org.mockito.internal*,
+                org.mockito.cglib*,
+                org.mockito.asm*,
+                org.objenesis*,
+                org.hamcrest*,
+              </Private-Package>
+              <Export-Package>
+	       org.mockito.exceptions.base;version="1.9",
+               org.mockito.exceptions;
+                 uses:="org.mockito.exceptions.verification.junit,org.mockito.exceptions.base,
+                        org.mockito.listeners,org.mockito.exceptions.misusing,
+                        org.mockito.exceptions.verification";version="1.9",
+               org.mockito.exceptions.verification;
+                 uses:="org.mockito.exceptions.base";version="1.9",
+               org.mockito.stubbing.answers;
+                 uses:="org.mockito.exceptions.base,org.mockito.invocation,org.mockito.stubbing";
+                 version="1.9",
+               org.mockito.configuration;
+                 uses:="org.mockito,org.mockito.stubbing";version="1.9",
+               org.mockito.invocation;version="1.9",
+               org.mockito.exceptions.verification.junit;
+                 uses:="junit.framework,org.mockito.exceptions.verification";version="1.9",
+               org.mockito.listeners;uses:="org.mockito.exceptions";version="1.9",
+               org.mockito;
+                 uses:="org.hamcrest,org.mockito.stubbing,org.mockito.verification,
+                        org.mockito.listeners,org.mockito.exceptions.base,org.mockito.exceptions,
+                        org.mockito.configuration,org.mockito.invocation";version="1.9",
+               org.mockito.runners;
+                 uses:="org.junit.runner,org.junit.runner.notification,org.junit.runner.manipulation";
+                 version="1.9",
+               org.mockito.exceptions.misusing;uses:="org.mockito.exceptions.base";version="1.9",
+               org.mockito.verification;uses:="org.mockito.exceptions";version="1.9",
+               org.mockito.stubbing;uses:="org.mockito.invocation";version="1.9"
+              </Export-Package>
+              <Import-Package>
+                junit.*;resolution:=optional,
+                org.junit.*;resolution:=optional,
+                org.hamcrest;version="[1.3,2.0)",
+                org.objenesis;version="[1.0,2.0)",
+                org.apache.tools.ant;resolution:=optional,
+                org.apache.tools.ant.types;resolution:=optional,
+                COM.jrockit.reflect;resolution:=optional,
+                jrockit.vm;resolution:=optional,
+                sun.reflect;resolution:=optional,
+                org.mockito*
+              </Import-Package>
+              <_removeheaders>Private-Package</_removeheaders>
+            </instructions>
+          </configuration>
+        </plugin>
+      </plugins>
+    </build>
+
+</project>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eclipse/test-deps-bundle-wrapping/org.objenesis/pom.xml	Thu Sep 13 10:42:48 2012 +0200
@@ -0,0 +1,107 @@
+<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">
+
+<!-- 
+
+ 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.
+
+-->
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+      <groupId>com.redhat.thermostat.eclipse.parent</groupId>
+      <artifactId>thermostat-eclipse-test-deps</artifactId>
+      <version>0.4.0-SNAPSHOT</version>
+    </parent>
+
+    <groupId>org.objenesis</groupId>
+    <artifactId>com.redhat.thermostat.bundles.org.objenesis</artifactId>
+    <packaging>bundle</packaging>
+    <version>1.0</version>
+    <name>Thermostat Eclipse :: Bundles :: ${pkgArtifactId}</name>
+    <description>
+        This bundle simply wraps ${pkgArtifactId}-${pkgVersion}.jar.
+    </description>
+
+    <properties>
+        <pkgGroupId>org.objenesis</pkgGroupId>
+        <pkgArtifactId>objenesis</pkgArtifactId>
+        <pkgVersion>1.0</pkgVersion>
+    </properties>
+
+    <dependencies>
+        <dependency>
+            <groupId>${pkgGroupId}</groupId>
+            <artifactId>${pkgArtifactId}</artifactId>
+            <version>${pkgVersion}</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+      <plugins>
+        <plugin>
+          <groupId>org.apache.felix</groupId>
+          <artifactId>maven-bundle-plugin</artifactId>
+          <extensions>true</extensions>
+          <configuration>
+            <instructions>
+              <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
+              <Export-Package>
+                org.objenesis.instantiator.jrockit;version="1.0",
+                org.objenesis;version="1.0",
+                org.objenesis.strategy;version="1.0",
+                org.objenesis.instantiator;version="1.0",
+                org.objenesis.instantiator.basic;version="1.0",
+                org.objenesis.instantiator.sun;version="1.0",
+                org.objenesis.instantiator.gcj;version="1.0"
+              </Export-Package>
+              <Import-Package>
+                !COM.jrockit*,!jrockit.vm*,!sun.reflect,
+                org.objenesis.instantiator.jrockit;version="1.0",
+                org.objenesis;version="1.0",
+                org.objenesis.strategy;version="1.0",
+                org.objenesis.instantiator;version="1.0",
+                org.objenesis.instantiator.basic;version="1.0",
+                org.objenesis.instantiator.sun;version="1.0",
+                org.objenesis.instantiator.gcj;version="1.0"
+              </Import-Package>
+              <_nouses>true</_nouses>
+            </instructions>
+          </configuration>
+        </plugin>
+      </plugins>
+    </build>
+
+</project>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eclipse/test-deps-bundle-wrapping/pom.xml	Thu Sep 13 10:42:48 2012 +0200
@@ -0,0 +1,72 @@
+<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">
+<!-- 
+
+ 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.
+
+-->
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+      <groupId>com.redhat.thermostat.eclipse.parent</groupId>
+      <artifactId>thermostat-eclipse-parent</artifactId>
+      <version>0.4.0-SNAPSHOT</version>
+    </parent>
+
+    <!-- Prepares test deps into proper bundles
+         (mockito was especially tricky so please keep this) -->
+    <artifactId>thermostat-eclipse-test-deps</artifactId>
+    <packaging>pom</packaging>
+
+    <name>Thermostat Eclipse :: Test Deps :: Bundles</name>
+
+    <modules>
+      <module>org.hamcrest</module>
+      <module>org.objenesis</module>
+      <module>org.mockito</module>
+    </modules>
+    <build>
+      <plugins>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-surefire-plugin</artifactId>
+          <version>2.12</version>
+          <configuration>
+            <skipTests>true</skipTests>
+          </configuration>
+        </plugin>
+      </plugins>
+    </build>
+
+</project>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eclipse/test-deps-p2-repository/pom.xml	Thu Sep 13 10:42:48 2012 +0200
@@ -0,0 +1,121 @@
+<?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 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <artifactId>thermostat-eclipse-parent</artifactId>
+    <groupId>com.redhat.thermostat.eclipse.parent</groupId>
+    <version>0.4.0-SNAPSHOT</version>
+  </parent>
+  <groupId>com.redhat.thermostat.eclipse.parent</groupId>
+  <artifactId>com.redhat.thermostat.eclipse.test-deps-repo</artifactId>
+  <version>0.4.0-SNAPSHOT</version>
+
+  <name>Thermostat Eclipse :: p2 repository for plain Java test deps</name>
+
+  <!-- Need to make deps proper bundles in order to be able to
+       generate metadata and p2 repo for it -->
+  <dependencies>
+    <dependency>
+      <groupId>com.redhat.thermostat.eclipse.parent</groupId>
+      <artifactId>thermostat-eclipse-test-deps</artifactId>
+      <version>0.4.0-SNAPSHOT</version>
+      <!-- we need this since test deps wrapping does not produce a jar
+           which is default -->
+      <type>pom</type>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <plugins>
+      <!-- Configuration for the PublishFeaturesAndBundlesMojoTest -->
+      <plugin>
+        <groupId>org.eclipse.tycho.extras</groupId>
+        <artifactId>tycho-p2-extras-plugin</artifactId>
+        <version>${tycho-version}</version>
+        <executions>
+          <execution>
+            <phase>prepare-package</phase>
+            <goals>
+              <goal>publish-features-and-bundles</goal>
+            </goals>
+          </execution>
+        </executions>
+        <configuration>
+          <compress>true</compress>
+        </configuration>
+      </plugin>
+      <plugin>
+        <artifactId>maven-dependency-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>copy-bundles-for-publishing</id>
+            <phase>process-resources</phase>
+            <goals>
+              <goal>copy</goal>
+            </goals>
+            <configuration>
+              <artifactItems>
+                <artifactItem>
+                  <groupId>org.hamcrest</groupId>
+                  <artifactId>com.redhat.thermostat.bundles.org.hamcrest.core</artifactId>
+                  <version>1.3</version>
+                </artifactItem>
+                <artifactItem>
+                  <groupId>org.mockito</groupId>
+                  <artifactId>com.redhat.thermostat.bundles.org.mockito.mockito-core</artifactId>
+                  <version>1.9.0</version>
+                </artifactItem>
+                <artifactItem>
+                  <groupId>org.objenesis</groupId>
+                  <artifactId>com.redhat.thermostat.bundles.org.objenesis</artifactId>
+                  <version>1.0</version>
+                </artifactItem>
+              </artifactItems>
+              <outputDirectory>${project.basedir}/target/source/plugins</outputDirectory>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+
+  <packaging>pom</packaging>
+</project>