我正在嘗試使用相對較新的Eclipse插件(http://uqbar-tomcat-xt.sourceforge.net/download.html)。它沒有更新站點,所以我無法通過Eclipse中的UI安裝它,這通常會解決依賴關係。所有可供下載的是一個.jar文件,並且網站上的說明只是將其放在eclipse/plugins中。當我這樣做時,它看起來很有效,因爲我在Window - > Show View中得到插件應該添加的新選項。然而,當我嘗試使用任何的這些觀點,我得到以下錯誤:如何解決Eclipse插件中的依賴關係我沒有寫入?
org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter$TerminatingClassNotFoundException: An error occurred while automatically activating bundle org.uqbar.eclipse.tomcat.xt (304).
at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:125)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:449)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:211)
...snip...
Caused by: org.osgi.framework.BundleException: The activator org.uqbar.eclipse.tomcat.xt.UqbarSydeoXtActivator for bundle org.uqbar.eclipse.tomcat.xt is invalid
at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadBundleActivator(AbstractBundle.java:157)
...snip...
Caused by: java.lang.Error: Unresolved compilation problems:
The import com.thoughtworks cannot be resolved
XStream cannot be resolved to a type
XStream cannot be resolved to a type
XStream cannot be resolved to a type
上述網站的依賴關係頁面列出了幾個依賴性,包括XStream的。我試着單獨下載這些.jars文件,並將它們放入eclipse/plugins目錄中,但是這並沒有解決這個錯誤。當我看到清單罐子裏,我看到:
Bundle-ClassPath: .,commons-logging-1.0.4.jar,xpp3_min-1.1.4c.jar,xstr
eam-1.3.jar,xstream-benchmark-1.3.jar
但顯然XStream的罐子不可用的類路徑(這是什麼地方?)。我不確定我可以將它們放在哪裏,以便它們被插件識別。
我試過聯繫開發人員,沒有得到任何迴應,所以我轉向了SO。有什麼我可以做的,或者是插件包裝不正確?
更新:顯然錯誤是在激活,而不是插件本身。我嘗試導入插件作爲源項目,但src /目錄是空的。當我嘗試導出插件時,該插件未出現在可用的可部署插件列表中。所以這仍然沒有解決。
從Eclipse 3.4開始手動添加插件的推薦方法是將其放入Eclipse中的dropins目錄中。您可能會發現向eclipse/plugins添加插件沒有任何作用(這是因爲p2負責eclipse/plugins目錄)。 – SteveD 2009-09-10 13:44:05
實際上,將它放在dropins目錄中是行不通的,因爲它是我已經安裝的插件(通過Eclipse UI)的插件,它位於插件目錄中。但對於大多數其他情況,是的 - 下降是要走的路。 我已經成爲別人的旁觀(所以它),所以我還沒有嘗試Rich的解決方案,但會報告回來,當我這樣做! – 2009-09-10 19:46:11