Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Maven: Failed to read artifact descriptor

People also ask

What is the use of Maven dependency plugin?

The dependency plugin provides the capability to manipulate artifacts. It can copy and/or unpack artifacts from local or remote repositories to a specified location.

What is Java Maven project?

Maven is written in Java and is used to build projects written in C#, Scala, Ruby, etc. Based on the Project Object Model (POM), this tool has made the lives of Java developers easier while developing reports, checks build and testing automation setups.


You can always try mvn -U clean install

-U forces a check for updated releases and snapshots on remote repositories.


This problem can occur if you have some child projects that refer to a parent pom and you have not installed from the parent pom directory (run mvn install from the parent directory). One of the child projects may depend on a sibling project and when it goes to read the pom of the sibling, it will fail with the error mentioned in the question unless you have installed from the parent pom directory at least once.

I just ran into this problem when moving a project to a new computer. I was in the habit of running commands from the child project and didn't run install on the parent.


Had the same issue with IntelliJ IDEA and following worked.

  • Go to File
  • Select Settings
  • Select Build, Execution, Deployments
  • Select Build Tools from drop down
  • Select Maven from drop down
  • Tick the Always update snapshots check box

screen shot of IntelliJ 2017.2 > Preferences/Settings > Build, Execution, Deployment > Build Tools > Maven > Always update snapshots (checkbox)


If you are using Eclipse, Right Click on your Project -> Maven -> Update Project. It will open Update Maven Project dialog box.

In that dialog box, check Force Update of Snapshots/Releases checkbox & click OK. (Please refer image below)

Update Maven Project Dialog Box

This worked for me !


If you're using Eclipse:

  • Right click on project > Properties > Maven

  • Make sure that Resolve dependencies from workspace projects is not clicked.


I know I'm pretty late to the conversation, but I had this problem too. I think the issue was my company's firewall. My solution was to unplug from the network, connect to our open wireless and then force an update via Eclipse. This resolved everything.