eclipsemavenm2e

Failed to collect dependencies in Maven project


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


Solution

  • After a lot of headaches and time I simply realized that there is a huge problem with the m2e plugin and its versions. Thus I solved my problem by making entering the project and making mvn clean compile followed by mvn install.

    Thanks for the help anyway!