File parameters
Following the options, an arbitrary number of file or directory paths can be
specified, possibly intermixed with special parameters.
If a specific file path is encountered more than once, only the first
file is copied to the output, which means that the order of parameters
may be relevant.
How a file parameter is processed, depends on its type. Legal parameters
are class names, files, directories, patterns and special parameters
(pseudo options).
- Classes:
Classes are specified in the form
classname.class .
Autojar searches the class path for the corresponding file. If found, the
file is copied to the output archive. Autojar then scans the file's
bytecode for other referenced classes and repeats this process recursively
as long as necessary.
The last component of the class name may contain wildcards * and ?. In
this case, all classes matching the pattern are looked up and inserted. For
example, a.b.*.class copies all classes from the package
a.b to the output archive.
A pattern of the form **.class causes a recursive copy. If
a parameter a.b.**.class is given, all classes belonging to
package a.b and all classes belonging to its subpackages
(a.b.x , a.b.x.y , a.b.z etc.) will be
included.
- .jar and .war files:
All files from the archive are copied to the output, if not yet present,
except the "META-INF" directory. Class files are treated as described
above.
- .zip files:
Like .jar files, but class files are not handled specially.
- Other files:
If the path denotes an existing file, it is copied to the output.
Otherwise, if the path is relative, and a search path for files has been
provided (option -p or -b), Autojar tries to find the corresponding file
using the search path. Like with classes, the name part may contain
wildcards. If the last component is
** , the corresponding
directory will be looked up and copied to the output recursively, including
all files and subdirectories.
Note that supplying a class file with an absolute path name normalyy doesn't make
sense. It will be treated like a normal file, that is, no recursive class
scan will take place.
- Directories:
Directories are copied recursively, except for files matching an exclude
pattern (see Special parameters).
All files, including class files, are treated as
normal files.
|