Mercurial > hg > release > thermostat-0.4
view eclipse/com.redhat.thermostat.eclipse.test/pom.xml @ 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 | 7f564b061056 |
children |
line wrap: on
line source
<?xml version="1.0" encoding="UTF-8"?> <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</artifactId> <packaging>eclipse-test-plugin</packaging> <version>0.4.0-SNAPSHOT</version> <name>Thermostat Eclipse Client Tests</name> <dependencies> <dependency> <groupId>com.redhat.thermostat</groupId> <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>