在模块的test/java中进行代码测试时,报错:
Failed to execute goal org.codehaus.mojo:exec-maven-plugin:3.0.0:exec (default-cli) on project service_vod: Command execution failed.
搜索资料后,得出原因是IDEA2021与maven的兼容问题
我测试时使用的是main方法,需要改用junit进行测试
public class TestXXX{
@Test
public void test(){
...
}
}
- Post link: http://example.com/2021/05/10/IDEA%E6%B5%8B%E8%AF%95%E6%8A%A5%E9%94%99/
- Copyright Notice: All articles in this blog are licensed under unless otherwise stated.