[ 
https://issues.apache.org/jira/browse/ARTEMIS-5701?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18030773#comment-18030773
 ] 

Robbie Gemmell commented on ARTEMIS-5701:
-----------------------------------------

{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}
I think thats a perfectly fine word to use. I agree that it is.
{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}
So I think only one time in the last 15 years has any of ActiveMQ 
5.x/6.x/Artemis changed minimum Java version at the same time as a major, and 
that was mostly for other reasons.
{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}
I'd have closed this Jira if I thought otherwise. Instead I plan to fix it when 
actually back at a PC on Monday. I was merely saying that its going to be silly 
that we will again have an artemis-junit-5 module using 5, when we arent 
actually using 5 anywhere.
{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}
Yes, I'm aware of build system resolution strategies, which is why I said 
_manage_ the version, not specify.
{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.
{quote}
I dont consider managing your own builds junit version to be a hack. I believe 
almost every component I contribute to manages its own junit version. Had I 
created artemis-junit, it would also not be providing any junit dependency 
transitively to the user but instead requiring them to provide their own, in 
which case this issue likely wouldnt have been noticed at all given the extent 
of the compatibility between 5 and 6.

> 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: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact


Reply via email to