Ant-junit update issues

dnf upgrade
Last metadata expiration check: 4:46:30 ago on Tue 21 Feb 2023 05:06:50 AM MST.
Dependencies resolved.

Problem 1: package ant-junit-1.10.5-1.module_el8.0.0+6004+2fc32706.noarch requires ant = 1.10.5-1.module_el8.0.0+6004+2fc32706, but none of the providers can be installed

  • cannot install both ant-1.10.5-1.module_el8.0.0+6031+d80e135e.noarch and ant-1.10.5-1.module_el8.0.0+6004+2fc32706.noarch
  • cannot install both ant-1.10.5-1.module_el8.0.0+6004+2fc32706.noarch and ant-1.10.5-1.module_el8.0.0+6031+d80e135e.noarch
  • cannot install the best update candidate for package ant-junit-1.10.5-1.module_el8.0.0+6004+2fc32706.noarch
  • cannot install the best update candidate for package ant-1.10.5-1.module_el8.0.0+6004+2fc32706.noarch
    Problem 2: problem with installed package ant-junit-1.10.5-1.module_el8.0.0+6004+2fc32706.noarch
  • package ant-junit-1.10.5-1.module_el8.0.0+6004+2fc32706.noarch requires ant = 1.10.5-1.module_el8.0.0+6004+2fc32706, but none of the providers can be installed
  • package ant-1.10.5-1.module_el8.0.0+6004+2fc32706.noarch requires ant-lib = 1.10.5-1.module_el8.0.0+6004+2fc32706, but none of the providers can be installed
  • cannot install both ant-lib-1.10.5-1.module_el8.0.0+6031+d80e135e.noarch and ant-lib-1.10.5-1.module_el8.0.0+6004+2fc32706.noarch
  • cannot install both ant-lib-1.10.5-1.module_el8.0.0+6004+2fc32706.noarch and ant-lib-1.10.5-1.module_el8.0.0+6031+d80e135e.noarch
  • cannot install the best update candidate for package ant-lib-1.10.5-1.module_el8.0.0+6004+2fc32706.noarch

Installed Packages
ant.noarch 1.10.5-1.module_el8.0.0+6004+2fc32706 @powertools
ant-junit.noarch 1.10.5-1.module_el8.0.0+6004+2fc32706 @powertools
Available Packages
ant.noarch 1.10.5-1.module_el8.0.0+6031+d80e135e appstream

dnf module provides ant

Last metadata expiration check: 5:01:30 ago on Tue 21 Feb 2023 05:06:50 AM MST.
ant-1.10.5-1.module_el8.0.0+6004+2fc32706.noarch
Module : javapackages-tools:201801:8060020221020190828:b07bea58:x86_64
Profiles :
Repo : powertools
Summary : Tools and macros for Java packaging support

ant-1.10.5-1.module_el8.0.0+6031+d80e135e.noarch
Module : ant:1.10:8000020191205111317:f7e686af:x86_64
Profiles : common
Repo : appstream
Summary : Java build tool

I can’t reproduce the issue on RHEL8:

dnf list ant ant-junit

Updating Subscription Management repositories.
Last metadata expiration check: 0:06:51 ago on Tue 21 Feb 2023 09:59:34 AM MST.
Available Packages
ant.noarch 1.10.5-1.module+el8+2598+06babf2e codeready-builder-for-rhel-8-x86_64-rpms
ant-junit.noarch 1.10.5-1.module+el8+2598+06babf2e codeready-builder-for-rhel-8-x86_64-rpms

dnf module provides ant

Updating Subscription Management repositories.
Last metadata expiration check: 0:07:11 ago on Tue 21 Feb 2023 09:59:34 AM MST.
ant-1.10.5-1.module+el8+2438+c99a8a1e.noarch
Module : ant:1.10:820181213135032:5ea3b708:x86_64
Profiles : common
Repo : rhel-8-for-x86_64-appstream-rpms
Summary : Java build tool

ant-1.10.5-1.module+el8+2598+06babf2e.noarch
Module : javapackages-tools:201801:820181217165704:dca7b4a4:x86_64
Profiles :
Repo : codeready-builder-for-rhel-8-x86_64-rpms
Summary : Tools and macros for Java packaging support

I think perhaps because the version of ant in the javapackages-tools module is greater than the version in the ant module in RHEL8, but the opposite is true in almalinux.

Disabling the ant module in almalinux seems to resolve the issue.