2013-04-26 141 views
0

我正在利用Eclipse Tycho構建具有GMF依賴關係的RCP應用程序。Eclipse Tycho無法解析正確的依賴關係

我收到以下錯誤 -

[ERROR] Internal error: java.lang.RuntimeException: Could not download artifacts from any repository 
[ERROR] osgi.bundle,org.eclipse.gmf.runtime.emf.core,1.4.1.v20120514-1615 
[ERROR] osgi.bundle,org.eclipse.gmf.runtime.emf.commands.core,1.4.0.v20120514-1615 
[ERROR] osgi.bundle,org.eclipse.gmf.runtime.emf.ui.properties,1.5.0.v20120514-1615 
[ERROR] osgi.bundle,org.eclipse.gmf.runtime.diagram.ui,1.6.0.v20120514-1615 
[ERROR] osgi.bundle,org.eclipse.gmf.runtime.diagram.ui.properties,1.4.2.v20120514-1615 
[ERROR] osgi.bundle,org.eclipse.gmf.runtime.diagram.ui.providers,1.5.0.v20120514-1615 
[ERROR] osgi.bundle,org.eclipse.gmf.runtime.diagram.ui.providers.ide,1.2.0.v20120514-1615 
[ERROR] osgi.bundle,org.eclipse.gmf.runtime.diagram.ui.render,1.6.0.v20120514-1615 
[ERROR] osgi.bundle,org.eclipse.gmf.runtime.diagram.ui.resources.editor,1.4.1.v20120514-1615 
[ERROR] osgi.bundle,org.eclipse.gmf.runtime.diagram.ui.resources.editor.ide,1.2.1.v20120514-1615 

我specifing在MANIFEST.MF以下依賴 -

org.eclipse.gmf.runtime.emf.core;bundle-version="1.4.1", 
org.eclipse.gmf.runtime.emf.commands.core;bundle-version="1.4.0", 
org.eclipse.gmf.runtime.emf.ui.properties;bundle-version="1.5.0", 
org.eclipse.gmf.runtime.diagram.ui;bundle-version="1.6.0", 
org.eclipse.gmf.runtime.diagram.ui.properties;bundle-version="1.4.2", 
org.eclipse.gmf.runtime.diagram.ui.providers;bundle-version="1.5.0", 
org.eclipse.gmf.runtime.diagram.ui.providers.ide;bundle-version="1.2.0", 
org.eclipse.gmf.runtime.diagram.ui.render;bundle-version="1.6.0", 
org.eclipse.gmf.runtime.lite.svg;bundle-version="1.0.0", 
org.eclipse.gmf.runtime.diagram.ui.resources.editor;bundle-version="1.4.1", 
org.eclipse.gmf.runtime.diagram.ui.resources.editor.ide;bundle-version="1.2.1", 

我所提供的存儲庫的位置對轉基因食品作爲捆綁 -

<repository> 
    <id>gmf-runtime</id> 
    <url>http://download.eclipse.org/modeling/gmp/gmf-runtime/updates/releases</url> 
    <layout>p2</layout> 
</repository> 

P2存儲庫具有以上所有JAR。唯一的區別是由於某種原因,Tycho正在尋找.v20120514-1615限定詞。但是,P2存儲庫具有.201302191707限定符。不知道爲什麼Tycho正在尋找特定的限定符,而不是解決到最新版本。

+0

似乎.v20120514-1615版本也在您的目標平臺中。您配置的某個其他p2存儲庫似乎包含gmf可安裝單元(請參閱content.jar/content.xml),但不包含相應的工件。 – oberlies 2013-04-26 11:18:23

+0

@oberlies:想知道是否有任何方法可以追蹤具有該可安裝單元的P2回購? maven/tycho調試標誌也許? – Pushkar 2013-04-27 16:38:44

+1

'-Dtycho.debug.resolver = true'打印出[目標平臺](http://wiki.eclipse.org/Tycho/Target_Platform#Effective_content_of_the_target_platform)中的所有IU,但是AFAIK並未說明哪個p2存儲庫是內容來自。儘管爲此打開一個[增強請求](https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Tycho)。 – oberlies 2013-04-29 08:39:08

回答

2

看來原來的P2回購已經損壞。問題是,即使插件沒有被引用,Tycho也會嘗試索引整個P2回購。爲了解決這個問題是什麼做的是 -

  1. 打開。產品文件,並從出口產品構件出口產品
  2. 複製「庫」文件夾,並將其放置在共享位置
  3. 在Maven的標籤如果是外部存儲庫,pom.xml會提供此存儲庫的位置。未來的所有Tycho版本都將使用此版本庫

這樣回購規模很小,所有構建問題都得到解決。

+0

你的意思是「即使沒有引用_.jars_,Tycho試圖索引整個P2回購」? – 2013-05-29 08:56:19

+0

@PaulVerest:不幸的是。但索引本質上意味着它會檢查P2回購中的content.jar文件,並查看是否可以解決所有問題。只要P2回購已正確設置,一切正常。我發現的最好方式是在我們自己的服務器上反映回購(可能有更好的方法)。 – Pushkar 2013-05-29 09:32:06