SCons / src / engine / SCons / Tool / jar.xml

Full commit

This file is processed by the bin/ module.
See its __doc__ string for a discussion of the format.
<tool name="jar">
Sets construction variables for the &jar; utility.

<builder name="Jar">
Builds a Java archive (<filename>.jar</filename>) file
from the specified list of sources.
Any directories in the source list
will be searched for <filename>.class</filename> files).
Any <filename>.java</filename> files in the source list
will be compiled  to <filename>.class</filename> files
by calling the &b-link-Java; Builder.

If the &cv-link-JARCHDIR; value is set, the
command will change to the specified directory using the
If &cv-JARCHDIR; is not set explicitly,
&SCons; will use the top of any subdirectory tree
in which Java <filename>.class</filename>
were built by the &b-link-Java; Builder.

If the contents any of the source files begin with the string
the file is assumed to be a manifest
and is passed to the
command with the
option set.

env.Jar(target = 'foo.jar', source = 'classes')

env.Jar(target = 'bar.jar',
        source = ['', ''])

<cvar name="JAR">
The Java archive tool.

<cvar name="JARCHDIR">
The directory to which the Java archive tool should change
(using the

<cvar name="JARCOM">
The command line used to call the Java archive tool.

<cvar name="JARCOMSTR">
The string displayed when the Java archive tool
is called
If this is not set, then &cv-link-JARCOM; (the command line) is displayed.

env = Environment(JARCOMSTR = "JARchiving $SOURCES into $TARGET")

<cvar name="JARFLAGS">
General options passed to the Java archive tool.
By default this is set to
to create the necessary

<cvar name="JARSUFFIX">
The suffix for Java archives:
by default.