You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Eclipse Tycho构建失败:无法满足org.eclipse.equinox.simpleconfigurator依赖

Tycho构建Eclipse RCP应用失败:org.eclipse.equinox.simpleconfigurator依赖缺失

问题详情

尝试基于Vogella教程构建Eclipse RCP应用,执行mvn clean verify命令后构建失败,错误日志如下:

[INFO] --- tycho-p2-repository:2.7.5:assemble-repository (default-assemble-repository) @ com.jim.mp.build.product ---
[WARNING] Parameter 'qualifier' (user property 'buildQualifier') is read-only, must not be used in configuration
[INFO]
[INFO] --- tycho-p2-repository:2.7.5:archive-repository (default-archive-repository) @ com.jim.mp.build.product ---
[WARNING] Parameter 'qualifier' (user property 'buildQualifier') is read-only, must not be used in configuration
[INFO] Building zip: C:\My_Devs\Eclipse-Headless-Tycho-Vogella\com.jim.mp.build\releng\com.jim.mp.build.product\target\com.jim.mp.build.product-1.0.0-SNAPSHOT.zip
[INFO]
[INFO] --- tycho-p2-director:2.7.5:materialize-products (materialize-products) @ com.jim.mp.build.product ---
[INFO] Installing product com.vogella.tasks.product.product for environment win32/win32/x86_64 to C:\My_Devs\Eclipse-Headless-Tycho-Vogella\com.jim.mp.build\releng\com.jim.mp.build.product\target\products\com.vogella.tasks.product.product\win32\win32\x86_64
Installing com.vogella.tasks.product.product 0.0.1.
Installation failed.
Cannot complete the install because one or more required items could not be found.
        Software being installed: to-do 0.0.1 (com.vogella.tasks.product.product 0.0.1)
        Missing requirement: toolingwin32.win32.x86_64org.eclipse.equinox.simpleconfigurator 0.0.1 requires 'osgi.bundle; org.eclipse.equinox.simpleconfigurator 0.0.0' but it could not be found
        Cannot satisfy dependency:
                From: to-do 0.0.1 (com.vogella.tasks.product.product 0.0.1)
                To: org.eclipse.equinox.p2.iu; toolingcom.vogella.tasks.product.product.configuration [0.0.1,0.0.1]
        Cannot satisfy dependency:
                From: toolingcom.vogella.tasks.product.product.configuration 0.0.1
                To: org.eclipse.equinox.p2.iu; toolingwin32.win32.x86_64org.eclipse.equinox.simpleconfigurator [0.0.1,0.0.1]

已尝试的操作:

  • 切换Tycho版本为2.7.5和3.0.4
  • 从产品文件中移除org.eclipse.equinox.simpleconfigurator
  • 删除Maven .m2仓库并重新构建

均未解决问题,期望完成无错误的Tycho构建。

解决方案

1. 修正产品文件的依赖配置

打开.product文件,切换到Dependencies标签:

  • 确认org.eclipse.equinox.simpleconfigurator已添加,且版本范围设置合理(例如[1.4.0,),匹配目标平台中的实际版本),而非错误的0.0.0
  • 切换到Configuration标签,检查org.eclipse.equinox.simpleconfigurator的配置项,确保路径指向configuration/config.ini,且未手动指定错误版本

2. 验证目标平台完整性

打开目标平台文件(.target):

  • 确保包含Eclipse Equinox相关的p2仓库(如Eclipse SDK更新站点),保证org.eclipse.equinox.simpleconfigurator能被正常拉取
  • 如果使用离线目标平台,确认本地缓存中存在该bundle的正确版本,无损坏或缺失

3. 移除Tycho配置中的只读参数

构建日志中的qualifier参数警告虽非直接诱因,但可能干扰版本生成:

  • 在产品模块的pom.xml中,移除对qualifier参数的手动配置,Tycho会自动处理构建版本 qualifier

4. 修复自动生成的配置IU

报错中的toolingxxxorg.eclipse.equinox.simpleconfigurator是Tycho生成的配置IU,版本依赖错误:

  • 在.product文件的Configuration标签中,取消"Use a custom configuration file"勾选(若已启用),让Tycho自动生成标准配置
  • 若需自定义config.ini,手动检查文件中org.eclipse.equinox.simpleconfigurator的版本配置,与目标平台保持一致

5. 强制更新p2仓库索引

执行以下命令强制刷新所有p2仓库依赖,避免缓存的旧索引导致依赖解析失败:

mvn clean verify -U

内容的提问来源于stack exchange,提问作者tim.z.hood

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.21 20:14:53