[Scons-users] Regression in Jar tool in v3.0.1?

Abigail Bunyan abigail.bunyan at microsoft.com
Mon Nov 27 07:21:01 EST 2017


The following snippet builds fine in v2.5.1 and v3.0.0:

    Java('classes', 'Widget.java')
    Jar('mylib.jar', Dir('classes'))

And it runs the command: `jar cf mylib.jar classes`.

But under v3.0.1, it instead runs the command `jar cf mylib.jar` (with no
following arguments), and it gives the error:

    'c' flag requires manifest or input files to be specified!
    Usage: jar...
    ...
    scons: *** [mylib.jar] Error 1
    scons: building terminated because of errors.

I assume this is caused by the changes to the Jar tool in v3.0.1, as mentioned
in the changelog.

As a workaround, the following snippet builds fine:

    Java('classes', 'Widget.java')
    Jar('mylib.jar', 'classes') # just removed the Dir(...) call
    
Unless anybody disagrees (eg. believes that this isn't a valid method of
invoking the Jar tool), I'll file a bug report.


More information about the Scons-users mailing list