【问题标题】:Tycho cannot download from official p2 repositoryTycho 无法从官方 p2 存储库下载
【发布时间】:2019-11-15 05:13:29
【问题描述】:

我有一个已经由 Tycho 构建的 Eclipse E4 应用程序。现在我们正在迁移应用程序以使用 Java 12。因此,我们还需要更新目标文件。

最新的目标文件如下:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde version="3.8"?>
<target includeMode="feature" name="Running Platform">
    <locations>
        <location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
            <repository location="http://download.eclipse.org/nattable/releases/1.5.0/repository/"/>
            <unit id="org.eclipse.nebula.widgets.nattable.core.feature.feature.group" version="1.5.0.201703192131"/>
            <unit id="org.eclipse.nebula.widgets.nattable.extension.e4.feature.feature.group" version="1.1.0.201703192131"/>
            <unit id="org.eclipse.nebula.widgets.nattable.extension.glazedlists.feature.feature.group" version="1.5.0.201703192131"/>
            <unit id="org.eclipse.nebula.widgets.nattable.extension.nebula.feature.feature.group" version="1.1.0.201703192131"/>
            <unit id="org.eclipse.nebula.widgets.nattable.extension.poi.feature.feature.group" version="1.5.0.201703192131"/>
        </location>
        <location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
            <repository location="http://download.eclipse.org/releases/2019-06/"/>
            <unit id="org.eclipse.equinox.sdk.feature.group" version="3.18.0.v20190528-1257"/>
            <unit id="org.eclipse.platform.sdk" version="4.12.0.I20190605-1800"/>
        </location>
        <location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
            <repository location="http://download.eclipse.org/nebula/releases/latest"/>
            <unit id="org.eclipse.nebula.widgets.pshelf.css.feature.feature.group" version="1.0.0.201812241324"/>
            <unit id="org.eclipse.nebula.widgets.pshelf.feature.feature.group" version="1.0.0.201812241324"/>
        </location>
    </locations>
    <environment>
        <arch>x86_64</arch>
        <os>win32</os>
        <ws>win32</ws>
        <nl>en_US</nl>
    </environment>
</target>

当我们使用 Jenkins 使用 tycho 运行构建时,会出现以下错误:

[INFO] Fetching p2.index from http://download.eclipse.org/nattable/releases/1.5.0/repository/

[INFO] Fetching p2.index from http://download.eclipse.org/nattable/releases/1.5.0/repository/

[INFO] Adding repository http://download.eclipse.org/nattable/releases/1.5.0/repository

[INFO] Fetching p2.index from http://download.eclipse.org/releases/2019-06/

[INFO] Fetching p2.index from http://download.eclipse.org/releases/2019-06/

[INFO] Adding repository http://download.eclipse.org/releases/2019-06

WARNING: An illegal reflective access operation has occurred

WARNING: Illegal reflective access by org.eclipse.ecf.provider.filetransfer.httpclient4.SNIAwareHttpClient$1 (file:/C:/Users/PTITDevTools_svc/.m2/repository/org/eclipse/tycho/tycho-bundles-external/1.1.0/eclipse/plugins/org.eclipse.ecf.provider.filetransfer.httpclient4_1.1.200.v20170314-0133.jar) to method sun.security.ssl.SSLSocketImpl.setHost(java.lang.String)

WARNING: Please consider reporting this to the maintainers of org.eclipse.ecf.provider.filetransfer.httpclient4.SNIAwareHttpClient$1

WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations

WARNING: All illegal access operations will be denied in a future release

[ERROR] Failed to resolve target definition D:\Software\x64\Jenkins\workspace\ture_ILMV-490-migrate-to-java-12\neon\neon.target: Failed to load p2 metadata repository from location http://download.eclipse.org/releases/2019-06/: Unable to read repository at http://download.eclipse.org/releases/2019-06. Unable to read repository at https://download.eclipse.org/technology/epp/packages/2019-06/content.xml. Connection reset -> [Help 1]

使用我们的old Target file,构建工作正常,但旧文件是 PDE 目标文件。谁能告诉我为什么会失败?

【问题讨论】:

    标签: eclipse-rcp e4 tycho


    【解决方案1】:

    Eclipse p2 repo 的 url 不够具体。 我把http://download.eclipse.org/releases/2019-06/改成了http://download.eclipse.org/releases/2019-06/201906191000

    【讨论】:

    • 出于安全原因,我建议所有 eclipse.org URL 使用 HTTPS 而不是 HTTP(同样适用于支持 HTTPS 的其他域)。
    猜你喜欢
    • 2016-05-22
    • 2016-09-29
    • 2018-10-25
    • 2021-08-09
    • 2019-12-13
    • 1970-01-01
    • 2012-11-18
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多