maven 执行test报错.
错误信息如下:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (default-test) on project
后改为如下即不报错:
<plugin> <artifactId>maven-compiler-plugin</artifactId> <version>2.3.2</version> <configuration> <source>1.8</source> <target>1.8</target> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>2.12</version> <dependencies> <dependency> <groupId>org.apache.maven.surefire</groupId> <artifactId>surefire-junit47</artifactId> <version>2.12</version> </dependency> </dependencies> </plugin>
上面添加 <version>2.3.2</version>即可.网上一种说法是上面两个插件不匹配导致的.具体待分析.
相关推荐
maven-surefire-plugin-2.22.1.jar
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.10:test (default-test) on project web_nanchang: There are test failures. ``` **问题分析**: 此错误表明项目中有单元测试...
pom.xml嵌入插件: <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-shade-plugin</artifactId> <version>2.2</version> <executions> <execution> <phase>package</phase> <goals> <goal>...
#### 错误二:Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.18.1:test (default-test) on project... **错误描述**: 此错误表明 Maven 在执行测试目标时出现了问题,可能是由于测试...
mvn help:describe -Dplugin=org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M2 -Ddetail ``` 这个命令会输出指定插件的详细信息,包括每个插件目标默认绑定的生命周期阶段和可用参数。 在实际使用中,可以...
3. **解决`maven-surefire-plugin`错误**:在执行`install`时,可能出现`Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin`这样的错误。这通常意味着编译错误或者`pom.xml`中`maven-surefire...
<groupId>org.apache.maven.plugins <artifactId>maven-surefire-plugin <version>3.0.0-M5 **/HelloWorldTaskTest.java </plugin> </plugins> ``` 运行`mvn test`命令,Maven会自动执行所有的测试...