Hansen,
Currently Tycho assumes that test projects have direct dependency on
either org.junit or org.junit4 bundles. This is probably too
restrictive, so feel free to enter enhancement request in JIRA [1].
In the mean time, you can add junit dependency directly to your test
project using something like
Require-Bundle: pac_third_party_test;bundle-version="1.0.0",org.junit
[1] http://jira.codehaus.org/browse/MNGECLIPSE
--
Regards,
Igor
Hansen Candrawinata wrote:
Hi Igor,
Sorry, I still could not get it to work.
Igor Fedorenko-4 wrote:
Error message "Could not determine test framework used by test bundle
pac_core.tests_1.0.0.qualifier" means that this project does not depend
on org.junit/org.junit4 and tycho does not know how to run it.
I have actually declared a dependency to another plugin that contains junit
libraries. Here is the MANIFEST.MF of the project:
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Tests Fragment
Bundle-SymbolicName: pac_core.tests
Bundle-Version: 1.0.0
Fragment-Host: pac_core;bundle-version="1.0.0"
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Require-Bundle: pac_third_party_test;bundle-version="1.0.0"
pac_third_party_test contains the junit libraries. Is this the right way to
do it? I could run the junit test case from within Eclipse, but not from
CLI with Tycho. I still always get the same exception "Caused by:
org.apache.maven.plugin.MojoExecutionException: Could not determine test
framework used by test bundle pac_core.tests_1.0.0".
I have also tried adding the junit.jar into the Bundle-ClassPath
(Bundle-ClassPath: junit.jar), but this time another exception was thrown:
Error stacktrace:
org.apache.maven.ProjectBuildFailureException: Build for project:
periodical:Bundle-SymbolicName:eclipse-test-plugin:1.0.0-SNAPSHOT failed
during execution of mojo:
org.codehaus.tycho:maven-osgi-compiler-plugin:0.3.0-DEV-1819:compile
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmentForProject(DefaultLifecycleExecutor.java:316)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:214)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:172)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:218)
at
org.apache.maven.embedder.MavenEmbedder.execute(MavenEmbedder.java:899)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:176)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:63)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at
org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at
org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:408)
at
org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:351)
Caused by:
org.codehaus.tycho.osgicompiler.copied.CompilationFailureException:
Compilation failure
at
org.codehaus.tycho.osgicompiler.copied.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:404)
at
org.codehaus.tycho.osgicompiler.AbstractOsgiCompilerMojo.execute(AbstractOsgiCompilerMojo.java:107)
at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:623)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:521)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmentForProject(DefaultLifecycleExecutor.java:288)
... 14 more
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email