[Bug 272855] Mk/bsd.default-versions.mk: update JAVA_DEFAULT to 21

From: <bugzilla-noreply_at_freebsd.org>
Date: Wed, 24 Dec 2025 20:26:21 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=272855

--- Comment #25 from Mikhail Teterin <mi@FreeBSD.org> ---
(In reply to Michael Osipov from comment #24)
> Nuke it, unless there is a ports consumer people are better of using Maven,
> Maven Resolver Ant Tasks, Gradle or something else

If we want consistency, then the same approach -- abandoning ports in favor of
each "ecosphere's" respective package-mananger -- should be applied to Python,
Ruby, Perl, Javascript, and Go software. Oh, and Rust too!

> only the bundled JARs have been tested and blessed by upstream

This is an unfortunate state of affairs, and we don't succumb to this logic in
other places. For example, libjpeg-turbo was a replacement for libjpeg, and we
would've dismissed concerns of maintainers/authors of any JPEG-using software
about potential incompatibilities as FUD.

We've also gone through some effort to stop depending on the particular version
of a shared library in the ports -- the insistence on the exact version of each
dependency -- is the exact opposite of that view. The syntax of pom.xml allows
specifying version-ranges, but the prevailing opinion in the Java world frowns
at that (bizarrely)...

I wish, FreeBSD's Java-people have developed some way to _uniformly_ build
Maven-using software -- perhaps, with Mk/Uses/maven.mk -- so that:

1. No individual port for each dependency would be required -- here I agree
with Michael -- even if pkg still registered the JARs as runtime dependencies.
2. Different packages using the same dependencies (such as log4j) used the same
version (preferably the latest) of each dependency. It'd probably require some
standardized manipulations of the upstream's pom.xml -- sort of how we
manipulate the "auto" tools, replacing versions with ranges and changing
dependency types into "system".
3. Maven repository lived in a standard location -- /usr/ports/distfiles/m2 ?

-- 
You are receiving this mail because:
You are on the CC list for the bug.