简体   繁体   English

无法执行目标org.apache.maven.plugins:maven-surefire-plugin:2.16:SAKAI中的测试错误

[英]Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.16:test error in SAKAI

When i tried to build SAKAI with maven i encounter the following error. 当我尝试使用Maven构建SAKAI时,遇到以下错误。 Is there anyone faced with the same problem? 有没有人遇到同样的问题? Also firstly i build master folder in sakai source folder (sakai-src) normally there should be a folder named repository inside .m2 folder ( c:/user/pc-user/.m2 ) but don't exist. 另外首先我在sakai源文件夹(sakai-src)中构建主文件夹,通常在.m2文件夹( c:/user/pc-user/.m2 )内应该有一个名为repository的文件夹,但是不存在。

  • Sakai 10.7 酒井10.7
  • Maven 3.3.1 Maven的3.3.1
  • Tomcat 7.0.72 的Tomcat 7.0.72

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.16:test (default-test) on project external-calendaring-service-impl: There are test failures.
[ERROR]
[ERROR] Please refer to C:\apache\sakai-src\external-calendaring-service\impl\target\surefire-reports for the individual test results.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :external-calendaring-service-impl

There are certain times when some tests are causing the build to fail. 在某些情况下,某些测试会导致构建失败。 Excluding them is one of the best workarounds to continue the build. 排除它们是继续构建的最佳解决方法之一。 Exclusions can be done by configuring the excludes property of the plugin. 可以通过配置插件的excludes属性来完成排除。

Maven Surefire Plugin / Inclusions and Exclusions of Tests Maven Surefire插件/测试的包含和排除

My solution would be to check in C:\\apache\\sakai-src\\external-calendaring-service\\impl\\target\\surefire-reports for the failed tests and exclude them in your pom.xml. 我的解决方案是检查C:\\ apache \\ sakai-src \\ external-calendaring-service \\ impl \\ target \\ surefire-reports中失败的测试,并将它们排除在pom.xml中。

  <project>
      [...]
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <version>2.19.1</version>
            <configuration>
              <excludes>
                <exclude>**/TestCircle.java</exclude>
                <exclude>**/TestSquare.java</exclude>
              </excludes>
            </configuration>
          </plugin>
        </plugins>
      </build>
      [...]
    </project>

Another solution might be to run the following Maven command: 另一个解决方案可能是运行以下Maven命令:

mvn clean install -X -e -DskipTests

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 无法执行目标 org.apache.maven.plugins:maven-surefire-plugin:2.18.1:test on project XYZ - Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.18.1:test on project XYZ 未能执行目标 org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M3:test - Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M3:test 无法执行目标org.apache.maven.plugins:maven-surefire-plugin:2.18.1:test - Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.18.1:test 尝试部署到 AZURE 时出错 无法执行目标 org.apache.maven.plugins:maven-surefire-plugin:2.22.2:test - Error when trying to deploy to AZURE Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.2:test 未能在项目上执行目标 org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M5:test (default-test) - Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M5:test (default-test) on project 无法在项目上执行目标 org.apache.maven.plugins:maven-surefire-plugin:2.21.0:test (default-test) - Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.21.0:test (default-test) on project 无法执行目标 org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M4:test (default-test) - Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M4:test (default-test) 无法在项目myserver上执行目标org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test(默认测试) - Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (default-test) on project myserver 无法执行目标org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test(default-test) - Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (default-test) 无法执行目标org.apache.maven.plugins:maven-surefire-plugin:2.10:test没有执行任何测试 - Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.10:test no tests were executed
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM