On Thu, Dec 10, 2020 at 11:54 AM Jiri Vanek <jvanek(a)redhat.com> wrote:
Ping?
Fabio,Severin, Mikolaj? Any thoughts?
On 12/7/20 11:23 AM, Jiri Vanek wrote:
> Hi!
>
> I had risen this topic during jdk11 bump. but it somehow get lost.
>
> The idea is, to provide rpm macros, keeping the default source/target eventually -
for jdk11 and up -the release - numbers for javac to use.
> Then to provide tooling, which will help packagers to use them - for ant and maven
it should be simple. For others, probably nothing to do on our side, each packager will be
able to patch/sed theirs builds as necessary (Still it will help a lot for future).
> I do not know how to provide them as default (except hardcoding in xmvn, and only
allow to disable them on demand).
>
> This will smooth the bump to jdk17 in f36 really a lot.
Sorry for being quiet so far. I have been thinking about a solution
for this that's based on macros, but I hadn't written it down yet.
My solution would look something like this:
- introduce %_javac_source, %_javac_target, and %_javac_release macros
- use those macros in %mvn_build (not sure if there's an ant
equivalent, those build.xmls are all incompatibly different ...)
- define default values for those macros (possibly set them to "8" for
now, and bump to something higher later, as necessary)
- if necessary, users can override those values in their .spec files,
by doing something like "%global _javac_target 9"
Fabio