java - Error when building fragment with Tycho: "xyz.fragment cannot be installed in this environment because its filter is not applicable" -


while running mvn install on fragment project in eclipse got error:

${fragment name} cannot installed in environment because filter not applicable.

using eclipse-platformfilter: (osgi.os=macosx) in manifest breaks build.

here's output surrounding key error (ids/directory names redacted):

[info] resolving dependencies of mavenproject: ${fragmentid}:4.3.0-snapshot @ ${fragmentdir}/pom.xml [info] {osgi.os=linux, org.eclipse.update.install.features=true, osgi.arch=x86_64, osgi.ws=gtk} [error] cannot resolve project dependencies: [error]   problems resolving provisioning plan.: [error]      ${fragment name} cannot installed in environment because filter not applicable. [error]  [error] see http://wiki.eclipse.org/tycho/dependency_resolution_troubleshooting help. 

the link (http://wiki.eclipse.org/tycho/dependency_resolution_troubleshooting) doesn't help.

i found few similar errors on internet (component x cannot installed in environment because filter not applicable), apply instances it's downloaded software , there's either no solution or solution isn't applicable case.

grateful help!

edit: found using eclipse-platformfilter: (osgi.os=macosx) in host plugin works, , eclipse-platformfilter: (| (osgi.os=macosx) (osgi.os=linux) (osgi.os=win32) ) in fragment works. seems build goes through each environment set in ancestor pom, , breaks when fragment doesn't apply 1 of environments.... surely there's flag set prevent that?

tycho builds operating system environments configured through pom. there no way automatically filter these environments configured eclipse-platformfilter. when building fragment operating system, need manually override <environments> configuration parent pom in pom of fragment:

<build>     <plugins>         <plugin>             <groupid>org.eclipse.tycho</groupid>             <artifactid>target-platform-configuration</artifactid>             <version>${tycho-version}</version>             <configuration>                 <environments>                     <environment>                         <os>macosx</os>                         <ws>cocoa</ws>                         <arch>x86_64</arch>                     </environment>                 </environments>             </configuration>         </plugin>     </plugins> </build> 

Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -