NetBeans IDE project cannot resolve dependencies

After using eclipse for ages, I have been porting myself to NetBeans IDE. I open my existing maven project and everything looks fine, but when I try to create a project, it throws an error saying “Could not resolve dependencies for the project”, although the JAR files are in my .m2 directory.

I am using ubuntu 12.10 and netbeans version 7.3.1

Any suggestions on this subject are greatly appreciated.

0
source share
2 answers

"Any suggestions on this are greatly appreciated."

This may not solve your current problem, but this is an offer for the future or even if you want to do it for your current projects.

enter image description here

First of all, you need to make sure that your project has been imported correctly as a maven project. As you can see in the image, all maven projects have a little m in the upper left corner of the project logo. The first project is a maven web application, the second is a regular maven application, and the last regular Java application. If you see your projects as maven applications, then all you need to do is right-click Dependencies and select add dependeny . You can find your local repo in the dialog that opens. After you select, you will automatically get into pom and you will see jar in the Dependencies folder.

If you do not see the depencies folder, your projects were not imported as maven projects.

+1
source

I had a different situation.
My .m2 folder was a little big, so I decided to delete it.
When I opened one Vaadin project that I was working on, which consists of regular modules, almost all the dependencies were resolved. I say almost because one module, depending on another independent maven library project, cannot solve three dependencies at all!
After some time, I opened this independent library module and rebuilt it. As soon as I started, I noticed that the missing dependencies started to load, and the problem was resolved immediately!
Hope this experience helps.

0
source

All Articles