I use Tycho to create and test some eclipse plugins. I have one package that has many platform specific fragments. I also have one test suite that uses the tycho-surefire-plugin to test the source package, which has platform-specific fragments. However, Tycho does not include the current platform fragment in the test runtime.
All platform-specific fragments look like the win64 fragment manifest below. (There are actually six fragments, one for each combination of platform I need to support.)
Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Liferay AUI Upgrade Tool Win64 Bundle-SymbolicName: com.liferay.laut.win32.win32.x86_64;singleton:=true Bundle-Version: 1.0.2.qualifier Bundle-RequiredExecutionEnvironment: JavaSE-1.6 Fragment-Host: com.liferay.ide.alloy.core Eclipse-BundleShape: dir Eclipse-PlatformFilter: (& (osgi.ws=win32)(osgi.os=win32)(osgi.arch=x86_64)) Bundle-Vendor: Liferay, Inc.
Example win64 section of pom.xml <build>
<build> <plugins> <plugin> <groupId>org.eclipse.tycho</groupId> <artifactId>target-platform-configuration</artifactId> <configuration> <environments> <environment> <os>win32</os> <ws>win32</ws> <arch>x86_64</arch> </environment> </environments> </configuration> </plugin> </plugins> </build>
When I try to complete my Tycho build and run the testfire test plugin (no matter which OS I try), the correct platform fragment is not added at runtime.
I saw various posts in stackoverflow about similar issues, but in those cases the fragments loaded at the test run time were not platform specific fragments with OS filters.
java eclipse maven multiplatform tycho
gamerson
source share