KeePassJava2 icon indicating copy to clipboard operation
KeePassJava2 copied to clipboard

Remove junit compile scope dependency from util module

Open alerosmile opened this issue 6 months ago • 3 comments

KeePassJava2 has a compile time dependency to junit. This is because the util module declares it. Maybe you could define the dependency to the util module as test scope.

alerosmile avatar Jun 16 '25 17:06 alerosmile

Which version are you using? See #71

jorabin avatar Jun 16 '25 21:06 jorabin

I'm including

<dependency>
  <groupId>org.linguafranca.pwdb</groupId>
  <artifactId>KeePassJava2-jackson</artifactId>
  <version>2.2.4</version>
</dependency>

junit is a transitive dependency: KeePassJava2-kdbx -> database -> util -> junit

What you could do is to add util as a test scope dependency to all modules (except for the examples where it has to be a runtime dependency).

I've created a PR for this.

alerosmile avatar Jun 18 '25 13:06 alerosmile

Hi Roman

Thanks for this and thanks for the PR. I am reluctant to keep maintaining 2.2 and would very much prefer if folks were to move to V3 https://github.com/jorabin/KeePassJava2/tree/v3 and if any changes are made to 2.2 then there probably need to be parallel changes to V3. However V3 dependencies work in a different way to V2 and I recall making changes so that there was no runtime dependency on junit.

thanks

jorabin avatar Jun 23 '25 12:06 jorabin