在 Maven Netbeans 中添加依赖项 [英] Adding dependencies in Maven Netbeans
问题描述
我已经创建了一个 Maven 项目并添加了我需要的依赖项(jar 文件);但是,netbeans 说它仍然找不到它.
I've created a Maven project and added the dependencies (jar files) that I need; however, netbeans says that it still cannot find it.
特别是在我的情况下,我将 jmf-2.1.1e.jar 文件添加到我的依赖项文件夹中.当我回到我的程序时,它仍然给我一个编译错误,它找不到 javax.media 包.
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.
推荐答案
您是否让 Netbeans 管理依赖项?
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".
这种方法至少适用于 NetBeans 7.4 和 8.0 beta.
This approach works at least in NetBeans 7.4 and 8.0 beta.
这篇关于在 Maven Netbeans 中添加依赖项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!