-
Notifications
You must be signed in to change notification settings - Fork 544
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SUREFIRE-2240] Don't manage JUnit5 artifact versions #725
Conversation
This allows to more easily overwrite the version via plugin dependencies
@@ -80,6 +80,13 @@ | |||
<tag>surefire-3.0.0-M8</tag> | |||
</scm> | |||
|
|||
<properties> | |||
<!-- common version suffix by platform and other junit5 artifacts, compare with https://github.com/junit-team/junit5/blob/main/gradle.properties --> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@marcphilipp Is the assumption right that they always share the same suffix?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that's correct but I'd feel more comfortable if this didn't have to be known here. Why didn't it work out with the BOM?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The BOM will affect transitive dependencies of overridden plugin dependencies, and therefore leads to incompatible versions/prevents updating the engine
Thinking out loud: any reason to have junit in dependency at all? can't we just use ToolProvider "junit" to launch it and be totally decoupled from junit? Would enable to use the project dependencies and if some is missing (platform) just download it but without any compiling coupling nor need of the bom hell. |
The used version needs to match the one in the project's dependencies, i.e. if a build uses JUnit Jupiter 5.10.2, Surefire should use 1.10.2 of its JUnit Platform dependencies. I don't see how a ToolProvider would solve that problem. Could you please elaborate? |
@marcphilipp @rmannibucau Let us focus in this PR only on the issue that overriding plugin dependencies as outlined in https://maven.apache.org/surefire/maven-surefire-plugin/examples/junit-platform.html#api-engine-versions-segregation does not work. |
@marcphilipp we wouldn't have any provided dependency in surefire itself, everything would be resolved from project dependencies (if provided use else resolve the aligned version) means there is no more bom topic or things like that with a hybrid surefire/project source of dependencies. |
FWIWI Gradle recently went that route to no longer include/resolve junit-platform-launcher but require users to add it themselves: https://docs.gradle.org/current/userguide/upgrading_version_8.html#manually_declaring_dependencies |
This might be related to the upgrade issues I have in #737. |
This allows to more easily overwrite the version via plugin dependencies
Following this checklist to help us incorporate your
contribution quickly and easily:
for the change (usually before you start working on it). Trivial changes like typos do not
require a JIRA issue. Your pull request should address just this issue, without
pulling in other changes.
[SUREFIRE-XXX] - Fixes bug in ApproximateQuantiles
,where you replace
SUREFIRE-XXX
with the appropriate JIRA issue. Best practiceis to use the JIRA issue title in the pull request title and in the first line of the
commit message.
mvn clean install
to make sure basic checks pass. A more thorough check willbe performed on your pull request automatically.
mvn -Prun-its clean install
).If your pull request is about ~20 lines of code you don't need to sign an
Individual Contributor License Agreement if you are unsure
please ask on the developers list.
To make clear that you license your contribution under
the Apache License Version 2.0, January 2004
you have to acknowledge this by using the following check-box.
I hereby declare this contribution to be licenced under the Apache License Version 2.0, January 2004
In any other case, please file an Apache Individual Contributor License Agreement.