eclipse新建插件报错 An error occurred while collecting items to be installed

本文介绍在Eclipse中安装阿里P3C代码规范插件时遇到的错误及解决方法,通过添加缺失库的URL地址,成功解决安装问题。

在eclipse 中在线装安装p3c插件时,在这里不放啰嗦一下,这个是阿里的内部代码标准所开发的一款可以帮助开发者更好规范代码的一种插件,有需要的可以装一下。另外阿里java开发手册大家也可以阅读一下,规范一下紫的的代码风格。好了说主题,安装插件时会报出如下错误:

An error occurred while collecting items to be installed
session context was:(profile=epp.package.jee, phase=org.eclipse.equinox.internal.p2.engine.phases.Collect, operand=, action=).
No repository found containing: osgi.bundle,org.aspectj.runtime.source,1.7.0.20120507134200
No repository found containing: osgi.bundle,org.eclipse.contribution.weaving.jdt.source,2.2.0.e36x-20120507-1400
No repository found containing: org.eclipse.update.feature,org.eclipse.contribution.weaving.source,2.2.0.e36x-20120507-1400
No repository found containing: osgi.bundle,org.eclipse.contribution.xref.core.source,2.2.0.e36x-20120507-1400
No repository found containing: org.eclipse.update.feature,org.eclipse.contribution.xref.source,2.2.0.e36x-20120507-1400
No repository found containing: osgi.bundle,org.eclipse.contribution.xref.ui.source,2.2.0.e36x-20120507-1400
No repository found containing: osgi.bundle,org.eclipse.net4j.jms.api,3.0.0.v20110215-1551
No repository found containing: osgi.bundle,org.springframework.roo.wrapping.protobuf-java-lite,2.3.0.0001

这是因为有些库连接不到,导致在线安装失败,添加一下安装所在库的url地址即可。

具体步骤如下:

  1. 点击Eclipse窗口的windows——>perference
  2. 找到Install\update ,然后点击Available Software Sites
    3.点击Add,命完名后,将错误信息里的没找到的路径复制进去即可。

例如如上错误,添加如下路径即可:
name:eclipse
location:https://www.eclipse.org/ajdt/downloads/

所以之后遇到类似错误,可以先看一下是什么库缺失,再进行对应的库地址添加即可。

评论 6
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值