You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "Jonatan Ivanov (Jira)" <ji...@apache.org> on 2025/10/17 23:36:00 UTC
[jira] [Commented] (ARTEMIS-5701) artemis-junit-5 in 2.43.0 uses junit 6
[ https://issues.apache.org/jira/browse/ARTEMIS-5701?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18030771#comment-18030771 ]
Jonatan Ivanov commented on ARTEMIS-5701:
-----------------------------------------
{quote}I'd agree that artemis-junit-5 using junit 6 is a bit weird.
{quote}
I used the word "weird" for lack of a better term since I'm not sure what to call an artifact that is saying that it is for JUnit 5 and then it turns out it is for JUnit 6 but only after a certain minor version.
{quote}Artemis has required Java 17 since 2.39.0 back in 2024. So that part wasnt by accident and it certainly wasnt a new requirement here at all, it was totally independent from the recent junit 6 change.
{quote}
I guess this answers the versioning strategy question, bumping the Java baseline in a minor version is very unfortunate wether it happened in 2.39.0 or in 2.43.0. My expectation would be increasing the Java baseline in a major version since it is a big breaking change.
{quote}I guess we could go back to specifying a version of junit 5 on artemis-junit-5 specifically, even though we use 6 almost everywhere else, however silly that in itself is.
{quote}
It might be just be me but if an artifact says it's for JUnit 5 in its name, it might not be silly to expect that it is actually for JUnit 5.
{quote}For now, if you were to manage the specific version of junit used in your own build, then I'd half expect you can just say you want 5 and have it work, rather than relying on some unknown transitive junit version coming in.
{quote}
We do specify the JUnit version but build systems has resolution strategies if dependencies try to bring in other versions of the same artifact. Yes, we can force JUnit 5 or exclude JUnit from {{artemis-junit-5}} or not use {{artemis-junit-5}} at all but is that the way one should use the artifact (2.42 and before: don't do anything, 2.43 and after: exclude/force the JUnit version for something that says which major version of JUnit it is for).
{quote}Unclear how the Java 17 thing would cause you any issues at all between 2.42.0 and 2.43.0 when Artemis 2.42.0 already required Java 17, maybe thats just something you also noted when being surprised by junit 6 being there.
{quote}
I looked into this and found that when {{artemis-jakarta-client}} broke backward compatibility and increased the Java baseline in a minor version, we excluded tests that used it to run on Java 16 and below and only run these tests on builds that are on Java 17 and above (we run our builds against quite a few Java versions). With JUnit 6, this is a bit different since JUnit is not localized but used in every test. We can "hack" this in our build and force the version but that won't change anything for {{artemis-junit-5}} and for other users.
> artemis-junit-5 in 2.43.0 uses junit 6
> --------------------------------------
>
> Key: ARTEMIS-5701
> URL: https://issues.apache.org/jira/browse/ARTEMIS-5701
> Project: ActiveMQ Artemis
> Issue Type: Bug
> Affects Versions: 2.43.0
> Reporter: Jonatan Ivanov
> Priority: Major
>
> In 2.43.0, the JUnit version was upgraded from 5.x to 6.x, see: [https://github.com/apache/activemq-artemis/commit/615367d53fb1d21b5eae50b4e2c66c45c8a2b42d] and https://issues.apache.org/jira/browse/ARTEMIS-5591
> Also: https://repo1.maven.org/maven2/org/apache/activemq/artemis-project/2.42.0/artemis-project-2.42.0.pom and https://repo1.maven.org/maven2/org/apache/activemq/artemis-project/2.43.0/artemis-project-2.43.0.pom.
> This results in {{org.apache.activemq:artemis-junit-5}} not using JUnit 5 anymore which is weird since its name explicitely says it's for JUnit 5 but most importantly, JUnit 6 increased the Java baseline to 17 (totally fine, it was a major version). This means that Artemis also increased the Java baseline but in a minor release for dependencies that bring in JUnit transitively. Not sure what is the version strategy of the project but both of these are quite unexpected, see: [https://github.com/micrometer-metrics/micrometer/pull/6807]
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@activemq.apache.org
For additional commands, e-mail: issues-help@activemq.apache.org
For further information, visit: https://activemq.apache.org/contact