Re: Deal with package-info.class empty file

Pierre-Luc Boily <[email protected]>
Newsgroups gmane.comp.programming.tools.scons.user
Message-ID <CACTRa=twUX25TFwAhmHF7edQgsfK_KWtPWLwrOj00UuFznGHPQ@mail.gmail.com>
Finally, it is quite easy, javac compiler has an argument to force
package-info.class generation.

Just need to pass -Xpkginfo:always to scons JAVACFLAGS. Unfortunately, my
version of javac (1.7.0_25) is crashing when I am passing this argument.
javac 1.8 is working fine with this arguments.

Le jeu. 28 nov. 2019, à 23 h 19, Pierre-Luc Boily <[email protected]>
a écrit :

> Hello!
>
> I have a problem where my java build is nover up to date, because within
> scons java builder, package-info.class is not generated.
>
> This question has already been asked there :
> http://scons.1086193.n5.nabble.com/java-empty-files-td28544.html
>
> Its been almost 10 years ago and I am wondering if someone found something
> better?
>
> And it looks like the solution actually doesn't work anymore.  The
> following
> code :
>
> tgts = env.Java(target = 'classes', source = 'src')
> for f in tgts:
>   if f.path.endswith('package-info.class'):
>     tgts.remove(f)
>
> jar = env.Jar(target = 'dds-interface.jar', source = tgts)
> Default(jar)
>
> returns error :
> AttributeError: <class 'SCons.Node.FS.File'> object has no attribute
> 'upper':
>
> From what I read into the doc, Jar only accept java file or 'classes' as
> source.
>
> I could simply remove package-info.java file, I think they are not useful
> in
> our case, we do not have documentation.  But just in case, would be great
> if
> I can keep it.
>
>
>
> --
> Sent from: http://scons.1086193.n5.nabble.com/Users-f16930.html
> _______________________________________________
> Scons-users mailing list
> [email protected]
> https://pairlist4.pair.net/mailman/listinfo/scons-users
>

_______________________________________________
Scons-users mailing list
[email protected]
https://pairlist4.pair.net/mailman/listinfo/scons-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.