Reputation: 11
I am including the JUnit Jupiter (Aggregator) v5.11.0 and Netbeans IDE along with the maven dependency tree show dependencies on v5.8.1.
[INFO] +- org.junit.jupiter:junit-jupiter:jar:5.11.0:test
[INFO] | +- org.junit.jupiter:junit-jupiter-api:jar:5.8.1:test
[INFO] | | +- org.opentest4j:opentest4j:jar:1.2.0:test
[INFO] | | +- org.junit.platform:junit-platform-commons:jar:1.8.1:test
[INFO] | | \- org.apiguardian:apiguardian-api:jar:1.1.2:test
[INFO] | +- org.junit.jupiter:junit-jupiter-params:jar:5.8.1:test
[INFO] | \- org.junit.jupiter:junit-jupiter-engine:jar:5.8.1:test
[INFO] | \- org.junit.platform:junit-platform-engine:jar:1.8.1:test
The remote repository in my local m2 is the following:
~/.m2/repository/org/junit/jupiter/junit-jupiter/5.11.0$ more _remote.repositories
#NOTE: This is a Maven Resolver internal implementation file, its format can be changed without prior notice.
#Wed Sep 04 10:50:56 EEST 2024
junit-jupiter-5.11.0.pom>maven2-repository.dev.java.net=
junit-jupiter-5.11.0.jar>maven2-repository.dev.java.net=
My dev platform is a virtualbox machine:
$ uname -a
Linux ubuntu-vma-tioa 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
$ java -version
java version "1.8.0_211"
Java(TM) SE Runtime Environment (build 1.8.0_211-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.211-b12, mixed mode)
$ mvn --version
Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
Maven home: /home/tioannid/apache-maven-3.6.3
Java version: 1.8.0_211, vendor: Oracle Corporation, runtime: /home/tioannid/jdk1.8.0_211/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "4.15.0-213-generic", arch: "amd64", family: "unix"
The only way to remedy this is to explicitly include v5.11.0 for all dependencies that are incorrect.
I also tried using the Junit BOM v5.11.0 but exhibits the same problematic behaviour.
I was trying to use the latest version (v5.11.0, 04 Sep 2024) of Junit5 aggregator in my Maven Java project, but instead in the "test dependencies" v5.8.1 components appear to be in effect. I think several fixes and new features from 5.8.1 -> 5.11.0 might actually not be available. It sure would nice to remedy this, if it is an actual mistake and not something wrong on my side.
Upvotes: 0
Views: 207