Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[tycho-user] Optional platform-specific plugin with filter fails to resolve

Hello,

I recently had to work on my OSS project on a Mac and noticed that the command-line build was failing due to an integration-test.

This test runs fine on Windows and also runs fine on OS X from within Eclipse, but fails from command-line on OS X and as I explain in this JDT forum post ( https://www.eclipse.org/forums/index.php/t/1101444/ ) the reason was that Tycho was missing an OS X specific plugin called "org.eclipse.jdt.launching.macosx" which was causing my integration test to fail. This plugin is required for JRE detection in OS X, so while things worked in Windows and also in OS X from within Eclipse, when Tycho ran my tests it was creating a workspace/configuration without it and thus the "test workspace" was missing the JRE (which was significant for my test).

I added "org.eclipse.jdt.launching.macosx" as an optional dependence of the integration test plugin. It has a platform filter which (according to the documentation Help - Eclipse Platform) should be ignored in targets that don't match it. This fixes the integration test PARTLY because now I am forced to run it with a platform-specific target where my target-platform-configuration only has a single environment (macosx/cocoa/x86_64).

However, I really want to have a multi-platform build. My target platform is feature-based and includes Equinox Target Components and my target-platform-configuration has all 3 (win32/linux/macosx) environments in it. I want to keep it this way. However, when I try to run "mvn verify" on Mac OS I now fail during dependency resolution with:

---------

[INFO] {osgi.os=win32, osgi.ws=win32, org.eclipse.update.install.features=true, osgi.arch=x86_64}

[ERROR] Cannot resolve project dependencies:

[ERROR]   Software being installed: io.tzatziki.integration.tests 0.0.1.qualifier

[ERROR]   Missing requirement: io.tzatziki.integration.tests 0.0.1.qualifier requires 'osgi.bundle; org.eclipse.jdt.launching.macosx 3.4.100' but it could not be found

---------

First of all, I noticed from the first INFO line above, that this happens during win32 resolution (which I assume is because Tycho is doing this for all 3 targets?

But it seems to me that Tycho is ignoring the fact that the dependency on org.eclipse.jdt.launching.macosx should be filtered out based on its "(osgi.os=macosx)" platform filter and failing unjustly. The dependency is also optional so it should probably be ok even if the filter has not kicked it out?

Is this a bug (platform filter ignored)? Or is it two bugs (optional dependency is treated as required)? Or am I just doing something wrong (e.g. the environment of win32 is not normal and is messing with things)?

Thanks,
Alex

Back to the top