[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [m2e-dev] testing m2e conectors
|
Did you check
/home/rafal/workspaces/maven-extensions-host/maven-extensions/connectors/modules/javacc/tests/target/work/data/.metadata/.log
?
Most likely OSGi runtime could not find all dependencies of your test
bundle and that log file should tell what is missing exactly.
--
Regards,
Igor
On 11-07-01 4:06 AM, Rafał Krzewski wrote:
Hi,
I am trying to add plugin tests to my m2e connectors
(https://github.com/objectledge/maven-extensions/tree/master/connectors)
I am trying to write a test for my JavaCC connector modeling it after
antlr connector test from m2eclipse-extras and I have run into a problem.
I got to a point where the plugin compiles correctly and Eclipse starts
for running the test but then it fails claiming that the test bundle was
not found.
Here's the relevant part of build output:
[INFO]
------------------------------------------------------------------------
[INFO] Building JavaCC connector - tests 1.0.0-SNAPSHOT
[INFO]
------------------------------------------------------------------------
[INFO]
[INFO] --- tycho-packaging-plugin:0.12.0:build-qualifier
(default-build-qualifier) @ tests ---
[INFO]
[INFO] --- tycho-packaging-plugin:0.12.0:validate-version
(default-validate-version) @ tests ---
[INFO]
[INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @
tests ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory
/home/rafal/workspaces/maven-extensions-host/maven-extensions/connectors/modules/javacc/tests/src/main/resources
[INFO]
[INFO] --- tycho-compiler-plugin:0.12.0:compile (default-compile) @
tests ---
[INFO] Using compile source roots from build.properties
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.4.3:testResources
(default-testResources) @ tests ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory
/home/rafal/workspaces/maven-extensions-host/maven-extensions/connectors/modules/javacc/tests/src/test/resources
[INFO]
[INFO] --- tycho-compiler-plugin:0.12.0:testCompile
(default-testCompile) @ tests ---
[INFO] Using compile source roots from build.properties
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- tycho-packaging-plugin:0.12.0:package-plugin
(default-package-plugin) @ tests ---
[INFO] Building jar:
/home/rafal/workspaces/maven-extensions-host/maven-extensions/connectors/modules/javacc/tests/target/tests-1.0.0-SNAPSHOT.jar
[INFO]
[INFO] --- tycho-p2-plugin:0.12.0:p2-metadata (default-p2-metadata) @
tests ---
[INFO]
[INFO] --- tycho-surefire-plugin:0.12.0:test (default-test) @ tests ---
[INFO] Adding repository (cached)
http://download.eclipse.org/technology/m2e/milestones/1.0
[INFO] Adding repository (cached)
http://download.eclipse.org/releases/helios
[INFO] Adding repository (cached)
http://download.eclipse.org/technology/swtbot/helios/dev-build/update-site
[INFO] Expected eclipse log file:
/home/rafal/workspaces/maven-extensions-host/maven-extensions/connectors/modules/javacc/tests/target/work/data/.metadata/.log
[INFO] Command line:
/bin/sh -c cd
/home/rafal/workspaces/maven-extensions-host/maven-extensions/connectors/modules/javacc/tests
&& /usr/lib/jvm/java-6-sun-1.6.0.24/jre/bin/java -Dosgi.noShutdown=false
-Dosgi.os=linux -Dosgi.ws=gtk -Dosgi.arch=x86_64 -Xmx800m
-XX:MaxPermSize=256m -jar
/home/rafal/.m2/repository/p2/osgi/bundle/org.eclipse.equinox.launcher/1.1.1.R36x_v20101122_1400/org.eclipse.equinox.launcher-1.1.1.R36x_v20101122_1400.jar
-data
/home/rafal/workspaces/maven-extensions-host/maven-extensions/connectors/modules/javacc/tests/target/work/data
-dev
file:/home/rafal/workspaces/maven-extensions-host/maven-extensions/connectors/modules/javacc/tests/target/dev.properties
-install
/home/rafal/workspaces/maven-extensions-host/maven-extensions/connectors/modules/javacc/tests/target/work
-configuration
/home/rafal/workspaces/maven-extensions-host/maven-extensions/connectors/modules/javacc/tests/target/work/configuration
-application org.eclipse.tycho.surefire.osgibooter.uitest
-testproperties
/home/rafal/workspaces/maven-extensions-host/maven-extensions/connectors/modules/javacc/tests/target/surefire.properties
java.lang.RuntimeException: Bundle
org.objectledge.maven.connectors.javacc.tests is not found
at
org.eclipse.tycho.surefire.osgibooter.OsgiSurefireBooter.getBundleClassLoader(OsgiSurefireBooter.java:120)
at
org.eclipse.tycho.surefire.osgibooter.OsgiSurefireBooter.run(OsgiSurefireBooter.java:48)
at
org.eclipse.tycho.surefire.osgibooter.AbstractUITestApplication$1.run(AbstractUITestApplication.java:35)
I've checked the contents of target directory and contents of
tests-1.0.0-SNAPSHOT.jar (including META-INF/MANIFEST.MF) ,
p2artifacts.xml, p2contents.xml look fine to me. I've also re-read
available docs, and went back and forth over the sources of
m2eclipse-extras tests several times and I have not been able to spot
the difference.
Source code is here
https://github.com/objectledge/maven-extensions/tree/master/connectors/modules/javacc/tests
I'm probably missing some obvious bit because I'm just learning OSGi /
Tycho / Eclipse internals... If someone could lend me a spare set of
eyes, I'd appreciate it :)
cheers,
Rafał
_______________________________________________
m2e-dev mailing list
m2e-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/m2e-dev