The JAR Contents property editor enables you to specify which files you would like included in your JAR file.
To open the JAR Contents property editor:
Select directories and files in the Source panel. Then click Add to have them added to the JAR file. When you add a directory to a JAR, you also add all of its contents.
The Source panel displays a tree view of all filesystems mounted and visible in the Explorer. You can navigate this tree and select directories you would like to add to your JAR file. When you select a directory to add, click the Add button in the middle of the property editor.
The top of the Source panel contains two buttons. When you have a directory node selected, you
can click the button
to make this directory appear as the root directory in the window.
The directories one level below this new window root then are considered the new package roots.
If you then select a file or directory and click Add, it is added to the JAR with its
target based on the new package root. For example, you could have the following hierarchy,
displayed in the Source panel:
MyFilesystem mypackage A.class mysubpackage B.class C.class MyOtherFilesystemIf you select mypackage and click the
Clicking the
button
in the Source panel moves the root up one level.
Files and directories appear in the Chosen Content panel after you have selected them in the Source panel and clicked Add. You can remove entries from Chosen Content by clicking Remove All. Or you can select the entry you want to remove and click Remove.
In the Directory Prefix field, you can deepen the path of the files that you are about to add to the Chosen Content panel. For example, if a file's path is MyPackage/MyClass.class by default and you type org/acme/ in the Directory Prefix field, the directory structure in the JAR file becomes org/acme/MyPackage/MyClass.class.
Set the prefix before you add entries to the Chosen Content panel. The prefix does not apply to entries that you have already added.
The Target Directory field shows in which directory the chosen content will appear in the JAR file. You can edit this field if you want to change the target for that particular entry. This field is empty for entries you have added without a relative root or a prefix. However, the entries maintain their default package structure in the resulting JAR file.
The Target Name field applies only to items that are individual files. You can specify that the item is included in the JAR with a different file name. If you leave this field blank, the source file's name is used.