Org.junit in OH3 environment

Hi - When doing a mvn clean install, it is not resolving org.junit.* (The import org.junit.After cannot be resolved). I’ve tried to add the org.junit as a depency in my project pom.xlm, but have not been successful at getting past this error. In the Eclipse environment, I did have to add Junit to the build path in order to get it to resolve in Eclipse. Any help/suggestions woudl be great.

I’m working in the OH3 environment.

Another error I had to address in Eclipse is the following:
“java.lang.SecurityException: class “org.hamcrest.Matchers”'s signer information does not match signer information of other classes in the same package”

I believe this is because junit5 now includes hamcrest and this could be conflicting with that? Any suggestion to fix this as well?


To fix this you need to change the unit tests to junit5 as openHAB 3 updated to junit5.

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.