Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:

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>即可.网上一种说法是上面两个插件不匹配导致的.具体待分析.

猜你喜欢

转载自sanyecao2314.iteye.com/blog/2288834
今日推荐