title: Tycho & Eclipse-PlatformFilter
body: <p>I'm using tycho to automatically build my RCP application (actually, I've adopted the structure reported in <a href="https://github.com/sonatype/sonatype-tycho/tree/master/tycho-demo" rel="nofollow noreferrer">one of the examples</a>). I have to say that it works very well and I'm able to support all the three architectures I need (linux x86, linux x86_64, win32 x86).</p>
  
  <p>Additionally, part of the application requires some native code, which I provide with fragments (<a href="https://stackoverflow.com/questions/6375112/how-to-insert-platform-specific-code-in-eclipse">see my previous question</a>). Each fragment is tailored for a particular architecture, hence specify it in the fragment's MANIFEST:</p>
  
  <pre><code>Eclipse-PlatformFilter: (&amp; (osgi.os=linux) (osgi.arch=x86_64))
  </code></pre>
  
  <p>However, if I run <code>mvn install</code> I obtain:</p>
  
  <pre><code>[ERROR] Internal error: java.lang.RuntimeException: "Problems resolving provisioning plan.": ["tycho.jni.linux 1.0.0.qualifier cannot be installed in this environment because its filter is not applicable."] -&gt; [Help 1]
  org.apache.maven.InternalErrorException: Internal error: java.lang.RuntimeException: "Problems resolving provisioning plan.": ["tycho.jni.linux 1.0.0.qualifier cannot be installed in this environment because its filter is not applicable."]
      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:168)
      at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
      at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
      at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
      at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
      at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
      at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
  Caused by: java.lang.RuntimeException: "Problems resolving provisioning plan.": ["tycho.jni.linux 1.0.0.qualifier cannot be installed in this environment because its filter is not applicable."]
      at org.eclipse.tycho.p2.impl.resolver.ProjectorResolutionStrategy.resolve(ProjectorResolutionStrategy.java:84)
      at org.eclipse.tycho.p2.impl.resolver.P2ResolverImpl.resolveProject(P2ResolverImpl.java:324)
      at org.eclipse.tycho.p2.impl.resolver.P2ResolverImpl.resolveProject(P2ResolverImpl.java:293)
      at org.eclipse.tycho.p2.facade.P2TargetPlatformResolver.doResolvePlatform(P2TargetPlatformResolver.java:389)
      at org.eclipse.tycho.p2.facade.P2TargetPlatformResolver.resolvePlatform(P2TargetPlatformResolver.java:150)
      at org.eclipse.tycho.core.resolver.DefaultTychoDependencyResolver.resolveProject(DefaultTychoDependencyResolver.java:90)
      at org.eclipse.tycho.core.maven.TychoMavenLifecycleParticipant.afterProjectsRead(TychoMavenLifecycleParticipant.java:91)
      at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:273)
      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
      ... 11 more
  Caused by: org.eclipse.core.runtime.CoreException: Problems resolving provisioning plan.
      at org.eclipse.tycho.p2.impl.resolver.ProjectorResolutionStrategy.resolve(ProjectorResolutionStrategy.java:85)
      ... 19 more
  </code></pre>
  
  <p>Note that the <strong>same</strong> project <strong>without</strong> the <code>Eclipse-PlatformFilter</code> compiles correctly... what I'm missing?</p>