簡體   English   中英

Eclipse XMLEditor示例項目的Maven + Tycho缺少POM的未解決依賴項

[英]Maven+Tycho POM-less Unresolved dependencies for Eclipse XMLEditor Example Project

我為此困擾了將近一個星期。 我正在嘗試為公司的其中一個DSL創建一個eclipse編輯器插件。

我按照本教程設置了插件,功能和更新站點。 清潔和驗證工作正常,因為實際上沒有任何東西! 我確實收到有關必須至少包含一個擴展或擴展點的插件的警告。

然后,我使用Eclipse中的擴展向導為基本XML編輯器添加擴展:

在此處輸入圖片說明

這增加了4個依賴項:

在此處輸入圖片說明

現在,當我運行mvn clean verify我收到有關無法解析依賴關系的錯誤消息:

[INFO] Scanning for projects...
C:\ui\bundles\com.mycompany.example.ui.editors.ontology\.polyglot.build.properties
C:\ui\features\com.mycompany.example.ui.feature\.polyglot.build.properties
[INFO] Computing target platform for MavenProject: com.mycompany.example.ui:com.mycompany.example.ui.editors.ontology:1.0.0-SNAPSHOT @ C:\ui\bundles\com.mycompany.example.ui.editors.ontology\.polyglot.build.properties
[INFO] Resolving dependencies of MavenProject: com.mycompany.example.ui:com.mycompany.example.ui.editors.ontology:1.0.0-SNAPSHOT @ C:\ui\bundles\com.mycompany.example.ui.editors.ontology\.polyglot.build.properties
[INFO] {osgi.os=win32, osgi.ws=win32, org.eclipse.update.install.features=true, osgi.arch=x86_64}
[ERROR] Cannot resolve project dependencies:
[ERROR]   Software being installed: com.mycompany.example.ui.editors.ontology 1.0.0.qualifier
[ERROR]   Missing requirement: com.mycompany.example.ui.editors.ontology 1.0.0.qualifier requires 'osgi.bundle; org.eclipse.core.runtime 0.0.0' but it could not be found
[ERROR] 
[ERROR] See http://wiki.eclipse.org/Tycho/Dependency_Resolution_Troubleshooting for help.
[ERROR] Cannot resolve dependencies of MavenProject: com.mycompany.example.ui:com.mycompany.example.ui.editors.ontology:1.0.0-SNAPSHOT @ C:\ui\bundles\com.mycompany.example.ui.editors.ontology\.polyglot.build.properties: See log for details -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MavenExecutionException

在父項目POM中,我有Eclipse發布存儲庫,如下所示:

<properties>
    <eclipse-repo.url>https://download.eclipse.org/releases/2019-06/</eclipse-repo.url>
</properties>

<repositories>
    <repository>
        <id>eclipse-release</id>
        <url>${eclipse-repo.url}</url>
        <layout>p2</layout>
    </repository>
</repositories>

任何幫助將不勝感激! 我也了解Xtext,但是我們已經有了很多解析/建模/驗證基礎結構,我希望以此為編輯器的基礎,而不是在xtext中重新創建DLS只是為了獲得一個編輯器,然后擁有兩個語法保持同步。

Maven 3.6.1( https://issues.apache.org/jira/browse/MNG-6642 )中還有另一個Bug可以阻止

<repository>
    <id>eclipse-release</id>
    <url>${eclipse-repo.url}</url>
    <layout>p2</layout>
</repository>

從工作。 因此請使用3.6.0(如果找到其他錯誤的解決方法,請使用3.6.2)

或者您使用真實的目標平台而不是該回購列表https://wiki.eclipse.org/Tycho/Target_Platform#Target_files

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM