0

I know this question has been asked before ( Can NetBeans auto-build java free-form (Ant) projects? ), but it was never answered. What i am looking for is a way to build & deploy my netbeans project using ant, just as if u clicked build and then deploy, whenever i save a file, including static files (js and css). Compile on Save does not use Ant.

I need this, because i have a custom build.xml, and the build time when only a couple of files changed is less then a sec (so not significally slower then Compile on Save).

Plugins welcome.

Community
  • 1
  • 1
Kicsi
  • 1,173
  • 10
  • 22

2 Answers2

0

If you use the "Files" view of your NetBeans project, and right click the Ant build script it should list a number of targets in the "Run Targets" submenu of the popup menu. Clicking the target executes it, so clicking the correct target should solve your question.

EDIT:

Additionally, when you click the ant script the members/functions view should populate with a list of Ant targets. In turn, when you right click an Ant target you can opt to create a shortcut to it (which should add it as a button or menu entry to your NetBeans UI).

user268396
  • 11,576
  • 2
  • 31
  • 26
  • I want it to **automatically** build and deploy my project whenever i **save any file** in it. I can already run the right script if i click on build. – Kicsi Jan 05 '13 at 03:08
  • I still do not want to click anything in the ui. For that i can right-click and build the project, that already calls the right target in my ant. I want the Behaviour of "Compile on Save", when it autobuilds the changed files whenever you edit (and save) one of them, but instead just compiling/copying the file to the build dir, it sould call the ant build target. – Kicsi Jan 05 '13 at 03:18
0

Turns out deploy will save all files and build the project, so binding Deploy to a hotkey and using that instead of Ctrl+S did the trick.

Kicsi
  • 1,173
  • 10
  • 22