部署时 Maven 不是 运行 我的 mockito 测试
Maven is not running my mockito tests when deployment
我的项目中有 mockito 测试。我想部署我的项目,但 Maven 不是 运行 我在部署时的一些测试。
这是我的部署视图。
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M5</version>
<dependencies>
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-junit47</artifactId>
<version>3.0.0-M5</version>
</dependency>
</dependencies>
</plugin>
</plugins>
以前,我遇到过同样的问题。我不知道你的 pom.xml 但是当我添加这个依赖项时它起作用了。如果您的 pom.xml 中还没有这个,您可以试一试。
我的项目中有 mockito 测试。我想部署我的项目,但 Maven 不是 运行 我在部署时的一些测试。
这是我的部署视图。
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M5</version>
<dependencies>
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-junit47</artifactId>
<version>3.0.0-M5</version>
</dependency>
</dependencies>
</plugin>
</plugins>
以前,我遇到过同样的问题。我不知道你的 pom.xml 但是当我添加这个依赖项时它起作用了。如果您的 pom.xml 中还没有这个,您可以试一试。