简体   繁体   English

Maven / Spring项目中缺少工件的问题

[英]Issue with missing artifacts in a Maven/Spring project

I'm trying to learn REST with a Spring/Maven context and so I'm going through a Pankaj Kumar (JournalDev) tutorial. 我正在尝试在Spring / Maven上下文中学习REST,因此我正在阅读Pankaj Kumar(JournalDev)教程。 I set up a Spring project in STS (Spring Tool Suite), and according to the tutorial, I will need to include the following dependencies: jackson-databind, jackson-core, and jackson-annotations. 我在STS(Spring工具套件)中设置了一个Spring项目,根据该教程,我将需要包括以下依赖项:jackson-databind,jackson-core和jackson-annotations。 I declared them in the pom.xml editor in STS. 我在STS的pom.xml编辑器中声明了它们。

I wanted to include the actual XML from the POM.xml file, everytime I tried to submit the question, I got the error "Your post appears to contain code that is not properly" and it would allow me to submit this posting at all. 我想包含POM.xml文件中的实际XML,每次尝试提交问题时,都会出现错误“您的帖子似乎包含不正确的代码”,这将使我完全可以提交此帖子。 It's not code, it's XML and I did indent by 4 spaces per the instructions. 它不是代码,它是XML,我按指令缩进了4个空格。 If you need to see the actual XML, please tell how to get around this issue with StackOverflow and I will gladly include the actual XML. 如果您需要查看实际的XML,请告诉我们如何使用StackOverflow解决此问题,我很乐意提供实际的XML。

I get three errors in the POM.xml file: 我在POM.xml文件中遇到三个错误:

Missing artifact com.fasterxml.jackson.core:jackson-databind:bundle:2.5.3
Missing artifact com.fasterxml.jackson.core:jackson-core:bundle:2.5.3
Missing artifact com.fasterxml.jackson.core:jackson-annotations:bundle:2.5.3

Basically, everything looks good to the extent of my knowledge in this situation. 基本上,在这种情况下,一切看起来都很不错。 Can anyone please help? 谁能帮忙吗?

Regarding pom.xml error, You will get it when added dependencies are not updated in .m2 repository. 关于pom.xml错误,如果未在.m2存储库中更新添加的依赖项,则会得到此错误。 Try it by deleting .m2 repository after closing STS. 关闭STS后,通过删除.m2存储库来尝试。 After deleting is finished, open STS and do the maven -> Update Project, it will update .m2 repository automatically. 删除完成后,打开STS并执行maven-> Update Project,它将自动更新.m2存储库。

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

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