如何为Eclipse delta pack构建p2站点?

时间:2012-10-03 00:09:51

标签: eclipse p2 tycho delta-pack

我正在尝试为Eclipse delta网站构建自己的p2更新站点(因为它不能用作p2更新站点)。

我做了什么:

 # Get the delta pack from Eclipse web site
 #
 wget http://mirror.cc.columbia.edu/pub/software/eclipse/eclipse/downloads/drops/R-3.7.2-201202080800/eclipse-3.7.2-delta-pack.zip

 # Unzip in its own directory (delta)
 #
 mkdir delta
 cd delta
 unzip ../eclipse-3.7.2-delta-pack.zip
 cd ../

 # Get Eclipse from Eclipse web site (in theory we could only get equinox,
 # but in pratice, it refused to start due to some race conditions.  Using
 # eclipse works out-of-the-box)
 #
 wget http://mirror.cc.columbia.edu/pub/software/eclipse/eclipse/downloads/drops/R-3.7.2-201202080800/eclipse-3.7.2-delta-pack.zip

 # Untar Eclipse (it creates an "eclipse" directory)
 #
 tar xzvf eclipse-java-indigo-SR2-linux-gtk-x86_64.tar.gz

 # Create (publish) a p2 site out of the delta features/plugins
 #
 ./eclipse/eclipse -console -consolelog -nosplash -debug -verbose        \
    -application org.eclipse.equinox.p2.publisher.FeaturesAndBundlesPublisher       \
    -metadataRepository file:${Repository}  \
    -artifactRepository file:${Repository}  \
    -source delta/eclipse                   \
    -configs ANY            \
    -publishArtifacts

${Repository}中创建以下结构:

/<...>/local/apache2/htdocs/delta
    |-- artifacts.xml
    |-- content.xml
    |-- features
    |   `-- org.eclipse.equinox.executable_3.5.1.v20111216-1653-7P7NFUIFIbaUcU77s0KQWHw5HZTZ.jar
    `-- plugins
        |-- org.eclipse.compare.win32.source_1.0.200.I20110510-0800.jar
        |-- org.eclipse.compare.win32_1.0.200.I20110510-0800.jar
        |-- org.eclipse.core.filesystem.aix.ppc_1.1.0.v20110423-0524.jar
        |-- org.eclipse.core.filesystem.hpux.ia64_32_1.0.100.v20110423-0524.jar
        |-- org.eclipse.core.filesystem.linux.x86_1.4.0.v20110423-0524.jar
        |-- org.eclipse.core.filesystem.linux.x86_64_1.2.0.v20110423-0524.jar
        |-- org.eclipse.core.filesystem.macosx_1.3.0.v20110423-0524.jar
        |-- org.eclipse.core.filesystem.solaris.sparc_1.2.0.v20110423-0524.jar
        |-- org.eclipse.core.filesystem.win32.x86_1.1.300.v20110423-0524.jar
        |-- org.eclipse.core.filesystem.win32.x86_64_1.1.300.v20110423-0524.jar
        |-- org.eclipse.core.net.linux.x86_1.1.200.I20110419-0800.jar
        |-- org.eclipse.core.net.linux.x86_64_1.1.0.I20110331-0827.jar
        |-- org.eclipse.core.net.win32.x86_1.0.100.I20110331-0827.jar
        |-- org.eclipse.core.net.win32.x86_64_1.0.100.I20110331-0827.jar
        |-- org.eclipse.core.resources.win32.x86_3.5.100.v20110423-0524.jar
        |-- org.eclipse.equinox.launcher.carbon.macosx_1.1.100.v20110502.jar
        |-- org.eclipse.equinox.launcher.cocoa.macosx.x86_64_1.1.101.v20120109-1504.jar
        |-- org.eclipse.equinox.launcher.cocoa.macosx_1.1.101.v20120109-1504.jar
        |-- org.eclipse.equinox.launcher.gtk.aix.ppc64_1.1.0.v20110530.jar
        |-- org.eclipse.equinox.launcher.gtk.aix.ppc_1.1.0.v20110530.jar
        |-- org.eclipse.equinox.launcher.gtk.hpux.ia64_32_1.0.0.v20110502.jar
        |-- org.eclipse.equinox.launcher.gtk.linux.ppc64_1.0.100.v20110505.jar
        |-- org.eclipse.equinox.launcher.gtk.linux.s390x_1.1.100.v20110505.jar
        |-- org.eclipse.equinox.launcher.gtk.linux.x86_1.1.100.v20110505.jar
        |-- org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.100.v20110505.jar
        |-- org.eclipse.equinox.launcher.gtk.solaris.sparc_1.1.100.v20110505.jar
        |-- org.eclipse.equinox.launcher.gtk.solaris.x86_1.1.100.v20110505.jar
        |-- org.eclipse.equinox.launcher.win32.win32.x86_1.1.100.v20110502.jar
        |-- org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.100.v20110502.jar
        |-- org.eclipse.equinox.security.macosx.source_1.100.100.v20100503.jar
        |-- org.eclipse.equinox.security.macosx_1.100.100.v20100503.jar
        |-- org.eclipse.equinox.security.win32.x86.source_1.0.200.v20100503.jar
        |-- org.eclipse.equinox.security.win32.x86_1.0.200.v20100503.jar
        |-- org.eclipse.equinox.security.win32.x86_64.source_1.0.0.v20110502.jar
        |-- org.eclipse.equinox.security.win32.x86_64_1.0.0.v20110502.jar
        |-- org.eclipse.jdt.launching.macosx.source_3.2.100.v20111006_r372.jar
        |-- org.eclipse.jdt.launching.macosx_3.2.100.v20111006_r372.jar
        |-- org.eclipse.jdt.launching.ui.macosx.source_1.0.100.v20111006_r372.jar
        |-- org.eclipse.jdt.launching.ui.macosx_1.0.100.v20111006_r372.jar
        |-- org.eclipse.swt.carbon.macosx.source_3.7.2.v3740f.jar
        |-- org.eclipse.swt.carbon.macosx_3.7.2.v3740f.jar
        |-- org.eclipse.swt.cocoa.macosx.source_3.7.2.v3740f.jar
        |-- org.eclipse.swt.cocoa.macosx.x86_64.source_3.7.2.v3740f.jar
        |-- org.eclipse.swt.cocoa.macosx.x86_64_3.7.2.v3740f.jar
        |-- org.eclipse.swt.cocoa.macosx_3.7.2.v3740f.jar
        |-- org.eclipse.swt.gtk.aix.ppc.source_3.7.2.v3740f.jar
        |-- org.eclipse.swt.gtk.aix.ppc64.source_3.7.2.v3740f.jar
        |-- org.eclipse.swt.gtk.aix.ppc64_3.7.2.v3740f.jar
        |-- org.eclipse.swt.gtk.aix.ppc_3.7.2.v3740f.jar
        |-- org.eclipse.swt.gtk.hpux.ia64_32.source_3.7.2.v3740f.jar
        |-- org.eclipse.swt.gtk.hpux.ia64_32_3.7.2.v3740f.jar
        |-- org.eclipse.swt.gtk.linux.ppc64.source_3.7.2.v3740f.jar
        |-- org.eclipse.swt.gtk.linux.ppc64_3.7.2.v3740f.jar
        |-- org.eclipse.swt.gtk.linux.s390.source_3.7.2.v3740f.jar
        |-- org.eclipse.swt.gtk.linux.s390_3.7.2.v3740f.jar
        |-- org.eclipse.swt.gtk.linux.s390x.source_3.7.2.v3740f.jar
        |-- org.eclipse.swt.gtk.linux.s390x_3.7.2.v3740f.jar
        |-- org.eclipse.swt.gtk.linux.x86.source_3.7.2.v3740f.jar
        |-- org.eclipse.swt.gtk.linux.x86_3.7.2.v3740f.jar
        |-- org.eclipse.swt.gtk.linux.x86_64.source_3.7.2.v3740f.jar
        |-- org.eclipse.swt.gtk.linux.x86_64_3.7.2.v3740f.jar
        |-- org.eclipse.swt.gtk.solaris.sparc.source_3.7.2.v3740f.jar
        |-- org.eclipse.swt.gtk.solaris.sparc_3.7.2.v3740f.jar
        |-- org.eclipse.swt.gtk.solaris.x86.source_3.7.2.v3740f.jar
        |-- org.eclipse.swt.gtk.solaris.x86_3.7.2.v3740f.jar
        |-- org.eclipse.swt.win32.win32.x86.source_3.7.2.v3740f.jar
        |-- org.eclipse.swt.win32.win32.x86_3.7.2.v3740f.jar
        |-- org.eclipse.swt.win32.win32.x86_64.source_3.7.2.v3740f.jar
        |-- org.eclipse.swt.win32.win32.x86_64_3.7.2.v3740f.jar
        |-- org.eclipse.ui.carbon.source_4.0.100.I20101109-0800.jar
        |-- org.eclipse.ui.carbon_4.0.100.I20101109-0800.jar
        |-- org.eclipse.ui.cocoa.source_1.1.0.I20101109-0800.jar
        |-- org.eclipse.ui.cocoa_1.1.0.I20101109-0800.jar
        |-- org.eclipse.ui.win32.source_3.2.200.v20110928-1505.jar
        |-- org.eclipse.ui.win32_3.2.200.v20110928-1505.jar
        |-- org.eclipse.update.core.linux.source_3.2.200.v20100512.jar
        |-- org.eclipse.update.core.linux_3.2.200.v20100512.jar
        |-- org.eclipse.update.core.win32.source_3.2.200.v20100512.jar
        `-- org.eclipse.update.core.win32_3.2.200.v20100512.jar

我可以使用网址http://my.server/delta进行检查。

当我在父pom中添加网址时:

        <repositories>
            <repository>
                    <id>delta</id>
                    <layout>p2</layout>
                    <url>http://my.server/delta</url>
            </repository>
            <repository>
                    <id>eclipse-platform</id>
                    <layout>p2</layout>
                    <url>http://download.eclipse.org/releases/indigo</url>
            </repository>

它没有拿起我项目需要的插件:

[INFO] Cannot complete the request.  Generating details.
[INFO] Cannot complete the request.  Generating details.
[INFO] {osgi.ws=win32, osgi.os=win32, osgi.arch=x86_64, org.eclipse.update.install.features=true}
[ERROR] Cannot resolve project dependencies:
[ERROR]   Software being installed: com.example.fs 1.0.0.qualifier
[ERROR]   Missing requirement: com.example.fs 1.0.0.qualifier requires 'org.eclipse.ui.carbon 0.0.0' but it could not be found

插件org.eclipse.ui.carbon位于生成的contents.xml和artifacts.xml文件中,也位于plugins目录中:

/<...>/local/apache2/htdocs/delta
    |-- artifacts.xml
    |-- content.xml
    |-- features
    `-- plugins

