Netbeans 中的 Ant:覆盖运行目标不起作用 [英] Ant in Netbeans: overriding run target doesn't work
本文介绍了Netbeans 中的 Ant:覆盖运行目标不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试覆盖 Netbeans 项目中的运行"目标.我正在做的是编辑文件 build.xml
:
I am trying to override the "run" target in a Netbeans project. What I'm doing is editing the file build.xml
:
<project name="Test123" default="default" basedir=".">
<import file="nbproject/build-impl.xml"/>
<target depends="init,compile" name="run">
<echo>AAAAAAAAAAAAAAAAAAAAAA</echo>
</target>
<target depends="init,compile-single" name="run-single">
<echo>AAAAAAAAAAAAAAAAAAAAAA</echo>
</target>
</project>
我试图同时覆盖run"和run-single",但这两者都没有改变任何东西.当按下 F6
时,项目的 Main 类会像以前一样执行.不打印测试消息 (AAA...
).
I tried to override both "run" and "run-single", but both things doesn't change anything. When pressing F6
, the project's Main class is executed as before. The test message (AAA...
) is not printed.
为 Netbeans 创建了错误报告.
推荐答案
解决方案是,正如我在 错误报告,关闭编译保存.
The solutions is, as mentioned in the answer to my bug report, to turn off compile-on-save.
这篇关于Netbeans 中的 Ant:覆盖运行目标不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文