1. 程式人生 > >eclipse新建外掛報錯 An error occurred while collecting items to be installed

eclipse新建外掛報錯 An error occurred while collecting items to be installed

在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,命完名後,將錯誤資訊裡的沒找到的路徑複製進去即可。

所以之後遇到類似錯誤,可以先看一下是什麼庫缺失,再進行對應的庫地址新增即可。