Skip to content
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

Possible to ban junit4 and allow junit5 (jupiter)? #56

Closed
astubbs opened this issue Apr 21, 2022 · 2 comments
Closed

Possible to ban junit4 and allow junit5 (jupiter)? #56

astubbs opened this issue Apr 21, 2022 · 2 comments

Comments

@astubbs
Copy link

astubbs commented Apr 21, 2022

Interesting project - is it possible to ban junit 4, given that 5's package is a subset of 4?

E.g. org.junit.Test vs org.junit.juptier.api.Test

I want to use it with https://github.com/astubbs/truth-generator/

@skuzzle
Copy link
Owner

skuzzle commented Apr 21, 2022

That should be easily possible: Just ban org.junit.** and put org.junit.jupiter.** as allowedImport

However, in your case it might even be desirable to ban the whole JUnit4 dependency so that it isn't even on the classpath. You could do that with the maven-dependency-plugin.

@astubbs
Copy link
Author

astubbs commented Apr 21, 2022

I don't think I can exclude the transitive dependency, I think it's still needed in some places, but I'll double check.

Thanks for the the point in the right direction!

@astubbs astubbs closed this as completed Apr 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants