Question

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

Was it helpful?

Solution 2

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!

OTHER TIPS

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".

Looks like you are missing some Maven repos. Ask for your friend's .m2/settings.xml, and you'll probably want to update the POM to include the repositories there.

Try to update the path for settings.xml file in your IDE. Windows--> Preferences -->Maven--> user settings--> navigate to settings file. It worked for me

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top