![]() ![]() Libcommons-io-java libcommons-lang3-java libcommons-parent-java libcups2 Libavahi-common3 libbsd0 libcdi-api-java libcommons-cli-java Libatinject-jsr330-api-java libavahi-client3 libavahi-common-data Java-common krb5-locales libaopalliance-java libapache-pom-java libapparmor1 The following additional packages will be installed:Ĭa-certificates ca-certificates-java dbus fontconfig-config fonts-dejavu-core If you explicitly name one of the packages providing java7-runtime-headless for installation, apt will work as you want: # apt-get install -assume-no maven openjdk-8-jre-headless Since otherwise the package fulfilling this dependency is buried in the dependency of another package, we have a Catch-22 when it comes to creating the list of packages for installation. On the other hand, if nothing satisfying java-7-runtime-headless is installed, then apt will go first for default-jre-headless, since none of the packages named for installation fulfills either dependency, and JDK 11 gets installed. If openjdk-8-jre-headless is already installed, then the java-7-runtime-headless dependency is fulfilled and apt doesn't need to install anything additional there. Virtual package provided by default-jre-headless, openjdk-11-jre-headless, openjdk-8-jre-headless Standard Java or Java compatible Runtime (headless) Looking at the maven package details, we see: It's probably a result of how apt walks the dependency tree. Maybe someone else had this idea and filed an enhancement request (probably to Debian rather than Ubuntu). If you'd want both OpenJDK 8 and 11 installed you'd specify both in the package list. In my opinion this behavior is sub-optimal since it's more intuitive that the explicit specification of a package fulfilling a dependency of a package in the same list overrides the need to install an implicit default. This is not a problem for me and I need no workaround. I'm looking for an explanation of the described scenario and maybe a hint to a configuration which adapt the package list parsing. I have no reason to believe that the behavior on my desktop Ubuntu 18.04 is different. One overview of the command and results (with a project which requires JDK 8 through the maven-enforcer-plugin) is provided at. Why does apt-get install not scan the package list to check whether dependencies are provided? I'll go so far and say that apt-get usually does that, even though I find no info about it. However both apt-get update & apt-get install -yes maven openjdk-8-jdkĪnd apt-get update & apt-get install -yes openjdk-8-jdk mavenĬause OpenJDK 11 JRE to be installed because it's the default JRE. Install OpenJDK 8 JDK (including JRE) and then only Maven because a JRE is already provided. I noticed the following behavior on Ubuntu 18.04 running inside Docker (image docker:18.04): apt-get update & apt-get install -yes openjdk-8-jdk The package maven depends on default-jre-headless (>= 2:1.7) | java7-runtime-headless (according to sudo dpkg -I /var/cache/apt/archives/maven_3.5.2-2_all.deb). ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |