Skip to content

Make dependencies on AssertJ and JUnit in spring-core-test optional #34612

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
sbrannen opened this issue Mar 17, 2025 · 0 comments
Closed

Make dependencies on AssertJ and JUnit in spring-core-test optional #34612

sbrannen opened this issue Mar 17, 2025 · 0 comments
Assignees
Labels
in: core Issues in core modules (aop, beans, core, context, expression) in: test Issues in the test module type: enhancement A general enhancement
Milestone

Comments

@sbrannen
Copy link
Member

Overview

The spring-core-test artifact currently has required transitive dependencies on AssertJ and JUnit.

api("org.assertj:assertj-core")
api("org.junit.jupiter:junit-jupiter-api")

In light of my findings in #34610 (comment), we should make the dependencies on AssertJ and JUnit optional like we do in spring-test.

optional("org.assertj:assertj-core")
optional("org.hamcrest:hamcrest")
optional("org.htmlunit:htmlunit") {
exclude group: "commons-logging", module: "commons-logging"
}
optional("org.jetbrains.kotlin:kotlin-reflect")
optional("org.jetbrains.kotlin:kotlin-stdlib")
optional("org.jetbrains.kotlinx:kotlinx-coroutines-core")
optional("org.jetbrains.kotlinx:kotlinx-coroutines-reactor")
optional("org.junit.jupiter:junit-jupiter-api")

Related Issues

@sbrannen sbrannen added in: core Issues in core modules (aop, beans, core, context, expression) in: test Issues in the test module type: enhancement A general enhancement labels Mar 17, 2025
@sbrannen sbrannen added this to the 6.2.5 milestone Mar 17, 2025
@sbrannen sbrannen self-assigned this Mar 17, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
in: core Issues in core modules (aop, beans, core, context, expression) in: test Issues in the test module type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

1 participant