NetBeans 可以自动构建 Java 自由格式 (Ant) 项目吗?

发布于 2024-08-21 06:36:22 字数 87 浏览 2 评论 0原文

每次保存后,我需要在项目浏览器中右键单击该项目,然后单击build。 有没有办法将 NetBeans 配置为在保存文件时自动构建项目?

After every save I need to right-click on the project in the project browser and click on build.
Is there a way to configure NetBeans to auto-build the project when I save a file?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

南笙 2024-08-28 06:36:22

请参阅保存时编译常见问题解答:http://wiki.netbeans.org/FaqCompileOnSave

我不使用 CoS我本人强烈推荐 Jenkins 来满足您的自动构建需求(以及更多): http://jenkins-ci.org /

See Compile on Save FAQ: http://wiki.netbeans.org/FaqCompileOnSave

I don't use CoS myself, I highly recommend Jenkins for your auto-build needs (and so much more): http://jenkins-ci.org/

墨落成白 2024-08-28 06:36:22

从 NetBeans 版本 8.0 开始,保存时编译选项不可用于自由格式项目。而且我认为它将来也不会提供。自由格式的真正想法是,IDE 不知道有关您的项目的任何信息,并且完全依赖于 ant 脚本和您提供的映射。

如果您不想每次更改文件时都构建整个项目,请在 ant 中创建一个目标来编译单个文件并将其映射到 IDE 命令compile.single。如果需要,您可以为此添加一个上下文菜单,尽管现有的键盘快捷键 F9 应该足够了。

您可以在此处阅读有关高级自由格式配置的更多信息 - 高级自由格式项目配置

The compile on save option is not available for free-form projects as of NetBeans version 8.0. And I don't think it will be made available in future too. The very idea of free-form is that that IDE does not know anything about your project and completely relies on the ant-scripts and the mappings you provide.

If you don't want to build an entire project every time you make changes to a file, create a target in ant to compile a single file and map it to the IDE command compile.single. You could add a context menu for that if required, although the existing keyboard shortcut F9 should suffice.

You can read more on the advance free-form configuration here - Advanced Free-Form Project Configuration

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文