IBM® WebSphere® Portlet Factory WAR publishing scripts, including application server scripts, take this file into account when creating and publishing a WAR file.
Each line in the .excludeFromServer file specifies a file that you want excluded from the output WAR. File paths are relative to the project.
The contents of a typical .excludeFromServer file looks as follows:
A master version of the .excludeFromServer file is located in:
A version of .excludeFromServer file is placed at the top level of each project you create.
Global exclude across all projects
Make changes to the master version of the .excludeFromServer file at the location specified above, and your changes will be reflected in every project you create. For example, if you want to exclude a particular WebSphere Portlet Factory-generated artifact from every project, list the artifact in the master .excludeFromServer file.Exclude on a project-by-project basis
A common scenario is to exclude artifacts on a project-by-project basis. In this case, you work with the .excludeFromServer file located at the top level of a project. However, once you add artifacts to be excluded to the file, you must rebuild and/or regenerate the WAR so that your changes are picked up. This is necessary because the WAR created when you initially built the project did not exclude any artifacts. If you add excludes to this file after the project is created, these artifacts are no longer copied to the output, but they are already in the output as a result of the original publish operation. To delete the excluded files from the production WAR server, you must refresh/rebuild the WAR file to pick up your exclusions.
Parent topic: Excluding files from a published WAR: wpf7