I have a Maven project that includes some test cases. Today I tried adding the jarsigner plugin and now the tests fail with:
java.lang.SecurityException: class "types.AccountType"'s signer information does not match signer information of other classes in the same package
The test classes are in the same package to have access to package-private methods etc. I believe that this error is happening because the junit test classes are not being signed while the classes being tested are.
Does anyone have a suggestion on how to avoid this problem? I had some ideas but don't know how to implement them:
- Cause the testing phase to use the classes instead of the jar file.
- Put the test classes into their own jar file and sign it.