Reputation: 1086
I'm getting multiple "missing artifact" and "failed to read artifact descriptor" errors on a Spring MVC project, for example:
Missing artifact com.google.guava:guava:jar:20.0
Failed to read artifact descriptor for com.brooksandrus:swfheader:jar:1.0
I'd like to know:
What I think of these errors:
maven clean install
failing with the following error: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
What I have already tried:
unable to find valid certification path to requested target
although it didn't help with the main problem that I mention about the 'Missing artifact' and 'Failed to read artifact descriptor'.None of these approaches had any effect on the problem.
Another important fact is that besides all these errors, Tomcat launches with success and the project is working properly.
Here is an example part of the pom file.
<?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>
Any ideas on how to deal with this are appreciated.
Upvotes: 3
Views: 2506
Reputation: 2001
First of all, it's always a good idea to run mvn
from command line. It isolates the problem from your IDE and shows logs when maven resolves artifacts.
Also, you can add -X
CLI option which produces more debug output and you should see some useful errors:
mvn clean install -X
Upvotes: 2
Reputation:
I had the same problem at work. My company has different networks. One of which is very strict and as a result I could not download from certain sites, that being from Maven Central. I found a post that was helpful for me: https://stackoverflow.com/a/22594051/7548672
Manually downloading the artifact directly into your .m2 folder is the best approach.
Other options to try:
close your project and reopen it.
Are you behind a proxy?
You can configure the proxy settings in the global or user settings.Try this? Window -> Preferences -> Maven. Do not automatically update dependencies from remote repositories option, then right-clicking on the project and selecting Maven-> Update Project.
Upvotes: 1