7

Is there any way to manually redeploy project after making certain changes to source ?

I disabled deployOnSave option in Netbeans to prevent unnecessary redeploys while I make trivial changes in code. Perhaps a redeploy button in toolbar or anything like that would be helpful.


Using Netbeans 7.2

Rajat Gupta
  • 25,853
  • 63
  • 179
  • 294

4 Answers4

4
  1. Right Click on Project
  2. Properties
  3. Run Sub Menu
  4. Deploy On Save Check-box (uncheck this One)

Put a shortcut key for deploy

  1. Tools Menu
  2. Options
  3. Key Map Sub Menu
  4. Search Deploy And Set Your Key Combination
Kayis Rahman
  • 352
  • 3
  • 13
  • How would you do this in Netbeans 8.2 ? The "Deploy" function is not in the Key Map menu :/ nor can I find the "Deploy on Save" checkbox in project properties. – Jack Berstrem May 03 '17 at 19:19
0

Add the server to your managed servers on Netbeans, got to Windows -> Services. When you've added your server edit the properties of your project and set the just added server as the default server for the project. Now you can just do a clean from the toolbar button and then a run when you want to deploy your project.

Atropo
  • 12,231
  • 6
  • 49
  • 62
  • 2
    that's not like the normal redeploy like when deployOnSave is enabled & takes much longer time. That's not an optimal way to redeploy! – Rajat Gupta Dec 21 '12 at 18:13
  • I don't see the differences between a `run` button on the toolbar and a `redeploy` button – Atropo Dec 31 '12 at 09:53
0

When you disable deployOnSave then when you want to re-deploy just enable deployOnSave in project properties. Server will re-deploy and you can disable deployOnSave again.

You can add shortcut for accessing project settings.

Clicking Debug or Run button will start full deploy, eg. for maven project it will starts with tests, etc..., un-deploy, deploy.

0

We can do this way:

  1. Right click on project > Properties > Build > Compile > Compile on Save is checked.
  2. Attach Debugger (google for it)
  3. Debug > Apply Code Changes
Hai Nguyen
  • 1,675
  • 19
  • 14