Date: Sat, 07 Mar 2026 16:11:39 +0000 From: bugzilla-noreply@freebsd.org To: java@FreeBSD.org Subject: [Bug 289858] Mk/Uses/java.mk: Use JAVA_VERSION as priority Message-ID: <bug-289858-8522-bEpNvAMkqR@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-289858-8522@https.bugs.freebsd.org/bugzilla/>
index | next in thread | previous in thread | raw e-mail
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=289858 --- Comment #10 from Ronald Klop <ronald@FreeBSD.org> --- (In reply to Vladimir Druzenko from comment #9) > > 3. JAVA_VERSION=17+, prefer 25 (latest) > > Option 3 will be more progressive when a new JDK is added to the tree. > IMHO, pick JAVA_DEFAULT if it in range or latest LTS in range. > JAVA_DEFAULT=21: > "8 11 17 18 19 20" => 17 > "21 17 25" => 21 Picking the latest LTS from the range can be done by ordering the non-LTS versions later in the __JAVA_PORTS_ALL list in java.mk. Sounds reasonable to me. I'm not sure that we need to pick JAVA_DEFAULT if it is in range. I prefer latest LTS if in range. And only use JAVA_DEFAULT if no JAVA_VERSION is defined in the port. 1. no JAVA_VERSION set, use JAVA_DEFAULT (21) 2. JAVA_VERSION=8 11 20, use 11 (latest LTS) JAVA_VERSION=20 23 24, use (latest non-LTS) 3. JAVA_VERSION=17+, use 25 (latest LTS) This still looks at what is already installed. This mechanism doesn't change in my patch. > All the proposed options fail to solve one problem: how to build a specific port with a specific version of Java, and another port with a different version, all on the same host. > Moreover, both ports support both versions of Java. > I also want to avoid the need for the end user to manually edit the port to achieve this goal. Do you have an example of this use case? Users can use /etc/make.conf to override JAVA_VERSION for any port they want. And we have multiple ports where port A uses JDK-X and dependent port B uses JDK-Y. -- You are receiving this mail because: You are the assignee for the bug. You are on the CC list for the bug.home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-289858-8522-bEpNvAMkqR>
