Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] What causes "Could not determine SWT implementation fragment bundle"?

Short answer, this is expected to work without any configuration on your
part, see for example tycho demo project [1]. For more specific answer,
we'll need an example project that we can use to reproduce the problem.

There is not enough metadata to "properly" resolve SWT from p2
repositories and we needed to workaround this in Tycho. The code you
quoted tries to find SWT fragment that matches requested os/ws/arch
among all bundles available from p2 repositories accessible by the build.

You can enable detailed Tych dependency resolution debug log using "-X
-Dtycho.debug.resolver=<artifactId>" command line parameters. This,
among other things, will dump complete list of all P2 installable units
accessible by the build as well as information about os/ws/arch
parameters used during the resolution. Hopefully, this will allow you to
understand if your p2 mirror misses required SWT fragments or Tycho
can't find the fragments for some other reason.

[1] http://git.eclipse.org/c/tycho/org.eclipse.tycho.git/tree/tycho-demo/itp01

--
Regards,
Igor

On 11-11-02 9:45 AM, Aaron Digulla wrote:
Hello,

I'm one step further converting our PDE project to Tycho. This time, SWT
causes my grief. When I run the build, I get this error:

Caused by: java.lang.RuntimeException: Could not determine SWT
implementation fragment bundle
at
org.eclipse.tycho.p2.impl.resolver.ProjectorResolutionStrategy.fixSWT(ProjectorResolutionStrategy.java:151)

at
org.eclipse.tycho.p2.impl.resolver.ProjectorResolutionStrategy.resolve(ProjectorResolutionStrategy.java:110)


I have the delta pack in the p2 repo which is used for the build and I
have environments defined but no target platform. I use a target
platform to fill my p2 mirror but I can't use that because p2's fucked
up caching causes 15-20 minute delays during the build.

What causes the error? From the source, I see:

if ( iu.getId().startsWith( "org.eclipse.swt" )
&& isApplicable( newSelectionContext, iu.getFilter() ) )

It seems that either the filter or the "newSelectionContext" is wrong
somehow. What should be in there and how do I get it in there from my POM?

Note that the build should work automatically on Linux and Windows
without any special command line options to Maven (so "mvn install" must
just work on any environment).

Also note that I'm not building a product but a simple UI plugin so the
RCP examples are not very useful for me.

Regards,



Back to the top