报错:maven 程序包org.junit不存在

mvn compile时报错

解决方法:

将pom.xml中的原本的

    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.9</version>
      <scope>test</scope>
    </dependency>

  改成

    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.9</version>
    </dependency>

 

posted @ 2016-08-25 00:04  Faded  阅读(3366)  评论(0编辑  收藏  举报