Building a WAR File

See Also 

In , the IDE builds a WAR file from your project sources every time you run the Build command. The WAR file is generated to the dist subfolder of your project folder.

To change the WAR name and location:

  1. In the Files window, go to the nbproject folder in your project folder and open project.properties.
  2. Enter the full path to the WAR file in the dist.dir property and the WAR file's name in the war.name property. Notice that these two properties are concatenated to form the dist.war property.

To specify which files are added to the WAR file:

  1. Right-click the project node in the Projects window and choose Properties.
  2. Click Packaging and configure the filter and compression settings.

To disable generation of a WAR file for a project:

  1. In the Files window, open your project folder and open build.xml.
  2. Override the do-dist target to have no contents and no dependencies. For example, add the following to build.xml:
    <target name="do-dist" />
tip In , WAR file creation is controlled by your Ant script.
See Also
Building Tasks: Quick Reference
Building a Project
Compiling a Single File
Managing the Classpath
Customizing the Ant Build Script

Legal Notices