-
Notifications
You must be signed in to change notification settings - Fork 71
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
JUnit and Jetbrains annotations leaked as transitive dependencies #71
Comments
Thank you for this. I'll have a look and see why it is happening. Jo |
Two reasons for it happening: the first is that the Maven Run Listener is not in src/test and the other is that the tests defined in the The annotations are a compile dependency. I had not considered using scope |
Further thoughts on this: thanks for your pull request. Changing Additionally, I've made the changes to the test module, to make it a test-jar which means that test files are no longer part of the run-time either, which they would have been before. A bit more to do to address #70 as well, then I will make this 2.2.3. |
Aww :( I'm more familiar with Gradle than maven, seen the |
The way it ended up is that MavenRunListener is in a new module called util which is not needed at run time and that as mentioned the tests ended up in test-jar. |
Sounds good to me, thank you! 😃 |
Reopening as not yet released, will be 2.2.3 |
I have a project of mine where I use KeePassJava2 and was trying to slim down the number of jars that I need to include in my deployment when I noticed that using any KeePassJava2 dependency from version 2.2.2 will include
junit:junit:4.13.2
andorg.jetbrains:annotations:24.1.0
.Neither of them are libraries which are supposed to be included in the released pom.xml. If I exclude them in my project using Gradle the application runs fine, so they are not needed as transitive compile/runtime dependencies.
This will require some maven restructuring in the project as far as I see.
The text was updated successfully, but these errors were encountered: