mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Valery Kharseko
15 hours ago 00f97962bd6789b9f7e50623224fd7bd24184ed5
Pin bcutil-fips to stabilize Maven dependency resolution (#1323)

## Summary

- Pin `org.bouncycastle:bcutil-fips` to `2.1.8` in the parent POM's
dependency management. This is the version Maven already selects when
the range resolves.
- Remove the need to fetch the version list to resolve the
`[2.1.7,2.2.0)` range from `bctls-fips` and `bcpkix-fips`. Its
resolution failed intermittently in [the documentation
PR](https://github.com/OpenIdentityPlatform/OpenDJ/actions/runs/44906503870/job/136853123526)
and [on
master](https://github.com/OpenIdentityPlatform/OpenDJ/actions/runs/44887182636/job/136794952463).

## Validation

- Reproduced the CI error on `opendj-core` with Maven 3.9.15 and Java 11
using an isolated Maven repository containing the JAR and missing the
`bcutil-fips` version metadata. The same check passed with the pin and
resolved the same four FIPS artifacts as the baseline with metadata.
- Ran `mvn --batch-mode --offline --file opendj-core/pom.xml verify` on
Java 11. All 8,261 tests passed.
- Ran `git diff --check`.
1 files modified
7 ■■■■■ changed files
pom.xml 7 ●●●●● patch | view | raw | blame | history
pom.xml
@@ -41,6 +41,7 @@
        <bc.fips.version>2.1.3</bc.fips.version>
        <bctls.fips.version>2.1.24</bctls.fips.version>
        <bcpkix.fips.version>2.1.12</bcpkix.fips.version>
        <bcutil.fips.version>2.1.8</bcutil.fips.version>
        <maven.compiler.target>11</maven.compiler.target>
        <maven.compiler.source>11</maven.compiler.source>
        <!-- OSGi bundles properties -->
@@ -250,6 +251,12 @@
                <artifactId>bcpkix-fips</artifactId>
                <version>${bcpkix.fips.version}</version>
            </dependency>
            <!-- Avoid fetching version metadata for the ranges in bctls-fips and bcpkix-fips. -->
            <dependency>
                <groupId>org.bouncycastle</groupId>
                <artifactId>bcutil-fips</artifactId>
                <version>${bcutil.fips.version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>