Nokia nmake Product Builder: Java Support

:JAR: Assertion Operator

:JAR: - build and maintain jar files

Description

The :JAR: assertion builds and maintains jar files, with support for viewpathing, index files, and manifest files. Multiple :JAR: assertions are supported in a single Makefile.

name.jar :JAR: [manifest-file][JARROOT=root_dir] files

where:

name.jar
The target jar file to be created.
files
Files to include in the jar, typically class files, specified using full ksh-style shell patterns. Non-absolute paths are relative to the current directory and must begin with a prefix of $(JARROOT). Paths in the resulting jar file are relative to $(JARROOT).
manifest-file
The name of manifest file, used to merge its contents to the target jar file as one part of the internal manifest file. By default, filenames with suffix .mf are automatically recognized as manifest files. In general, filenames marked with the .JARMANIFEST attribute are taken as manifest files.
JARROOT
The root of the package of prerequisite files for the jar archive specified relative to the current directory. The default is the current directory.

Variables and Atoms

The following user-settable variables may be used:

JAR
Jar tool. Defaults to jar.
JARFLAGS
Extra flags for jar command. Defaults to null.

The following attribute may be used:

.JARMANIFEST
Attribute to identify jar manifest file defined by user.

Operation on Windows®

Setup and use on the UWIN based version of nmake is similar to usage on the UNIX® version. See the :JAVA: manual page for more information.

Notes

Example

$echo $VPATH
/home/hqwang/nmake/MR/lu3.6/jdeps010013/mr_jar:/home/hqwang/nmake/MR/lu3.6/jdeps010013/mr_jar2:/home/hqwang/nmake/MR/lu3.6/jdeps010013/mr_jar3
$pwd
/home/hqwang/nmake/MR/lu3.6/jdeps010013/mr_jar/test
$cat Makefile
:ALL:
stc0.jar :JAR: testclass/*.class JARROOT=$(VROOT)/test/testclass
stc1.jar :JAR: testclass/com/lucent/$(ns)/$(ns).class wang.mf
stc2.jar :JAR: testclass/(com|com1)/*.(class|gif)
stc3.jar :JAR: testclass/com/lucent/p[12]/*.@(class|gif)
stc4.jar :JAR: testclass/com/lucent/p?/*.class image/*/*.gif

