在java里面使用@Test做单元测试,想打个jar包用maven来build工程的时候,发现报错:

Maven-package org.junit does not exist

经过对比pom文件,发现junit的pom有点问题:

      <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.11</version>
            <!-- <scope>test</scope> -->
        </dependency>

 

<!-- <scope>test</scope> -->注释掉就行了,哈哈哈哈~~~

相关文章:

  • 2022-02-08
  • 2022-12-23
  • 2022-12-23
  • 2021-10-27
  • 2021-11-29
  • 2021-04-07
  • 2021-08-19
  • 2022-12-23
猜你喜欢
  • 2021-10-30
  • 2022-12-23
  • 2022-12-23
  • 2022-02-16
  • 2021-11-04
  • 2021-09-08
  • 2022-12-23
相关资源
相似解决方案