简体   繁体   English

Maven更新项目和依赖项

[英]Maven update project and dependencies

In an application that worked until now, I run in Eclipse the command Maven->Update project and I started getting errors. 在到目前为止一直有效的应用程序中,我在Eclipse中运行命令Maven-> Update project,然后开始出现错误。

I tried to fix it by deleting all the local repository and running Maven->Update project again. 我试图通过删除所有本地存储库并再次运行Maven-> Update项目来修复它。 But these are the errors that I still see in my Markers view: 但是这些是我仍然在“标记”视图中看到的错误:

Missing artifact org.slf4j:slf4j-api:jar:1.6.6

Missing artifact org.slf4j:slf4j-api:jar:1.6.6

ArtifactTransferException: Failure to transfer org.slf4j:slf4j-api:jar:1.6.6 from http://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of 

ArtifactTransferException: Failure to transfer org.slf4j:slf4j-api:jar:1.6.6 from http://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of 

Error occured processing XML 'org/springframework/transaction/interceptor/TransactionInterceptor'. See Error Log for more details

The code hasn't changed and worked fine before. 该代码之前没有更改,并且可以正常工作。

Any idea on how I can fix these errors? 关于如何解决这些错误的任何想法吗?

I am not sure about the particular mentioned jar. 我不确定提到的那个罐子。 But when you do build you should be connected to internet cause some external jar referred in POM get downloaded while building your project. 但是,当您进行构建时,应该连接到Internet,这会导致在构建项目时下载POM中引用的一些外部jar。 Also please check whether the mentioned jar is is maven repository or not. 另外,请检查所提到的jar是否为Maven存储库。 Above jar is related to slf4j so i think it will be resolved if you are connected to internet . 上面的jar与slf4j有关,所以我认为如果您连接到Internet就会解决。

Perhaps the SL4J jar is partially downloaded in your maven local repository. 也许SL4J jar已部分下载到您的Maven本地存储库中。 Try deleting it if it exists in the local repository. 如果本地存储库中存在它,请尝试将其删除。 If that fails try creating a new dir called repository; 如果失败,请尝试创建一个新的目录,称为存储库; mine is stored in ~/.m2 (ubuntu). 我的存储在〜/ .m2(ubuntu)中。 Out of paranoia I rename the current dir as not to lose the jars already inside it. 出于偏执,我将当前目录重命名为不会丢失其中已存在的jar。

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

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