$nmake
-- Making stc0.jar --
+ cd /home/hqwang/nmake/MR/lu3.6/jdeps010013/mr_jar2/test/testclass
+ jar cf /home/hqwang/nmake/MR/lu3.6/jdeps010013/mr_jar/test/stc0.jar com/lucent/p2/CC.class com/lucent/p2/DD.class com/lucent/p2/pkg21/E.class com/lucent/p2/pkg21/F.class com/lucent/p2/pkg22/G.class com/lucent/p2/pkg22/H.class
+ cd /home/hqwang/nmake/MR/lu3.6/jdeps010013/mr_jar/test/testclass
+ jar uf /home/hqwang/nmake/MR/lu3.6/jdeps010013/mr_jar/test/stc0.jar com/AAAA.class com/BBBB.class com/lucent/AAA.class com/lucent/BBB.class com/lucent/p1/AA.class com/lucent/p1/BB.class com/lucent/p1/pkg11/A.class com/lucent/p1/pkg11/B.class com/lucent/p1/pkg12/C.class com/lucent/p1/pkg12/D.class
+ jar i /home/hqwang/nmake/MR/lu3.6/jdeps010013/mr_jar/test/stc0.jar
-- Making stc1.jar --
+ cd /home/hqwang/nmake/MR/lu3.6/jdeps010013/mr_jar2/test
+ jar cf /home/hqwang/nmake/MR/lu3.6/jdeps010013/mr_jar/test/stc1.jar testclass/com/lucent/p2/CC.class testclass/com/lucent/p2/DD.class
+ cd /home/hqwang/nmake/MR/lu3.6/jdeps010013/mr_jar/test
+ jar uf /home/hqwang/nmake/MR/lu3.6/jdeps010013/mr_jar/test/stc1.jar testclass/com/lucent/p1/AA.class testclass/com/lucent/p1/BB.class
+ jar umf wang.mf /home/hqwang/nmake/MR/lu3.6/jdeps010013/mr_jar/test/stc1.jar
+ jar i /home/hqwang/nmake/MR/lu3.6/jdeps010013/mr_jar/test/stc1.jar
-- Making stc2.jar --
+ cd /home/hqwang/nmake/MR/lu3.6/jdeps010013/mr_jar2/test
+ jar cf /home/hqwang/nmake/MR/lu3.6/jdeps010013/mr_jar/test/stc2.jar testclass/com/lucent/p2/CC.class testclass/com/lucent/p2/DD.class testclass/com/lucent/p2/pkg21/E.class testclass/com/lucent/p2/pkg21/F.class testclass/com/lucent/p2/pkg22/G.class testclass/com/lucent/p2/pkg22/H.class
+ cd /home/hqwang/nmake/MR/lu3.6/jdeps010013/mr_jar/test
+ jar uf /home/hqwang/nmake/MR/lu3.6/jdeps010013/mr_jar/test/stc2.jar testclass/com/AAAA.class testclass/com/BBBB.class testclass/com/lucent/AAA.class testclass/com/lucent/BBB.class testclass/com/lucent/p1/AA.class testclass/com/lucent/p1/BB.class testclass/com/lucent/p1/pkg11/A.class testclass/com/lucent/p1/pkg11/B.class testclass/com/lucent/p1/pkg12/C.class testclass/com/lucent/p1/pkg12/D.class
+ jar i /home/hqwang/nmake/MR/lu3.6/jdeps010013/mr_jar/test/stc2.jar
-- Making stc3.jar --
+ cd /home/hqwang/nmake/MR/lu3.6/jdeps010013/mr_jar2/test
+ jar cf /home/hqwang/nmake/MR/lu3.6/jdeps010013/mr_jar/test/stc3.jar testclass/com/lucent/p2/CC.class testclass/com/lucent/p2/DD.class testclass/com/lucent/p2/pkg21/E.class testclass/com/lucent/p2/pkg21/F.class testclass/com/lucent/p2/pkg22/G.class testclass/com/lucent/p2/pkg22/H.class
+ cd /home/hqwang/nmake/MR/lu3.6/jdeps010013/mr_jar/test
+ jar uf /home/hqwang/nmake/MR/lu3.6/jdeps010013/mr_jar/test/stc3.jar testclass/com/lucent/p1/AA.class testclass/com/lucent/p1/BB.class testclass/com/lucent/p1/pkg11/A.class testclass/com/lucent/p1/pkg11/B.class testclass/com/lucent/p1/pkg12/C.class testclass/com/lucent/p1/pkg12/D.class
+ jar i /home/hqwang/nmake/MR/lu3.6/jdeps010013/mr_jar/test/stc3.jar
-- Making stc4.jar --
+ cd /home/hqwang/nmake/MR/lu3.6/jdeps010013/mr_jar3/test
+ jar cf /home/hqwang/nmake/MR/lu3.6/jdeps010013/mr_jar/test/stc4.jar image/com1/CCCC.gif image/com1/lucent/CCC.gif image/com1/lucent/p1/CC.gif image/com1/lucent/p1/pkg11/C1.gif image/com1/lucent/p1/pkg11/C2.gif image/com1/lucent/p1/pkg12/C3.gif image/com1/lucent/p1/pkg12/C4.gif
+ cd /home/hqwang/nmake/MR/lu3.6/jdeps010013/mr_jar2/test
+ jar uf /home/hqwang/nmake/MR/lu3.6/jdeps010013/mr_jar/test/stc4.jar testclass/com/lucent/p2/CC.class testclass/com/lucent/p2/DD.class testclass/com/lucent/p2/pkg21/E.class testclass/com/lucent/p2/pkg21/F.class testclass/com/lucent/p2/pkg22/G.class testclass/com/lucent/p2/pkg22/H.class
+ cd /home/hqwang/nmake/MR/lu3.6/jdeps010013/mr_jar/test
+ jar uf /home/hqwang/nmake/MR/lu3.6/jdeps010013/mr_jar/test/stc4.jar testclass/com/lucent/p1/AA.class testclass/com/lucent/p1/BB.class test-class/com/lucent/p1/pkg11/A.class testclass/com/lucent/p1/pkg11/B.class testclass/com/lucent/p1/pkg12/C.class testclass/com/lucent/p1/pkg12/D.class
+ jar i /home/hqwang/nmake/MR/lu3.6/jdeps010013/mr_jar/test/stc4.jar

See Also

:JAVA:, npwj(1).


Copyright 2004 Alcatel-Lucent. All Rights Reserved.
See http://www.bell-labs.com/project/nmake/licenseagreement.html for terms of use.

:JAR: - build and maintain jar files
Release lu3.6 @(#)jarman.html 6.1.2.1 03/31/04