Managing the Distribution JAR File Content


By default, all class files resulting from compilation, and all non-source files contained under the project's source root folder, are placed in the distribution JAR file. All classes and resources specified in the Libraries & Resources panel are also placed in this distribution JAR file.

Your project may contain files under its source root that should not be distributed. These files can be filtered in the following manner:

  1. Right-click your project in the Projects window and choose Properties.

  2. Select the Sources Filtering panel.

  3. Select the default filters provided that are appropriate for your project. Hovering your mouse over the checkbox text displays which regular expression is used to filter files from the distribution JAR file.

  4. In the Select Application Packages/Files field, make any necessary adjustments to the files to be distributed. Selected files are distributed.

    Deselect a node, and notice that all children nodes are also deselected. If any node is deselected, all of its ancestor nodes are grayed out to indicate a partial selection.

  5. Click OK to close the Project Properties dialog box.

    The next time you build the project, the selected files and resources will not be added to the distribution JAR file.



NetBeans IDE Field Guide(c) Developing Desktop, Web, Enterprise, and Mobile Applications
NetBeans IDE Field Guide(c) Developing Desktop, Web, Enterprise, and Mobile Applications
ISBN: N/A
EAN: N/A
Year: 2004
Pages: 279

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net