foo@bar ~/projects/testng-failure-case $ java -version openjdk version "1.8.0_201-1-ojdkbuild" OpenJDK Runtime Environment (build 1.8.0_201-1-ojdkbuild-b09) OpenJDK 64-Bit Server VM (build 25.201-b09, mixed mode) foo@bar ~/projects/testng-failure-case $ mvn -version Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f) Maven home: C:\apache-maven-3.6.3 Java version: 1.8.0_201-1-ojdkbuild, vendor: Oracle Corporation, runtime: C:\util\openjdk-1.8.0.201\jre Default locale: en_US, platform encoding: Cp1252 OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows" foo@bar ~/projects/testng-failure-case $ mvn clean install [INFO] Scanning for projects... [INFO] [INFO] ---------------------< com.foo.test:testfailures >---------------------- [INFO] Building testfailures 2.1.7.RELEASE [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] --- maven-clean-plugin:3.1.0:clean (default-clean) @ testfailures --- [INFO] Deleting C:\projects\testng-failure-case\target [INFO] [INFO] --- maven-resources-plugin:3.1.0:resources (default-resources) @ testfailures --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Copying 0 resource [INFO] Copying 0 resource [INFO] [INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ testfailures --- [INFO] Changes detected - recompiling the module! [INFO] Compiling 1 source file to C:\projects\testng-failure-case\target\classes [INFO] [INFO] --- maven-resources-plugin:3.1.0:testResources (default-testResources) @ testfailures --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Copying 2 resources [INFO] [INFO] --- maven-compiler-plugin:3.8.1:testCompile (default-testCompile) @ testfailures --- [INFO] No sources to compile [INFO] [INFO] --- maven-surefire-plugin:2.22.2:test (default-test) @ testfailures --- [INFO] [INFO] --- maven-jar-plugin:3.1.2:jar (default-jar) @ testfailures --- [INFO] Building jar: C:\projects\testng-failure-case\target\testfailures-2.1.7.RELEASE.jar [INFO] [INFO] --- maven-failsafe-plugin:2.22.2:integration-test (default) @ testfailures --- [WARNING] useSystemClassloader setting has no effect when not forking [INFO] Running TestSuite [INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.067 s - in TestSuite [INFO] [INFO] Results: [INFO] [INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0 [INFO] [INFO] [INFO] --- maven-failsafe-plugin:2.22.2:verify (default) @ testfailures --- [INFO] [INFO] --- maven-install-plugin:2.5.2:install (default-install) @ testfailures --- [INFO] Installing C:\projects\testng-failure-case\target\testfailures-2.1.7.RELEASE.jar to C:\Users\jsnell\.m2\repository\com\foo\test\testfailures\2.1.7.RELEASE\testfailures-2.1.7.RELEASE.jar [INFO] Installing C:\projects\testng-failure-case\pom.xml to C:\Users\jsnell\.m2\repository\com\foo\test\testfailures\2.1.7.RELEASE\testfailures-2.1.7.RELEASE.pom [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 3.729 s [INFO] Finished at: 2020-05-11T07:37:31-07:00 [INFO] ------------------------------------------------------------------------ foo@bar ~/projects/testng-failure-case $ cat ~/11.sh #!/bin/bash export JAVA_HOME='c:\util\openjdk-11.0.6_10' export PATH=/cygdrive/c/util/openjdk-11.0.6_10/bin:/cygdrive/c/apache-maven-3.6.3/bin:$PATH export MAVEN_HOME='C:\apache-maven-3.6.3' foo@bar ~/projects/testng-failure-case $ . ~/11.sh foo@bar ~/projects/testng-failure-case $ java -version openjdk version "11.0.6" 2020-01-14 OpenJDK Runtime Environment 18.9 (build 11.0.6+10) OpenJDK 64-Bit Server VM 18.9 (build 11.0.6+10, mixed mode) foo@bar ~/projects/testng-failure-case $ mvn -version Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f) Maven home: C:\apache-maven-3.6.3 Java version: 11.0.6, vendor: Oracle Corporation, runtime: C:\util\openjdk-11.0.6_10 Default locale: en_US, platform encoding: Cp1252 OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows" foo@bar ~/projects/testng-failure-case $ mvn clean install [INFO] Scanning for projects... [INFO] [INFO] ---------------------< com.foo.test:testfailures >---------------------- [INFO] Building testfailures 2.1.7.RELEASE [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] --- maven-clean-plugin:3.1.0:clean (default-clean) @ testfailures --- [INFO] Deleting C:\projects\testng-failure-case\target [INFO] [INFO] --- maven-resources-plugin:3.1.0:resources (default-resources) @ testfailures --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Copying 0 resource [INFO] Copying 0 resource [INFO] [INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ testfailures --- [INFO] Changes detected - recompiling the module! [INFO] Compiling 1 source file to C:\projects\testng-failure-case\target\classes [INFO] [INFO] --- maven-resources-plugin:3.1.0:testResources (default-testResources) @ testfailures --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Copying 2 resources [INFO] [INFO] --- maven-compiler-plugin:3.8.1:testCompile (default-testCompile) @ testfailures --- [INFO] No sources to compile [INFO] [INFO] --- maven-surefire-plugin:2.22.2:test (default-test) @ testfailures --- [INFO] [INFO] --- maven-jar-plugin:3.1.2:jar (default-jar) @ testfailures --- [INFO] Building jar: C:\projects\testng-failure-case\target\testfailures-2.1.7.RELEASE.jar [INFO] [INFO] --- maven-failsafe-plugin:2.22.2:integration-test (default) @ testfailures --- [WARNING] useSystemClassloader setting has no effect when not forking [INFO] Running TestSuite [INFO] [INFO] Results: [INFO] [INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0 [INFO] [INFO] [INFO] --- maven-failsafe-plugin:2.22.2:verify (default) @ testfailures --- [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 3.769 s [INFO] Finished at: 2020-05-11T07:38:15-07:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-failsafe-plugin:2.22.2:verify (default) on project testfailures: There are test failures. [ERROR] [ERROR] Please refer to C:\projects\testng-failure-case\target\failsafe-reports for the individual test results. [ERROR] Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream. [ERROR] org.apache.maven.surefire.booter.SurefireExecutionException: Exception in provider [ERROR] at org.apache.maven.plugin.surefire.InPluginVMSurefireStarter.runSuitesInProcess(InPluginVMSurefireStarter.java:91) [ERROR] at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.java:1166) [ERROR] at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:1011) [ERROR] at org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:857) [ERROR] at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137) [ERROR] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:210) [ERROR] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:156) [ERROR] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148) [ERROR] at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117) [ERROR] at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81) [ERROR] at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:56) [ERROR] at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128) [ERROR] at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:305) [ERROR] at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192) [ERROR] at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105) [ERROR] at org.apache.maven.cli.MavenCli.execute(MavenCli.java:957) [ERROR] at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:289) [ERROR] at org.apache.maven.cli.MavenCli.main(MavenCli.java:193) [ERROR] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [ERROR] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [ERROR] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [ERROR] at java.base/java.lang.reflect.Method.invoke(Method.java:566) [ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:282) [ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:225) [ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:406) [ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:347) [ERROR] Caused by: java.lang.StringIndexOutOfBoundsException: begin 35, end 11, length 17 [ERROR] at java.base/java.lang.String.checkBoundsBeginEnd(String.java:3319) [ERROR] at java.base/java.lang.String.substring(String.java:1874) [ERROR] at org.testng.internal.PackageUtils.findClassesInPackage(PackageUtils.java:112) [ERROR] at org.testng.xml.XmlPackage.initializeXmlClasses(XmlPackage.java:68) [ERROR] at org.testng.xml.XmlPackage.getXmlClasses(XmlPackage.java:59) [ERROR] at org.testng.TestRunner.init(TestRunner.java:264) [ERROR] at org.testng.TestRunner.(TestRunner.java:179) [ERROR] at org.testng.SuiteRunner$DefaultTestRunnerFactory.newTestRunner(SuiteRunner.java:613) [ERROR] at org.testng.SuiteRunner.init(SuiteRunner.java:178) [ERROR] at org.testng.SuiteRunner.(SuiteRunner.java:112) [ERROR] at org.testng.TestNG.createSuiteRunner(TestNG.java:1275) [ERROR] at org.testng.TestNG.createSuiteRunners(TestNG.java:1251) [ERROR] at org.testng.TestNG.runSuitesLocally(TestNG.java:1100) [ERROR] at org.testng.TestNG.runSuites(TestNG.java:1039) [ERROR] at org.testng.TestNG.run(TestNG.java:1007) [ERROR] at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:283) [ERROR] at org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(TestNGXmlTestSuite.java:75) [ERROR] at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:120) [ERROR] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [ERROR] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [ERROR] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [ERROR] at java.base/java.lang.reflect.Method.invoke(Method.java:566) [ERROR] at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray2(ReflectionUtils.java:206) [ERROR] at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:161) [ERROR] at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:84) [ERROR] at org.apache.maven.plugin.surefire.InPluginVMSurefireStarter.runSuitesInProcess(InPluginVMSurefireStarter.java:87) [ERROR] ... 25 more [ERROR] [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/MojoExecutionException foo@bar ~/projects/testng-failure-case $