[英]Adding a Maven dependency to Netbeans 6.9.1
I seem to be having a problem with Netbeans 6.9.1. Netbeans 6.9.1 似乎有问题。 (The same problem occurs in Netbeans 7.0, but I can't use it because of other problems.)
(同样的问题出现在Netbeans 7.0,但是因为其他问题我无法使用。)
I am writing a project using Maven and add a dependency to the pom.xml
file (eg: junit).我正在使用 Maven 编写一个项目,并向
pom.xml
文件添加依赖项(例如:junit)。
I right click the "Libraries" item in the project tree and select "Download missing dependencies".我右键单击项目树中的“库”项和 select“下载缺少的依赖项”。
I try to add the annotation @Test
in the editor window and it gets flagged as unknown.我尝试在编辑器 window 中添加注释
@Test
,它被标记为未知。
I add an import org.junit.Test
我添加了一个
import org.junit.Test
Netbeans then complains that "junit is not a member of org". Netbeans 然后抱怨“junit 不是 org 的成员”。
I am using the Scala plugin.我正在使用 Scala 插件。
I have the same problem not only for Maven projects, but also for Ant-based ones.我不仅对 Maven 项目有同样的问题,对于基于 Ant 的项目也有同样的问题。 In the most cases, "Reset Scala Plugin" + reopening the file works for me.
在大多数情况下,“重置 Scala 插件”+重新打开文件对我有用。 When it doesn't help (sigh), I'm restarting the IDE.
当它没有帮助时(叹气),我正在重新启动 IDE。
Also, you can clone https://github.com/dcaoyuan/nbscala.git , and build from sources (if that's a bug in the plugin, there's a good chance that it's already fixed in the master).此外,您可以克隆https://github.com/dcaoyuan/nbscala.git ,并从源代码构建(如果这是插件中的错误,很有可能它已经在主服务器中修复)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.