Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] problems with Compendium bundles at tycho-surefire

Out of curiosity, why do you have that many <dependency> elements under
tycho-surefire-plugin configuration? Tycho is expected to determine
all/most test runtime dependencies based on test bundle manifest, so
listing them explicitly should not be necessary.

--
Regards,
Igor

On 12-01-30 1:42 PM, Cristiano Gavião wrote:
Hi Igor,

I've improved my tests and added compendium bundles (Log, DS and CM) as
dependencies and add them to a proper start level to tycho-surefire
plugin [1] and [2].

At Tycho-Surefire, only org.eclipse.equinox.ds test statement is
passing, the same is not happen with others compendium bundles...

please, could you point me what am I doing wrong this time ? :(

This log shows me that a lot of bundles that are declared in test
dependencies are not being referenced and not being loaded. but there
are one specific bundle (market below) that is not declared being
referenced:
[INFO] Adding repository (cached)
http://download.eclipse.org/tools/orbit/downloads/drops/S20120123151124/repository/
[DEBUG] Added p2 repository Orbit
(http://download.eclipse.org/tools/orbit/downloads/drops/S20120123151124/repository/)
[INFO] Adding repository (cached)
http://download.eclipse.org/releases/indigo
[DEBUG] Added p2 repository Eclipse
(http://download.eclipse.org/releases/indigo)
[DEBUG] Registered artifact repository
org.eclipse.tycho.repository.registry.facade.RepositoryBlackboardKey(uri=file:/resolution-context-artifacts@/Users/cvgaviao/Development/C4Biz_Projects/OsgiUtilities/com.c4biz.osgiutils.tests)
[DEBUG] Added 0 locally built units to the target platform
[DEBUG] Using test framework org.junit4
[DEBUG] Installation OSGI bundles:
[DEBUG]
reference:file:/Users/cvgaviao/Development/C4Biz_Projects/OsgiUtilities/com.c4biz.osgiutils.assertions/target/com.c4biz.osgiutils.assertions-0.0.1-SNAPSHOT.jar
[DEBUG]
reference:file:/Users/cvgaviao/.m2/repository/p2/osgi/bundle/org.junit/4.8.2.v4_8_2_v20110321-1705/org.junit-4.8.2.v4_8_2_v20110321-1705.jar
[DEBUG]
reference:file:/Users/cvgaviao/Development/C4Biz_Projects/OsgiUtilities/com.c4biz.osgiutils.configuration.manager/target/com.c4biz.osgiutils.configuration.manager-0.0.1-SNAPSHOT.jar@2:start
[DEBUG]
reference:file:/Users/cvgaviao/.m2/repository/p2/osgi/bundle/org.eclipse.equinox.ds/1.3.1.R37x_v20110701/org.eclipse.equinox.ds-1.3.1.R37x_v20110701.jar@1:start
*[DEBUG]
reference:file:/Users/cvgaviao/.m2/repository/p2/osgi/bundle/osgi.enterprise/4.2.0.v201108120515/osgi.enterprise-4.2.0.v201108120515.jar
*[DEBUG]
reference:file:/Users/cvgaviao/Development/C4Biz_Projects/OsgiUtilities/com.c4biz.osgiutils.configuration.manager.test.conf/target/com.c4biz.osgiutils.configuration.manager.test.conf-0.0.1-SNAPSHOT.jar
[DEBUG]
reference:file:/Users/cvgaviao/Development/C4Biz_Projects/OsgiUtilities/com.c4biz.osgiutils.tests
[DEBUG]
reference:file:/Users/cvgaviao/.m2/repository/p2/osgi/bundle/org.hamcrest/1.1.0.v20090501071000/org.hamcrest-1.1.0.v20090501071000.jar
[DEBUG]
reference:file:/Users/cvgaviao/.m2/repository/p2/osgi/bundle/org.eclipse.core.contenttype/3.4.100.v20110423-0524/org.eclipse.core.contenttype-3.4.100.v20110423-0524.jar
[DEBUG]
reference:file:/Users/cvgaviao/.m2/repository/p2/osgi/bundle/org.eclipse.equinox.preferences/3.4.1.R37x_v20110725/org.eclipse.equinox.preferences-3.4.1.R37x_v20110725.jar
[DEBUG]
reference:file:/Users/cvgaviao/.m2/repository/p2/osgi/bundle/org.eclipse.equinox.registry/3.5.101.R37x_v20110810-1611/org.eclipse.equinox.registry-3.5.101.R37x_v20110810-1611.jar
[DEBUG]
reference:file:/Users/cvgaviao/.m2/repository/p2/osgi/bundle/org.eclipse.equinox.common/3.6.0.v20110523/org.eclipse.equinox.common-3.6.0.v20110523.jar@1:start
[DEBUG]
reference:file:/Users/cvgaviao/.m2/repository/p2/osgi/bundle/org.eclipse.core.jobs/3.5.100.v20110404/org.eclipse.core.jobs-3.5.100.v20110404.jar
[DEBUG]
reference:file:/Users/cvgaviao/.m2/repository/p2/osgi/bundle/org.eclipse.core.runtime/3.7.0.v20110110/org.eclipse.core.runtime-3.7.0.v20110110.jar@4:start
[DEBUG]
reference:file:/Users/cvgaviao/.m2/repository/p2/osgi/bundle/org.eclipse.core.runtime.compatibility.auth/3.2.200.v20110110/org.eclipse.core.runtime.compatibility.auth-3.2.200.v20110110.jar
[DEBUG]
reference:file:/Users/cvgaviao/.m2/repository/p2/osgi/bundle/org.eclipse.equinox.app/1.3.100.v20110321/org.eclipse.equinox.app-1.3.100.v20110321.jar
[DEBUG]
reference:file:/Users/cvgaviao/.m2/repository/p2/osgi/bundle/org.eclipse.equinox.util/1.0.300.v20110502/org.eclipse.equinox.util-1.0.300.v20110502.jar
[DEBUG]
reference:file:/Users/cvgaviao/.m2/repository/p2/osgi/bundle/org.hamcrest.core/1.1.0.v20090501071000/org.hamcrest.core-1.1.0.v20090501071000.jar
[DEBUG]
reference:file:/Users/cvgaviao/.m2/repository/p2/osgi/bundle/org.hamcrest.library/1.1.0.v20090501071000/org.hamcrest.library-1.1.0.v20090501071000.jar
[DEBUG]
reference:file:/Users/cvgaviao/.m2/repository/p2/osgi/bundle/org.hamcrest.integration/1.1.0.v20090501071000/org.hamcrest.integration-1.1.0.v20090501071000.jar
[DEBUG]
reference:file:/Users/cvgaviao/.m2/repository/p2/osgi/bundle/org.hamcrest.text/1.1.0.v20090501071000/org.hamcrest.text-1.1.0.v20090501071000.jar
[DEBUG]
reference:file:/Users/cvgaviao/.m2/repository/p2/osgi/bundle/org.eclipse.equinox.launcher/1.2.0.v20110502/org.eclipse.equinox.launcher-1.2.0.v20110502.jar
[DEBUG]
reference:file:/Users/cvgaviao/.m2/repository/org/eclipse/tycho/org.eclipse.tycho.surefire.osgibooter/0.14.0-SNAPSHOT/org.eclipse.tycho.surefire.osgibooter-0.14.0-SNAPSHOT.jar
[DEBUG]
reference:file:/Users/cvgaviao/.m2/repository/org/eclipse/tycho/org.eclipse.tycho.surefire.junit4/0.14.0-SNAPSHOT/org.eclipse.tycho.surefire.junit4-0.14.0-SNAPSHOT.jar


[1] plugin configuration

<plugins>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-surefire-plugin</artifactId>
<version>${tycho-version}</version>
<configuration>
<includes>
<include>**/*Test.class</include>
</includes>
<failIfNoTests>false</failIfNoTests>
<showEclipseLog>true</showEclipseLog>
<!-- <argLine>${ui.test.vmargs}</argLine> -->
<bundleStartLevel>
<bundle>
<id>org.eclipse.osgi</id>
<level>-1</level>
<autoStart>true</autoStart>
</bundle>
<bundle>
<id>org.eclipse.equinox.common</id>
<level>1</level>
<autoStart>true</autoStart>
</bundle>
<bundle>
<id>org.eclipse.equinox.ds</id>
<level>1</level>
<autoStart>true</autoStart>
</bundle>
<bundle>
<id>org.eclipse.equinox.cm</id>
<level>1</level>
<autoStart>true</autoStart>
</bundle>
<bundle>
<id>org.eclipse.equinox.log</id>
<level>1</level>
<autoStart>true</autoStart>
</bundle>
<bundle>
<id>org.eclipse.osgi.services</id>
<level>1</level>
<autoStart>true</autoStart>
</bundle>
<bundle>
<id>com.c4biz.osgiutils.configuration.manager</id>
<level>2</level>
<autoStart>true</autoStart>
</bundle>
</bundleStartLevel>

<dependencies>
<dependency>
<type>instalable-unit</type>
<artifactId>org.eclipse.core.runtime</artifactId>
<version>0.0.0</version>
</dependency>
<dependency>
<type>instalable-unit</type>
<artifactId>org.eclipse.core.jobs</artifactId>
<version>0.0.0</version>
</dependency>
<dependency>
<type>instalable-unit</type>
<artifactId>org.eclipse.osgi</artifactId>
<version>0.0.0</version>
</dependency>
<dependency>
<type>instalable-unit</type>
<artifactId>org.eclipse.equinox.common</artifactId>
<version>0.0.0</version>
</dependency>
<dependency>
<type>instalable-unit</type>
<artifactId>org.eclipse.equinox.event</artifactId>
<version>0.0.0</version>
</dependency>
<dependency>
<type>instalable-unit</type>
<artifactId>org.eclipse.osgi.services</artifactId>
<version>0.0.0</version>
</dependency>
<dependency>
<type>instalable-unit</type>
<artifactId>org.eclipse.osgi.util</artifactId>
<version>0.0.0</version>
</dependency>
<dependency>
<type>instalable-unit</type>
<artifactId>org.eclipse.equinox.cm</artifactId>
<version>0.0.0</version>
</dependency>
<dependency>
<type>instalable-unit</type>
<artifactId>org.eclipse.equinox.app</artifactId>
<version>0.0.0</version>
</dependency>
<dependency>
<type>instalable-unit</type>
<artifactId>org.eclipse.equinox.registry</artifactId>
<version>0.0.0</version>
</dependency>
<dependency>
<type>instalable-unit</type>
<artifactId>org.eclipse.equinox.ds</artifactId>
<version>0.0.0</version>
</dependency>
<dependency>
<type>instalable-unit</type>
<artifactId>org.eclipse.equinox.log</artifactId>
<version>0.0.0</version>
</dependency>
<dependency>
<type>instalable-unit</type>
<artifactId>org.eclipse.equinox.preferences</artifactId>
<version>0.0.0</version>
</dependency>
<dependency>
<type>instalable-unit</type>
<artifactId>org.eclipse.equinox.util</artifactId>
<version>0.0.0</version>
</dependency>
<dependency>
<type>instalable-unit</type>
<artifactId>org.eclipse.equinox.weaving.hook</artifactId>
<version>0.0.0</version>
</dependency>
<dependency>
<type>instalable-unit</type>
<artifactId>javax.xml</artifactId>
<version>0.0.0</version>
</dependency>
<dependency>
<type>instalable-unit</type>
<artifactId>org.eclipse.equinox.app</artifactId>
<version>0.0.0</version>
</dependency>
<dependency>
<type>instalable-unit</type>
<artifactId>org.eclipse.equinox.transforms.hook</artifactId>
<version>0.0.0</version>
</dependency>
<dependency>
<type>instalable-unit</type>
<artifactId>org.hamcrest.core</artifactId>
<version>0.0.0</version>
</dependency>
<dependency>
<type>instalable-unit</type>
<artifactId>org.hamcrest.integration</artifactId>
<version>0.0.0</version>
</dependency>
<dependency>
<type>instalable-unit</type>
<artifactId>org.hamcrest.library</artifactId>
<version>0.0.0</version>
</dependency>
<dependency>
<type>instalable-unit</type>
<artifactId>org.hamcrest.text</artifactId>
<version>0.0.0</version>
</dependency>
<dependency>
<type>instalable-unit</type>
<artifactId>org.hamcrest</artifactId>
<version>0.0.0</version>
</dependency>
<dependency>
<type>instalable-unit</type>
<artifactId>org.junit</artifactId>
<version>0.0.0</version>
</dependency>

<!-- Plugins -->
<dependency>
<type>eclipse-plugin</type>
<artifactId>com.c4biz.osgiutils.assertions</artifactId>
<version>0.0.0</version>
</dependency>
<dependency>
<type>eclipse-plugin</type>
<artifactId>com.c4biz.osgiutils.tests</artifactId>
<version>0.0.0</version>
</dependency>
<dependency>
<type>eclipse-plugin</type>
<artifactId>com.c4biz.osgiutils.configuration.manager</artifactId>
<version>0.0.0</version>
</dependency>
<dependency>
<type>eclipse-plugin</type>
<artifactId>com.c4biz.osgiutils.configuration.manager.test.conf</artifactId>
<version>0.0.0</version>
</dependency>
</dependencies>

<excludes>
<!-- test mojo matches TestProject be default and treats it as
PojoTest -->
<!-- <exclude>**/Test*.class</exclude> -->
</excludes>
<useUIHarness>false</useUIHarness>
<useUIThread>false</useUIThread>
</configuration>
</plugin>

[2] my test
@Test
public void ensureConfigurationServiceIsRegistered() {

// assert com.c4biz.osgiutils.assertions is ok
BundleAssert.assertBundleAvailable("Assertions bundle is not available",
"com.c4biz.osgiutils.assertions");

// assert org.eclipse.equinox.ds is ok
BundleAssert.assertBundleAvailable("DS bundle is not available",
"org.eclipse.equinox.ds");

// assert org.eclipse.osgi.services is ok
BundleAssert.assertBundleAvailable("Services bundle is not available",
"org.eclipse.osgi.services");

// assert org.eclipse.equinox.log is ok
BundleAssert.assertBundleAvailable("Log bundle is not available",
"org.eclipse.equinox.log");



_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/tycho-user


Back to the top