Adding dependencies in Maven Netbeans

Allen picture Allen · Jul 25, 2011 · Viewed 37.8k times · Source

I've created a Maven project and added the dependencies (jar files) that I need; however, netbeans says that it still cannot find it.

Specifically in my case, I added the jmf-2.1.1e.jar file into my dependencies folder. When I go back to my program it still gives me the compile error that it cannot find the javax.media package.

Answer

Basil Bourque picture Basil Bourque · Feb 1, 2014

Did you let Netbeans manage the dependency?

In your "Projects" listing, find and context+click on the "Dependencies" folder in the list. From the context menu, choose "Add Dependency".

screen shot of Projects listing with context menu of Dependencies folder

This approach works at least in NetBeans 7.4 and 8.0 beta.