我不确定为什么maven无法从更新站点获取插件。我该如何调试/解决此问题?

2 个答案:

答案 0 :(得分:2)

Delta Pack内容已在“Eclipse项目更新”更新站点中提供(例如,http://download.eclipse.org/eclipse/updates/4.3用于开普勒)。只需在目标平台中包含功能组 Eclipse RCP Equinox目标组件

答案 1 :(得分:0)

其实我说得太早了。更新站点/eclipse/updates/3.7具有&#34; Eclipse Platform Launchers&#34;我不知道如何获得所有平台。

我确实得到了#34; Eclipse平台发射器&#34;但现在我的产品缺少以下插件。我们需要这些插件来为多个平台构建产品:

<plugin id="org.eclipse.swt.carbon.macosx" fragment="true"/>
<plugin id="org.eclipse.swt.cocoa.macosx" fragment="true"/>
<plugin id="org.eclipse.swt.cocoa.macosx.x86_64" fragment="true"/>
<plugin id="org.eclipse.swt.gtk.aix.ppc" fragment="true"/>
<plugin id="org.eclipse.swt.gtk.aix.ppc64" fragment="true"/>
<plugin id="org.eclipse.swt.gtk.hpux.ia64_32" fragment="true"/>
<plugin id="org.eclipse.swt.gtk.linux.ppc64" fragment="true"/>
<plugin id="org.eclipse.swt.gtk.linux.s390" fragment="true"/>
<plugin id="org.eclipse.swt.gtk.linux.s390x" fragment="true"/>
<plugin id="org.eclipse.swt.gtk.linux.x86" fragment="true"/>
<plugin id="org.eclipse.swt.gtk.linux.x86_64" fragment="true"/>
<plugin id="org.eclipse.swt.gtk.solaris.sparc" fragment="true"/>
<plugin id="org.eclipse.swt.gtk.solaris.x86" fragment="true"/>
<plugin id="org.eclipse.swt.win32.win32.x86" fragment="true"/>

这就是我最初首次使用delta包的原因。

我想问题更多:您如何仅使用软件更新网站为多个平台构建产品?