第谷Eclipse-PlatformFilter

发布于 2024-11-17 06:04:33 字数 3415 浏览 3 评论 0原文

我正在使用 tycho 自动构建我的 RCP 应用程序(实际上,我已经采用了 示例之一)。我不得不说它运行得非常好,并且能够支持我需要的所有三种架构(linux x86、linux x86_64、win32 x86)。

此外,应用程序的一部分需要一些本机代码,我通过片段提供了这些代码(请参阅我之前的问题)。每个片段都是针对特定架构定制的,因此在片段的 MANIFEST 中指定它:

Eclipse-PlatformFilter: (& (osgi.os=linux) (osgi.arch=x86_64))

但是,如果我运行 mvn install 我得到:

[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 编译正确...我缺少什么?

I'm using tycho to automatically build my RCP application (actually, I've adopted the structure reported in one of the examples). 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).

Additionally, part of the application requires some native code, which I provide with fragments (see my previous question). Each fragment is tailored for a particular architecture, hence specify it in the fragment's MANIFEST:

Eclipse-PlatformFilter: (& (osgi.os=linux) (osgi.arch=x86_64))

However, if I run mvn install I obtain:

[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

Note that the same project without the Eclipse-PlatformFilter compiles correctly... what I'm missing?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

彻夜缠绵 2024-11-24 06:04:33

尝试将片段的 pom.xml 的环境范围缩小到仅与 Eclipse-PlatformFilter 匹配的环境:

<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>

Try narrowing down the environments of your fragment's pom.xml to just the one matching the Eclipse-PlatformFilter:

<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>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文