How to Create a War File in Netbeans

In most default configurations netbeans, does not create a war file in the dist folder where you would expect it. By default it often just copies the exploded war file into the jboss or glassfish deploy folder.

In order to create a war file:

  1. Right-Click your project in the explorer
  2. Select Properties
  3. Go to Build and Run
  4. From the ‘Build Project’ drop-down select ‘archive’
  5. Hit OK
  6. Right Click on your project
  7. Select Build (this will create the war)

Go to your projects//dist folder and you will see your war file