Now that the ports tree includes these additional JDKs:
it would be nice if maven would not have a hard dependency upon openjdk8. It wants to install it even though openjdk11 is already installed. I think this stems from Mk/bsd.java.mk, but I'm not sure why? The ordering of __JAVA_PORTS_ALL?
% sudo pkg info | grep jdk
openjdk11-11.0.6+10.1 Java Development Kit 11
% sudo pkg install maven
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
The following 2 package(s) will be affected (of 0 checked):
New packages to be INSTALLED:
Number of packages to be installed: 2
The process will require 201 MiB more space.
9 MiB to be downloaded.
If this is not maven-specific and applies equally to other Java packages with a JDK dependency, it could be reassigned to a more appropriate package.
Now that JDK11 is the current LTS release of Java, would it be time to make it the default/preferred JDK? Or are there any issues which preclude doing that?
Does pkg support a Debian-style Provides/virtual package type of dependency which could permit any of these JDKs to "Provide: javac" and be substitutable for one another?
The openjdk dependancy is determined by the build system. By default, the preferred Java used is openjdk8, and this is reflected by packages built by the FreeBSD package builders. If you have your own build system, you can change the preferred Java to openjdk11 by adding the following to /etc/make.conf:
If you believe that __JAVA_PORTS_ALL should have a different order, you should raise it for discussion with firstname.lastname@example.org
(In reply to Jonathan Chen from comment #1)
Thank you Jonathan. Are there any actions left to take on this issue? If not, what is the most appropriate resolution type? Works As Intended appears to be appropriate?
(In reply to Kubilay Kocak from comment #2)
Yes, it "Works As Intended".