当前位置:首页 > java.lang.NoClassDefFoundError: org/hamcrest/SelfDescribing

java.lang.NoClassDefFoundError: org/hamcrest/SelfDescribing

点击次数:572  更新日期:2018-09-29

在maven下用 junit4.12 的时候报错

java.lang.NoClassDefFoundError: org/hamcrest/SelfDescribing

此时需要添加依赖 hamcrest-all


<dependency>
    <groupId>org.hamcrest</groupId>
    <artifactId>hamcrest-all</artifactId>
    <version>1.3</version>
    <scope>test</scope>
</dependency>