[Scons-users] more Java scons3 issues...

Mats Wichmann mats at wichmann.us
Fri Dec 15 12:55:34 EST 2017


I'm running into this:

Code snippet:

jdk_env.Java(target='classes', source=['src/main/java'])
example_jar = jdk_env.Jar(target='simpleclientserver.jar',
                          source=['classes', 'MANIFEST.MF'],
                          JARCHDIR='$SOURCE')

When run on 2.5.1, as expected (since the above stanza was adjusted
until it worked - 'classes' is in the source instead of the built
classes due to the Java() problem that it can't always reliably detect
what javac will emit, the case described in
http://scons.tigris.org/issues/show_bug.cgi?id=2547 being in play here)

jar cfm
out/linux/x86_64/debug/java/examples-java/simpleclientserver/simpleclientserver.jar
java/examples-java/simpleclientserver/MANIFEST.MF -C
out/linux/x86_64/debug/java/examples-java/simpleclientserver/classes .


When run on 3.0.1:

jar cfm
out/linux/x86_64/debug/java/examples-java/simpleclientserver/simpleclientserver.jar
java/examples-java/simpleclientserver/MANIFEST.MF -C
out/linux/x86_64/debug/java/examples-java/simpleclientserver/classes .
-C out/linux/x86_64/debug/java/examples-java/simpleclientserver/classes
org -C
out/linux/x86_64/debug/java/examples-java/simpleclientserver/classes
org/iotivity -C
out/linux/x86_64/debug/java/examples-java/simpleclientserver/classes
org/iotivity/base -C
out/linux/x86_64/debug/java/examples-java/simpleclientserver/classes
org/iotivity/base/examples
java.util.zip.ZipException: duplicate entry: org/


After some experimentation, it looks like this problem is taken care of
if I drop in the latest Tool/jar.py from github:

jar cf
out/linux/x86_64/debug/java/examples-java/simpleclientserver/simpleclientserver.jar
-C out/linux/x86_64/debug/java/examples-java/simpleclientserver/classes .


but... now the manifest isn't being included.

ideas?


More information about the Scons-users mailing list