Java ';丢失的工件';和';无法读取工件描述符';springmvc项目中的错误
我在一个Spring MVC项目中遇到多个“缺少工件”和“读取工件描述符失败”错误,例如:Java ';丢失的工件';和';无法读取工件描述符';springmvc项目中的错误,java,spring,maven,spring-mvc,pkix,Java,Spring,Maven,Spring Mvc,Pkix,我在一个Spring MVC项目中遇到多个“缺少工件”和“读取工件描述符失败”错误,例如: Missing artifact com.google.guava:guava:jar:20.0 无法读取com的工件描述符。brooksandrus:swfheader:jar:1.0 我想知道: 它们到底是什么意思 如何解决这些问题 我对这些错误的看法: 另外,我在公司防火墙后面运行项目的事实可能与maven clean install失败有关,错误如下:PKIX路径构建失败:sun.sec
Missing artifact com.google.guava:guava:jar:20.0
无法读取com的工件描述符。brooksandrus:swfheader:jar:1.0
- 它们到底是什么意思
- 如何解决这些问题
- 另外,我在公司防火墙后面运行项目的事实可能与
失败有关,错误如下:maven clean install
PKIX路径构建失败:sun.security.provider.certpath.SunCertPathBuilderException:无法找到请求目标的有效认证路径
实际上,在cacerts文件中安装了每个必需的证书后,就解决了这个问题
- 已检查快照强制更新的更新Maven项目
- 删除整个.m2文件夹,然后尝试maven更新李>
- 然后在cacerts文件上添加证书,然后重新运行前两个步骤。实际上,这就是我如何解决这个错误的方法。
,尽管它对我提到的“缺少工件”和“读取工件描述符失败”的主要问题没有帮助无法找到请求目标的有效认证路径。
<?xml version="1.0" encoding="UTF-8"?>
<project
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>gr.xxxxxx</groupId>
<artifactId>xxxxxx</artifactId>
<version>2.2.7</version>
<packaging>war</packaging>
<name>xxxxxx</name>
<description>xxxxxx</description>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<spring.version>4.3.23.RELEASE</spring.version>
<spring.security.version>4.2.12.RELEASE</spring.security.version>
<hibernate.version>4.1.4.Final</hibernate.version>
<build.plugins.plugin.version.compiler>3.3</build.plugins.plugin.version.compiler>
<build.plugins.plugin.version.javadoc>2.10.3</build.plugins.plugin.version.javadoc>
<junit.version>4.11</junit.version>
<hamcrest.version>1.3</hamcrest.version>
<tika.version>1.7</tika.version>
<mockito.version>1.10.19</mockito.version>
<doclava.version>1.0.6</doclava.version>
<adwords.version>4.7.0</adwords.version>
<hikari.version>3.3.1</hikari.version>
<mariadb.version>2.4.2</mariadb.version>
<thymeleaf.version>3.0.11.RELEASE</thymeleaf.version>
<stagemonitor.version>0.88.10</stagemonitor.version>
<javamelody.version>1.79.0</javamelody.version>
<dynamicreports.version>5.0.0</dynamicreports.version>
<timestamp>${maven.build.timestamp}</timestamp>
<maven.build.timestamp.format>dd/MM/yyyy HH:mm</maven.build.timestamp.format>
</properties>
<repositories>
<repository>
<id>jsqlparser-snapshots</id>
<snapshots>
<enabled>true</enabled>
</snapshots>
<url>https://oss.sonatype.org/content/groups/public/</url>
</repository>
<repository>
<id>mulesoft-releases</id>
<name>MuleSoft Releases Repository</name>
<url>http://repository.mulesoft.org/releases/</url>
<layout>default</layout>
</repository>
4.0.0
gr.xxxxxx
xxxxxx
2.2.7
战争
xxxxxx
xxxxxx
UTF-8
4.3.23.发布
4.2.12.1发布
4.1.4.最终版本
3.3
2.10.3
4.11
1.3
1.7
1.10.19
1.0.6
4.7.0
3.3.1
2.4.2
3.0.11.1发布
0.88.10
1.79.0
5.0.0
${maven.build.timestamp}
年月日HH:MM
jsqlparser快照
真的
https://oss.sonatype.org/content/groups/public/
mulesoft发布
MuleSoft发布存储库
http://repository.mulesoft.org/releases/
违约
如果您有任何关于如何处理此问题的想法,我们将不胜感激。我在工作中也遇到过同样的问题。我的公司有不同的网络。其中一个非常严格,因此我无法从某些网站下载,那就是Maven Central。我发现了一个对我有帮助的帖子: 手动将工件直接下载到.m2文件夹是最好的方法 其他可供尝试的选项: 关闭项目并重新打开它 你支持代理吗?
您可以在“全局设置”或“用户设置”中设置 试试这个?窗口->首选项->Maven。不要从远程存储库自动更新依赖项选项,然后右键单击项目并选择Maven->更新项目
首先,从命令行运行
mvn
总是一个好主意。它将问题与IDE隔离,并在maven解决工件时显示日志
此外,您还可以添加-X
,这将产生更多调试输出,您应该会看到一些有用的错误:
mvn clean install -X
手动下载295个jar文件并运行等量的命令来安装它们不是一个好主意。“如果只是一两个,几个或十几个,那么我会的。”Christoskarapaps我在你原来的帖子中错过了关于295个jar文件的那部分。能否请您在pom中添加一个您所做工作的示例?这将有助于其他人帮助您。不,没有代理。@Christoskarapaps您在使用IntelliJ吗?不,我在使用Spring Tools for Eclipse 4您能添加一个pom示例吗?谢谢。我不明白pom本身有什么问题?无论如何,我已经发布了它的一部分。请从命令行运行带有
-X
参数的mvn
命令。您将看到更多调试日志和可能有用的错误。@AndriyBudzinskyy很棒!!!成功了!我运行了mvn clean install-X
我修复了两个警告,它们是关于在pom.xml
中重复声明依赖项,以及重复声明具有冲突版本的依赖项,重新运行mvn clean install-X
,最后没有“丢失的工件”或者Eclipse中任何其他依赖项相关的错误!这终于解决了@AndriyBudzinskyy你可能应该写一个答案,这样我就可以通过你的赏金积分。我同意在命令行中使用mvn,git也是如此。