简体   繁体   English

Maven项目:无法读取工件描述符

[英]Maven Project: Failed to read artifact descriptor

I have cloned the git repository from https://github.com/viatra/org.eclipse.viatra.examples and imported the project incquery-demo-generic (located in /query/headless-maven) as a Maven Project in Eclipse. 我已经从https://github.com/viatra/org.eclipse.viatra.examples克隆了git存储库,并将项目incquery-demo-generic(位于/ query / headless-maven中)导入为Eclipse中的Maven项目。 Unfortunately I get the following error when I open the project's pom.xml: 不幸的是,打开项目的pom.xml时出现以下错误:

在此处输入图片说明

Furthermore everytime when I click on "Run As" -> "Maven install" or "Maven build..." I get the following error message in the console: 此外,每次当我单击“运行方式”->“ Maven安装”或“ Maven构建...”时,我都会在控制台中收到以下错误消息:

Failed to execute goal on project incquery-demo-generic: Could not resolve dependencies for project hu.bme.mit.incquery:incquery-demo-generic:jar:0.0.1-SNAPSHOT: Failed to collect dependencies at org.eclipse.incquery:runtime:jar:0.8.0-SNAPSHOT: Failed to read artifact descriptor for org.eclipse.incquery:runtime:jar:0.8.0-SNAPSHOT: Failure to find org.eclipse.incquery:org.eclipse.incquery.parent:pom:0.8.0-SNAPSHOT in https://repo.eclipse.org/content/repositories/emf-incquery-snapshots/ was cached in the local repository, resolution will not be reattempted until the update interval of incquery-snapshot has elapsed or updates are forced -> [Help 1] Blockquote 无法对项目incquery-demo-generic执行目标:无法解析项目hu.bme.mit.incquery:incquery-demo-generic:jar:0.0.1-SNAPSHOT的依赖项:无法在org.eclipse.incquery上收集依赖项:runtime:jar:0.8.0-SNAPSHOT:无法读取org.eclipse.incquery的工件描述符:runtime:jar:0.8.0-SNAPSHOT:找不到org.eclipse.incquery:org.eclipse.incquery.parent: https://repo.eclipse.org/content/repositories/emf-incquery-snapshots/中的 pom:0.8.0-SNAPSHOT已缓存在本地存储库中,直到经过incquery-snapshot的更新间隔后,才会重新尝试解析或强制更新-> [Help 1] Blockquote

In the Maven Dependencies Folder I can find some, but not all necessary jar files. 在Maven Dependencies文件夹中,我可以找到一些但不是全部必要的jar文件。

I have tried "Project clean", "Maven update", "Maven build... (Goal: clean package)" and to delete the .m2 repository and to re-build the maven project, but nothing helps. 我已经尝试过“项目清理”,“ Maven更新”,“ Maven构建...(目标:清洁软件包)”并删除.m2存储库并重新构建Maven项目,但没有任何帮助。

I also tried to download some dependencies as .jar files and add them to the build-path, but they contain nothing but pom.xml and properties-files themself, thus I keep getting "cannot be resolved to a type" errors in relevant parts of the Java src-code. 我还尝试将某些依赖项下载为.jar文件并将其添加到构建路径中,但它们只包含pom.xml和属性文件,因此它们在相关部分中始终出现“无法解析为类型”错误Java src代码。

Can somebody successfully run this project in her/his eclipse? 有人可以在他/他的日食中成功运行该项目吗?

I am not an expert on Maven Projects so please tell me what to do in "layman words". 我不是Maven项目专家,所以请用“外行话”告诉我该怎么做。

Thanks & kind regards, MCRaven 谢谢与亲切的问候,MCRaven

The projects in the VIATRA examples repository (I notice it as one of the committers of the VIATRA project) are somewhat unusual: they are Eclipse plug-in projects that have Maven build informations added via Maven Tycho. VIATRA示例存储库中的项目(我注意到它是VIATRA项目的提交者之一)有些不同寻常:它们是Eclipse插件项目,具有通过Maven Tycho添加的Maven构建信息。

One more thing here: the 0.8.0 version of EMF-IncQuery bundles was released in 2014, thus it makes sense that the corresponding snapshot versions are removed. 这里还有一件事:2014年发布了EMF-IncQuery捆绑包的0.8.0版本,因此删除了相应的快照版本是有意义的。 This means to me that this example was not updated for a long time. 对我来说,这意味着该示例很长时间没有更新。 This is somewhat by design - some examples are not updated for each released version, but they are not are still available for references. 这在某种程度上是设计使然的-某些示例并未针对每个发行版本进行更新,但仍无法提供参考。 If you are explicitly interested in this example, please contact us on VIATRA project forums or Bugzilla and we will provide example-specific support there. 如果您对此示例有明确的兴趣,请通过VIATRA 项目论坛Bugzilla与我们联系,我们将在其中提供特定于示例的支持。

Inside Eclipse we usually not rely on Maven (and our experience is that Tycho-based projects often does not work with M2E correctly). 在Eclipse中,我们通常不依赖Maven(并且我们的经验是基于Tycho的项目通常无法正确地与M2E一起使用)。 You could try to update Maven dependencies for the org.eclipse.incquery projects to 0.8.0, but I am still unsure whether it will work or not. 您可以尝试将org.eclipse.incquery项目的Maven依赖关系更新为0.8.0,但是我仍然不确定它是否会起作用。

On the other hand, I'd rather suggest to install the old EMF-IncQuery version into your Eclipse instance and then simply rely on the Java Development Tools and the Plugin Development Environment to compile the project, and simply ignore any errors in the Maven descriptors for now. 另一方面,我建议将旧的EMF-IncQuery版本安装到您​​的Eclipse实例中,然后仅依靠Java开发工具和插件开发环境来编译项目,而忽略Maven描述符中的任何错误。目前。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM