Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] Weird error when using p2-installable-unit

See inline

--
Regards,
Igor

On 11-11-26 5:54 AM, Max Rydahl Andersen wrote:
Hi,

Im trying to resolve an issue in our test runs where it works when we run with all optional dependencies in PDE but it fails when running without optional in PDE and equally so in Tycho.

In PDE I just need to add "org.eclipse.jdt.launching.macosx" to make the tests pass, but in Tycho that does not help and to top it off I'm getting a weird error:

I started trying to use:

<dependency>
   <type>p2-installable-unit</type>
   <artifactId>org.eclipse.jdt.launching.macosx</artifactId>
    <version>0.0.0</version>
</dependency>

But this give me this really weird error:

[ERROR] Failed to execute goal org.eclipse.tycho:tycho-surefire-plugin:0.13.0:test (default-test) on project org.jboss.tools.ws.jaxrs.core.test: Execution default-test of goal org.eclipse.tycho:tycho-surefire-plugin:0.13.0:test failed: "No solution found because the problem is unsatisfiable.": ["Unable to satisfy dependency from extra-1322304115336 0.0.0.1322304115336 to org.eclipse.jdt.launching.macosx 0.0.0.", "Unable to satisfy dependency from 1322304115347 0.0.0.1322304115347 to org.eclipse.jdt.launching.macosx 0.0.0.", "No solution found because the problem is unsatisfiable."] ->  [Help 1]

I don't see anywhere where that "extra-1322304115336"  is coming from ?


What environment(s) do you run the tests on? Did you put
o.e.jdt.launching.macosx test dependency in OSX-specific profile, like
we did for m2e tests [1]?

[1] https://github.com/sonatype/m2e-core-tests/blob/master/pom.xml


If I use:

<dependency>
   <type>eclipse-fragment</type>
   <artifactId>org.eclipse.jdt.launching.macosx</artifactId>
    <version>0.0.0</version>
</dependency>

It loads and the bundle is visible at runtime but i'm still getting test failures.


Thus three questions:

1) Why is Tycho complaining with that error ? it also seem to happen when I just add it to even basic tests with no extra dependencies.
…or at least any tip on debugging where it is finding extra-* references?

extra-* is an internal installable unit tycho generates to represent
<dependency/> elements. Just ignore it.


2) Any tips on tracking down which optional dependencies that are magically missing ? (eclipse got about 71 plugins marked as optional so its like looking for a needle in a haystack)

3) Is there any way for a test run to enable "get all the optional dependencies" so it simulates what happens in PDE when launching with "all optional" ? At least so I can verify it actually works
in Tycho too when "everything" is installed ?

Not possible now, but in 0.14 there will be resolver flag that will let
you choose between forcing all optional dependencies as required or
ignoring them altogether (in the latter case it will still be possible
to add specific dependencies back).

This support is currently implemented on 351842_optionalDependencies
branch, waiting for my p2 patches to be reviewed and applied.

https://bugs.eclipse.org/bugs/show_bug.cgi?id=351842


Any hints appreciated, thanks
/max
http://about.me/maxandersen


Back to the top