[Scons-users] problem with new Jar builder-wrapper in 3.0.1

Bill Deegan bill at baddogconsulting.com
Fri Nov 17 18:41:35 EST 2017


Ahh gotcha.
Yes if you have inner classes,etc Java creates files that sometimes SCons
will miss.
(different java versions were (and maybe still do) generate different file
names for inner classes,etc..

So specifying the directory is safer, but you may end up with dangling
files if the non-one-to-one .java -> .class files change.
(Assuming you don't delete the classes directory on clean).

Re the manifest file. I'll have to dig a bit deeper to figure that one out.
Likely not until next week and the weekend is filled with a wedding and
travel. :)


-Bill

On Fri, Nov 17, 2017 at 6:32 PM, Mats Wichmann <mats at wichmann.us> wrote:

> On 11/17/2017 04:04 PM, Bill Deegan wrote:
> > Also what is the other technique used elsewhere in your codebase to
> resolve
> > the issue?
>
> not using the return from the Java builder.
>
> A working (but as noted not ideal) example does this:
>
> simpleclientserver_classes = jdk_env.Java(target='classes',
> source=['src/main/java'])
> # jdk_env.Jar(target='simpleclientserver.jar',
> #             source=[simpleclientserver_classes, 'MANIFEST.MF'])
> # SCons is incorrectly calculating the output classes for the
> simpleclientserver sample.
> # The following is a work around for the build command above. The
> unfortunate
> # side effect of this work around results in a larger output.
> example_jar =jdk_env.Jar(target='simpleclientserver.jar',
>             source=['classes','MANIFEST.MF'],
>             JARCHDIR='$SOURCE')
>
>
> that is, "classes' string (whatever that means) instead of using
> simpleclientserver_classes as part of the source description.
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20171117/11361b98/attachment.html>


More information about the Scons-users mailing list