Can NetBeans auto-build java free-form (Ant) projects?

杀马特。学长 韩版系。学妹 提交于 2019-12-23 18:01:02

问题


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?


回答1:


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/




回答2:


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



来源:https://stackoverflow.com/questions/2254187/can-netbeans-auto-build-java-free-form-ant-projects

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!