首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Tycho & Eclipse-PlatformFilter

Tycho & Eclipse-PlatformFilter
EN

Stack Overflow用户
提问于 2011-06-23 15:32:21
回答 1查看 2.1K关注 0票数 11

我使用tycho自动构建我的RCP应用程序(实际上,我采用了其中一个例子中报告的结构)。我不得不说,它工作得很好,我能够支持我所需要的所有三种架构(linux x86、linux x86_64、win32 x86)。

此外,应用程序的一部分需要一些本机代码,我提供了片段(见我之前的问题)。每个片段都是为特定的体系结构量身定制的,因此在片段的清单中指定它:

代码语言:javascript
复制
Eclipse-PlatformFilter: (& (osgi.os=linux) (osgi.arch=x86_64))

但是,如果运行mvn install,则可以获得:

代码语言:javascript
复制
[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."] -> [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

注意,相同的项目没有 Eclipse-PlatformFilter编译正确.我错过了什么?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2011-07-04 11:49:16

尝试将片段的pom.xml环境缩小到与匹配的环境:

代码语言:javascript
复制
<build>
  <plugins>
    <plugin>
      <groupId>org.eclipse.tycho</groupId>
      <artifactId>target-platform-configuration</artifactId>
      <version>${tycho-version}</version>
      <configuration>
        <environments>
          <environment>
            <os>linux</os>
            <ws>gtk</ws>
            <arch>x86_64</arch>
          </environment>
        </environments>
      </configuration>
    </plugin>
  </plugins>
</build>
票数 13
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/6456684

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档