https://bugzilla.redhat.com/show_bug.cgi?id=1925638
Bug ID: 1925638 Summary: Ant fails to use the java jvm configured by the alternatives command Product: Fedora Version: 33 Hardware: All OS: Linux Status: NEW Component: ant Severity: medium Assignee: java-maint-sig@lists.fedoraproject.org Reporter: bill_chatfield@yahoo.com QA Contact: extras-qa@fedoraproject.org CC: decathorpe@gmail.com, jaromir.capik@email.cz, java-maint-sig@lists.fedoraproject.org, java-sig-commits@lists.fedoraproject.org, mizdebsk@redhat.com, msrb@redhat.com Target Milestone: --- Classification: Fedora
Description of problem:
Ant does not use the version of java configured by the alternatives command. It uses bash functions that are part of javapackages-tools to determine which java command to run instead of just using the java I told it to use with the alternatives commands. Furthermore, there should only be one method of determining which java to run. The alternatives system and the functions in javapackages-tools are redundant. One of them needs to be removed.
Version-Release number of selected component (if applicable):
ant-1.10.9-1.fc33
How reproducible:
Configure java 1.8 with the alternatives command and then run an ant build.
Steps to Reproduce: 1. sudo dnf -y install java-11-openjdk-devel java-1.8.0-openjdk-devel javapackages-tools 2. sudo alternatives --set java java-1.8.0-openjdk.x86_64 3. echo '<project> <echo message="java.home=${java.home}"/> </project>' | cat > build.xml 4. ant
Actual results: (ant using java 11 after 1.8 was configured)
Buildfile: /home/bill/build.xml [echo] java.home=/usr/lib/jvm/java-11-openjdk-11.0.9.11-9.fc33.x86_64
BUILD SUCCESSFUL Total time: 0 seconds
Expected results: (ant should be using 1.8)
Buildfile: /home/bill/build.xml [echo] java.home=/usr/lib/jvm/java-1.8-openjdk...
BUILD SUCCESSFUL Total time: 0 seconds
Additional info:
https://bugzilla.redhat.com/show_bug.cgi?id=1925638
Fedora Admin user for bugzilla script actions fedora-admin-xmlrpc@fedoraproject.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Assignee|java-maint-sig@lists.fedora |mizdebsk@redhat.com |project.org |
--- Comment #1 from Fedora Admin user for bugzilla script actions fedora-admin-xmlrpc@fedoraproject.org --- This package has changed maintainer in Fedora. Reassigning to the new maintainer of this component.
https://bugzilla.redhat.com/show_bug.cgi?id=1925638
Mikolaj Izdebski mizdebsk@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |CLOSED Resolution|--- |NOTABUG Doc Type|--- |If docs needed, set a value Last Closed| |2021-04-28 10:33:19
--- Comment #2 from Mikolaj Izdebski mizdebsk@redhat.com --- It is expected that Ant does not rely on alternatives for choosing JVM to use. This is described in more detail at https://fedoraproject.org/wiki/Changes/Decouple_system_java_setting_from_jav... JVM used by Ant can be changed in configuration files.
java-sig-commits@lists.fedoraproject.org