Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/308.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 从Tycho P2存储库切换到Eclipse目标文件_Java_Maven_Eclipse Rcp_Tycho - Fatal编程技术网

Java 从Tycho P2存储库切换到Eclipse目标文件

Java 从Tycho P2存储库切换到Eclipse目标文件,java,maven,eclipse-rcp,tycho,Java,Maven,Eclipse Rcp,Tycho,我想将基于EclipseLuna的EclipseRCP项目从“POM中的P2存储库”方法切换到目标文件方法。(从中的方法2到方法1)。 这看起来很简单,但不是因为我需要支持多个环境 因此,在我以前的父母pom中,我有: <repositories> <repository> <id>eclipse platform</id> <url>https://my-domain/nexus/reposit

我想将基于EclipseLuna的EclipseRCP项目从“POM中的P2存储库”方法切换到目标文件方法。(从中的方法2到方法1)。 这看起来很简单,但不是因为我需要支持多个环境

因此,在我以前的父母pom中,我有:

<repositories>
    <repository>
        <id>eclipse platform</id>
        <url>https://my-domain/nexus/repository/eclipse_luna_repo/</url>
        <layout>p2</layout>
    </repository>
    <repository>
        <id>e4 tools</id>
        <url>https://my-domain/nexus/repository/e4_tools/</url>
        <layout>p2</layout>
    </repository>
</repositories>

Eclipse平台
https://my-domain/nexus/repository/eclipse_luna_repo/
p2
e4工具
https://my-domain/nexus/repository/e4_tools/
p2
而且:

<plugin>
    <groupId>org.eclipse.tycho</groupId>
    <artifactId>target-platform-configuration</artifactId>
    <version>${tycho.version}</version>
    <configuration>
        <resolver>p2</resolver>
        <environments>
            <environment>
                <os>win32</os>
                <ws>win32</ws>
                <arch>x86</arch>
            </environment>
            <environment>
                <os>win32</os>
                <ws>win32</ws>
                <arch>x86_64</arch>
            </environment>
            <environment>
                <os>linux</os>
                <ws>gtk</ws>
                <arch>x86_64</arch>
            </environment>
        </environments>
    </configuration>
</plugin>

org.eclipse.tycho
):


但当我与第谷一起构建时,我得到了以下例外:

无法在此环境中安装org.eclipse.core.filesystem.linux.x86_64 1.2.200.v20140124-1940,因为其筛选器不适用。

我认为有两种解决办法:

  • 为每个环境使用目标文件
    • 但这似乎是一个很大的工作,我必须建立完全为每个环境
    • 至少中间步骤是有效的。限于win32 win32 win32 x86_64Eclipse可以启动我的程序,Tycho可以构建它
  • 将P2存储库中的每个插件放入目标文件中,并使用
    includemodeme=“slicer”
    includealplatforms=“true”
    • 这似乎不起作用,因为某些
      PowerPC
      依赖项无法解析。我没有使用PowerPC体系结构
此外,这可能是这个问题的重复:
但是由于它已经四年了,而且没有答案,我想我会再试一次…

而不是像
org.eclipse.core.filesystem.linux.x86_64
org.eclipse.core.filesystem.win32.x86
等依赖于平台的安装单元。您应该将包含依赖于平台的单元的安装单元添加为子单元(使用特定于平台的过滤器)

对于第一个
,请使用以下三个单位,而不是所有单位(至少):



请显示由目标平台DSL生成的目标定义XML文件。您可以查看。我用生成的XML替换了目标平台DSL。此外,我更新了我迄今为止尝试的步骤。而不是依赖于平台的安装单元,如
org.eclipse.core.filesystem.linux.x86_64
,您应该添加包含平台相关单元的安装单元作为子单元。对于您的第一个位置,使用而不是您所有的单元可以工作吗?哇,这很简单。您介意根据您的评论创建一个答案,以便我可以接受吗?
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde?>
<!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
<target name="My Target" sequenceNumber="1621516437">
  <locations>
    <location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit">
      <unit id="org.eclipse.platform.feature.group" version="4.4.2.v20150204-1700"/>
      <unit id="org.eclipse.rcp.feature.group" version="4.4.2.v20150204-1700"/>
      <unit id="org.eclipse.jdt.feature.group" version="3.10.1.v20150204-1700"/>
      <unit id="org.eclipse.equinox.p2.discovery.feature.feature.group" version="1.0.200.v20140512-1802"/>
      <unit id="org.eclipse.equinox.executable.feature.group" version="3.6.102.v20150204-1316"/>
      <unit id="org.eclipse.ui" version="3.106.1.v20141002-1150"/>
      <unit id="org.eclipse.core.filesystem.linux.x86_64" version="1.2.200.v20140124-1940"/>
      <unit id="org.eclipse.core.filesystem.win32.x86" version="1.4.0.v20140124-1940"/>
      <unit id="org.eclipse.core.net.linux.x86_64" version="1.1.100.v20140124-2013"/>
      <unit id="org.eclipse.core.net.win32.x86" version="1.0.100.v20140124-2013"/>
      <unit id="org.eclipse.equinox.security.win32.x86" version="1.0.300.v20130327-1442"/>
      <unit id="org.eclipse.swt.gtk.linux.x86_64" version="3.103.2.v20150203-1351"/>
      <unit id="org.eclipse.swt.win32.win32.x86" version="3.103.2.v20150203-1351"/>
      <repository id="eclipse-luna" location="https://my-domain/nexus/repository/eclipse_luna_repo"/>
    </location>
    <location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit">
      <unit id="org.eclipse.e4.tools.compat" version="0.12.0.v20141113-1753"/>
      <unit id="org.eclipse.e4.tools.services" version="0.12.0.v20141120-0900"/>
      <repository id="e4_luna_tools" location="https://my-domain/nexus/repository/e4_tools"/>
    </location>
  </locations>
</target>

<unit id="org.eclipse.equinox.sdk.feature.group" version="0.0.0"/>
<unit id="org.eclipse.sdk.ide" version="0.0.0"/>
<unit id="org.eclipse.jdt.feature.group" version="0.0.0"/>