When I try to build or compile my Maven project I get the following error message:
[ERROR] Failed to execute goal on project dss-services: Could not resolve dependencies for project net.jnd.thesis:dss-services:jar:0.0.1-SNAPSHOT: Failed to collect dependencies for [log4j:log4j:jar:1.2.16 (compile), org.slf4j:slf4j-api:jar:1.6.4 (compile), org.slf4j:jcl-over-slf4j:jar:1.6.4 (compile), org.slf4j:slf4j-log4j12:jar:1.6.4 (compile), net.sf.flexjson:flexjson:jar:2.1 (compile), commons-beanutils:commons-beanutils:jar:1.8.3 (compile), org.apache.commons:commons-lang3:jar:3.1 (compile), org.eclipse.jetty:jetty-websocket:jar:8.1.4.v20120524 (compile), net.jnd.thesis:dss-common:jar:0.0.1-SNAPSHOT (compile)]: Failed to read artifact descriptor for net.jnd.thesis:dss-common:jar:0.0.1-SNAPSHOT: Could not find artifact net.jnd.thesis:dss:pom:0.0.1-SNAPSHOT -> [Help 1]
During my research I found two possible solutions:
However, the answers provided do not apply because I already re-created the project from zero (and I do not see how changing the name of the directory will help) and because my error message differs from the error messages presented in those specific cases.
I think that my m2e plugin in Eclipse must have some sort of configurations issue and therefore it cannot download nor find the needed Maven artifacts, but I have no idea on how to solve the problem :S
In Maven, you can use Apache Maven Dependency Plugin, goal dependency:purge-local-repository to remove the project dependencies from the local repository, and re-download it again.
My problem solved by right click on project -> Maven -> Update project. Then the Maven Dependencies appear on the project explore. Save this answer. Show activity on this post.
Could you try use only console ?
"mvn clean compile" should be enough to check if problem is with eclipse or not.
Sometimes I had problem with dependencies in some maven project, and usually was because i didn't add a specific repository for them. Some dependencies are not installed in maven central repo, so you must check if your dependencies ara available in this repo. If not, you can add more repositories in your pom in order to tell maven "hey look for my dependencies in this other repo too".
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With