Reputation: 185
I lately had some issues with some Maven dependencies and came across the error: "Failed to read artifact descriptor ...".
My question is not really about the error but more about the artifact descriptor itself. I would like to know what the actual problem is or what's creating the problem and I did not really find an explanation for what artifact descriptors are, so I wondered if someone could help me.
Upvotes: 10
Views: 4066
Reputation: 137289
In other words, it's the POM. The POM is the Maven specific file that describes an artifact.
Maven 3.3.9 uses Eclipse Aether behind the scenes (which has been incorporated into Maven 3.5.0 itself as part of the Maven Resolver API), and it provides the class ArtifactDescriptorReader
, explaining:
Provides information about an artifact that is relevant to transitive dependency resolution. Each artifact is expected to have an accompanying artifact descriptor that among others lists the direct dependencies of the artifact.
The Javadoc of its sole readArtifactDescriptor
method is:
Gets information about an artifact like its direct dependencies and potential relocations.
So when you have an error that goes like "Failed to read artifact descriptor...", it means that the POM could not be read, or could not be resolved. Typically, it follows from network issues where the downloaded POM was corrupted, where Internet access is proxied and Maven isn't rightly configured, etc.
Upvotes: 10