title: After upgrading, getting "Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test" and "test(s) <[]> cannot be found"
body: <p>I upgraded Selenium to support GeckoDriver, and then Jenkins with it. I'm pretty new to this behind-the-scenes-upgrading stuff. Since we're running Selenium 3, we no longer use the Selenium Grid plugin. I haven't been able to get any tests to run since then.</p>
  
  <p>We run Windows 7 machines for the Jenkins master and slaves. If it makes any difference, we use Java. We also have a framework sitting atop Selenium.</p>
  
  <p>In particular is this error that really bugs me:</p>
  
  <pre><code>[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test (default-test) on project example-project: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test failed: There was an error in the forked process
  [ERROR] org.testng.TestNGException:
  [ERROR] 
  [ERROR] The test(s) &lt;[]&gt; cannot be found.
  [ERROR] at org.testng.TestNG.extractTestNames(TestNG.java:436)
  </code></pre>
  
  <p>I tried a little to alter the forking config but to no avail.</p>
  
  <p>I've also played with the TestNG scope in the POM, but turning it to <code>test</code> causes TestNG classes to "not exist".</p>
  
  <h1>Full Results</h1>
  
  <p>Here are the full results I've been getting (run with Maven -e flag; I have the results with -X if needed):</p>
  
  <pre><code>Started by user anonymous
  Building in workspace C:\Program Files (x86)\Jenkins\jobs\QA_Brochures_Test\workspace
  Updating https://subversion.example.com/svn/example-test-center/trunk/FunctionalAutomation/ExampleProject at revision '2017-02-10T15:33:28.095 -0500'
  A         target\log4j2.xml
  At revision 3234
  
  No changes for https://subversion.example.com/svn/example-test-center/trunk/FunctionalAutomation/ExampleProject since the previous build
  Parsing POMs
  Modules changed, recalculating dependency graph
  Established TCP socket on 60174
  [workspace] $ "C:\Program Files\Java\jdk1.8.0_121/bin/java" -cp "C:\Program Files (x86)\Jenkins\plugins\maven-plugin\WEB-INF\lib\maven33-agent-1.8.1.jar;C:\Maven3.3.9\apache-maven-3.3.9\boot\plexus-classworlds-2.5.2.jar;C:\Maven3.3.9\apache-maven-3.3.9/conf/logging" jenkins.maven3.agent.Maven33Main C:\Maven3.3.9\apache-maven-3.3.9 "C:\Program Files (x86)\Jenkins\war\WEB-INF\lib\remoting-3.4.1.jar" "C:\Program Files (x86)\Jenkins\plugins\maven-plugin\WEB-INF\lib\maven33-interceptor-1.8.1.jar" "C:\Program Files (x86)\Jenkins\plugins\maven-plugin\WEB-INF\lib\maven3-interceptor-commons-1.8.1.jar" 60174
  &lt;===[JENKINS REMOTING CAPACITY]===&gt;channel started
  Executing Maven:  -B -f C:\Program Files (x86)\Jenkins\jobs\QA_Brochures_Test\workspace\pom.xml clean test -e -DsuiteFile=src/main/test/suites/ca/alpha/desktop/QA_Brochures_Test.xml -Drunvehicle=All Models -Dwebdriver.gecko.driver=C:\browser-drivers\geckodriver-win64.exe
  [INFO] Error stacktraces are turned on.
  [INFO] Scanning for projects...
  [WARNING] 
  [WARNING] Some problems were encountered while building the effective model for com.example.automation:example-project:jar:2.0.0-SNAPSHOT
  [WARNING] 'dependencies.dependency.systemPath' for com.example.automation:automation-util:jar should not point at files within the project directory, ${basedir}/src/resources/lib/automation-util-1.18.1.jar will be unresolvable by dependent projects @ line 105, column 16
  [WARNING] 'dependencies.dependency.systemPath' for com.client.servicesapi:servicesapi:jar should not point at files within the project directory, ${basedir}/src/resources/lib/ServicesClientLibrary-1.2.112.jar will be unresolvable by dependent projects @ line 112, column 16
  [WARNING] 
  [WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
  [WARNING] 
  [WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
  [WARNING] 
  [INFO]                                                                         
  [INFO] ------------------------------------------------------------------------
  [INFO] Building ExampleProject 2.0.0-SNAPSHOT
  [INFO] ------------------------------------------------------------------------
  [INFO] 
  [INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ example-project ---
  [INFO] Deleting C:\Program Files (x86)\Jenkins\jobs\QA_Brochures_Test\workspace\target
  [INFO] 
  [INFO] --- build-helper-maven-plugin:3.0.0:add-source (add-source) @ example-project ---
  [INFO] Source directory: C:\Program Files (x86)\Jenkins\jobs\QA_Brochures_Test\workspace\src\main\objects added.
  [INFO] Source directory: C:\Program Files (x86)\Jenkins\jobs\QA_Brochures_Test\workspace\src\main\test\classes added.
  [INFO] Source directory: C:\Program Files (x86)\Jenkins\jobs\QA_Brochures_Test\workspace\src\main\test\suites added.
  [INFO] 
  [INFO] --- build-helper-maven-plugin:3.0.0:add-resource (add-resource) @ example-project ---
  [INFO] 
  [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ example-project ---
  [INFO] Using 'UTF-8' encoding to copy filtered resources.
  [INFO] skip non existing resourceDirectory C:\Program Files (x86)\Jenkins\jobs\QA_Brochures_Test\workspace\src\main\resources
  [INFO] Copying 19 resources to resources
  [INFO] 
  [INFO] --- maven-compiler-plugin:3.6.1:compile (default-compile) @ example-project ---
  [INFO] Changes detected - recompiling the module!
  [INFO] Compiling 212 source files to C:\Program Files (x86)\Jenkins\jobs\QA_Brochures_Test\workspace\target\classes
  [INFO] /C:/Program Files (x86)/Jenkins/jobs/QA_Brochures_Test/workspace/src/main/objects/com/alpha/global/components/MyPlan.java: Some input files use or override a deprecated API.
  [INFO] /C:/Program Files (x86)/Jenkins/jobs/QA_Brochures_Test/workspace/src/main/objects/com/alpha/global/components/MyPlan.java: Recompile with -Xlint:deprecation for details.
  [INFO] /C:/Program Files (x86)/Jenkins/jobs/QA_Brochures_Test/workspace/src/main/test/classes/com/alpha/global/TC_GUX_BNP.java: C:\Program Files (x86)\Jenkins\jobs\QA_Brochures_Test\workspace\src\main\test\classes\com\alpha\global\TC_GUX_BNP.java uses unchecked or unsafe operations.
  [INFO] /C:/Program Files (x86)/Jenkins/jobs/QA_Brochures_Test/workspace/src/main/test/classes/com/alpha/global/TC_GUX_BNP.java: Recompile with -Xlint:unchecked for details.
  [INFO] 
  [INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ example-project ---
  [INFO] Using 'UTF-8' encoding to copy filtered resources.
  [INFO] skip non existing resourceDirectory C:\Program Files (x86)\Jenkins\jobs\QA_Brochures_Test\workspace\src\test\resources
  [INFO] 
  [INFO] --- maven-compiler-plugin:3.6.1:testCompile (default-testCompile) @ example-project ---
  [INFO] No sources to compile
  [INFO] 
  [INFO] --- maven-surefire-plugin:2.19.1:test (default-test) @ example-project ---
  [INFO] No tests to run.
  [INFO] Surefire report directory: C:\Program Files (x86)\Jenkins\jobs\QA_Brochures_Test\workspace\test-output
  
  -------------------------------------------------------
   T E S T S
  -------------------------------------------------------
  Running TestSuite
  
  Results :
  
  Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
  
  [JENKINS] Recording test results
  hudson.AbortException: Test reports were found but none of them are new. Did tests run? 
  For example, C:\Program Files (x86)\Jenkins\jobs\QA_Brochures_Test\workspace\test-output\TEST-TestSuite.xml is 1 mo 7 days old
  
      at hudson.tasks.junit.TestResult.parse(TestResult.java:228)
      at hudson.maven.reporters.SurefireArchiver.postExecute(SurefireArchiver.java:148)
      at hudson.maven.Maven3Builder$MavenExecutionListener.recordMojoEnded(Maven3Builder.java:623)
      at hudson.maven.Maven3Builder$MavenExecutionListener.mojoFailed(Maven3Builder.java:656)
      at hudson.maven.Maven3Builder$JenkinsEventSpy.onEvent(Maven3Builder.java:300)
      at org.apache.maven.eventspy.internal.EventSpyDispatcher.onEvent(EventSpyDispatcher.java:104)
      at org.apache.maven.eventspy.internal.EventSpyExecutionListener.mojoFailed(EventSpyExecutionListener.java:138)
      at org.apache.maven.lifecycle.internal.DefaultExecutionEventCatapult.fire(DefaultExecutionEventCatapult.java:90)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:219)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
      at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
      at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
      at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
      at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
      at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
      at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
      at org.jvnet.hudson.maven3.launcher.Maven33Launcher.main(Maven33Launcher.java:129)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:330)
      at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:238)
      at jenkins.maven3.agent.Maven33Main.launch(Maven33Main.java:176)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at hudson.maven.Maven3Builder.call(Maven3Builder.java:133)
      at hudson.maven.Maven3Builder.call(Maven3Builder.java:68)
      at hudson.remoting.UserRequest.perform(UserRequest.java:153)
      at hudson.remoting.UserRequest.perform(UserRequest.java:50)
      at hudson.remoting.Request$2.run(Request.java:336)
      at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
      at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      at java.lang.Thread.run(Thread.java:745)
  [INFO] ------------------------------------------------------------------------
  [INFO] BUILD FAILURE
  [INFO] ------------------------------------------------------------------------
  [INFO] Total time: 16.752 s
  [INFO] Finished at: 2017-02-10T15:33:50-05:00
  [INFO] Final Memory: 30M/265M
  [INFO] ------------------------------------------------------------------------
  [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test (default-test) on project example-project: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test failed: There was an error in the forked process
  [ERROR] org.testng.TestNGException:
  [ERROR] 
  [ERROR] The test(s) &lt;[]&gt; cannot be found.
  [ERROR] at org.testng.TestNG.extractTestNames(TestNG.java:436)
  [ERROR] at org.testng.TestNG.initializeSuitesAndJarFile(TestNG.java:310)
  [ERROR] at org.testng.TestNG.run(TestNG.java:1088)
  [ERROR] at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:281)
  [ERROR] at org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(TestNGXmlTestSuite.java:75)
  [ERROR] at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:121)
  [ERROR] at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:290)
  [ERROR] at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:242)
  [ERROR] at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:121)
  [ERROR] -&gt; [Help 1]
  org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test (default-test) on project example-project: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test failed: There was an error in the forked process
  org.testng.TestNGException: 
  
  The test(s) &lt;[]&gt; cannot be found.
      at org.testng.TestNG.extractTestNames(TestNG.java:436)
      at org.testng.TestNG.initializeSuitesAndJarFile(TestNG.java:310)
      at org.testng.TestNG.run(TestNG.java:1088)
      at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:281)
      at org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(TestNGXmlTestSuite.java:75)
      at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:121)
      at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:290)
      at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:242)
      at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:121)
  
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
      at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
      at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
      at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
      at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
      at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
      at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
      at org.jvnet.hudson.maven3.launcher.Maven33Launcher.main(Maven33Launcher.java:129)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:330)
      at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:238)
      at jenkins.maven3.agent.Maven33Main.launch(Maven33Main.java:176)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at hudson.maven.Maven3Builder.call(Maven3Builder.java:133)
      at hudson.maven.Maven3Builder.call(Maven3Builder.java:68)
      at hudson.remoting.UserRequest.perform(UserRequest.java:153)
      at hudson.remoting.UserRequest.perform(UserRequest.java:50)
      at hudson.remoting.Request$2.run(Request.java:336)
      at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
      at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      at java.lang.Thread.run(Thread.java:745)
  Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test failed: There was an error in the forked process
  org.testng.TestNGException: 
  
  The test(s) &lt;[]&gt; cannot be found.
      at org.testng.TestNG.extractTestNames(TestNG.java:436)
      at org.testng.TestNG.initializeSuitesAndJarFile(TestNG.java:310)
      at org.testng.TestNG.run(TestNG.java:1088)
      at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:281)
      at org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(TestNGXmlTestSuite.java:75)
      at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:121)
      at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:290)
      at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:242)
      at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:121)
  
      at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:145)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
      ... 31 more
  Caused by: java.lang.RuntimeException: There was an error in the forked process
  org.testng.TestNGException: 
  
  The test(s) &lt;[]&gt; cannot be found.
      at org.testng.TestNG.extractTestNames(TestNG.java:436)
      at org.testng.TestNG.initializeSuitesAndJarFile(TestNG.java:310)
      at org.testng.TestNG.run(TestNG.java:1088)
      at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:281)
      at org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(TestNGXmlTestSuite.java:75)
      at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:121)
      at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:290)
      at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:242)
      at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:121)
  
      at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:584)
      at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:460)
      at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:229)
      at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:201)
      at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.java:1026)
      at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:862)
      at org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:755)
      at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
      ... 32 more
  [ERROR] 
  [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/PluginExecutionException
  [JENKINS] Archiving C:\Program Files (x86)\Jenkins\jobs\QA_Brochures_Test\workspace\pom.xml to com.example.automation/example-project/2.0.0-SNAPSHOT/example-project-2.0.0-SNAPSHOT.pom
  channel stopped
  Finished: FAILURE
  </code></pre>
  
  <h1>POM</h1>
  
  <pre><code>&lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
      &lt;groupId&gt;com.example.automation&lt;/groupId&gt;
      &lt;artifactId&gt;example-project&lt;/artifactId&gt;
      &lt;version&gt;2.0.0-SNAPSHOT&lt;/version&gt;
      &lt;name&gt;ExampleProject&lt;/name&gt;
  
  
      &lt;properties&gt;
          &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
      &lt;/properties&gt;
  
      &lt;build&gt;
          &lt;plugins&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
                  &lt;artifactId&gt;build-helper-maven-plugin&lt;/artifactId&gt;
                  &lt;version&gt;3.0.0&lt;/version&gt;
                  &lt;executions&gt;
                      &lt;execution&gt;
                          &lt;id&gt;add-source&lt;/id&gt;
                          &lt;phase&gt;generate-sources&lt;/phase&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;add-source&lt;/goal&gt;
                          &lt;/goals&gt;
                          &lt;configuration&gt;
                              &lt;sources&gt;
                                  &lt;source&gt;src/main/objects&lt;/source&gt;
                                  &lt;source&gt;src/main/test/classes&lt;/source&gt;
                                  &lt;source&gt;src/main/test/suites&lt;/source&gt;
                              &lt;/sources&gt;
                          &lt;/configuration&gt;
                      &lt;/execution&gt;
  
                      &lt;execution&gt;
                          &lt;id&gt;add-resource&lt;/id&gt;
                          &lt;phase&gt;generate-resources&lt;/phase&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;add-resource&lt;/goal&gt;
                          &lt;/goals&gt;
                          &lt;configuration&gt;
                              &lt;resources&gt;
                                  &lt;resource&gt;
                                      &lt;directory&gt;src/resources&lt;/directory&gt;
                                      &lt;targetPath&gt;resources&lt;/targetPath&gt;
                                  &lt;/resource&gt;
                              &lt;/resources&gt;
                          &lt;/configuration&gt;
                      &lt;/execution&gt;
                  &lt;/executions&gt;
              &lt;/plugin&gt;
  
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
                  &lt;version&gt;3.6.1&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;source&gt;1.8&lt;/source&gt;
                      &lt;target&gt;1.8&lt;/target&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
  
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-surefire-plugin&lt;/artifactId&gt;
                  &lt;version&gt;2.19.1&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;!-- &lt;reuseForks&gt;false&lt;/reuseForks&gt; --&gt;
                      &lt;suiteXmlFiles&gt;
                          &lt;suiteXmlFile&gt;${basedir}/${suiteFile}&lt;/suiteXmlFile&gt;
                      &lt;/suiteXmlFiles&gt;
                      &lt;reportsDirectory&gt;${basedir}/test-output&lt;/reportsDirectory&gt;
                      &lt;properties&gt;
                          &lt;property&gt;
                              &lt;name&gt;testnames&lt;/name&gt;
                              &lt;value&gt;${testname}&lt;/value&gt;
                          &lt;/property&gt;
                          &lt;property&gt;
                              &lt;name&gt;runvehicle&lt;/name&gt;
                              &lt;value&gt;${runVehicle}&lt;/value&gt;
                          &lt;/property&gt;
                      &lt;/properties&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/build&gt;
  
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.example.automation&lt;/groupId&gt;
              &lt;artifactId&gt;automation-util&lt;/artifactId&gt;
              &lt;version&gt;1.18.1&lt;/version&gt;
              &lt;scope&gt;system&lt;/scope&gt;
              &lt;systemPath&gt;${basedir}/src/resources/lib/automation-util-1.18.1.jar&lt;/systemPath&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.client.servicesapi&lt;/groupId&gt;
              &lt;artifactId&gt;servicesapi&lt;/artifactId&gt;
              &lt;version&gt;1.2.112&lt;/version&gt;
              &lt;scope&gt;system&lt;/scope&gt;
              &lt;systemPath&gt;${basedir}/src/resources/lib/ServicesClientLibrary-1.2.112.jar&lt;/systemPath&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.testng&lt;/groupId&gt;
              &lt;artifactId&gt;testng&lt;/artifactId&gt;
              &lt;version&gt;6.10&lt;/version&gt;
              &lt;!-- &lt;scope&gt;test&lt;/scope&gt; --&gt;
          &lt;/dependency&gt;
          &lt;!-- When updating Selenium here, ensure automation-util's POM is updated also! --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.seleniumhq.selenium&lt;/groupId&gt;
              &lt;artifactId&gt;selenium-java&lt;/artifactId&gt;
              &lt;version&gt;3.0.1&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.poi&lt;/groupId&gt;
              &lt;artifactId&gt;poi-ooxml&lt;/artifactId&gt;
              &lt;version&gt;3.15&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;javax.mail&lt;/groupId&gt;
              &lt;artifactId&gt;mail&lt;/artifactId&gt;
              &lt;version&gt;1.4.7&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;!-- https://mvnrepository.com/artifact/net.sf.qualitycheck/quality-check --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;net.sf.qualitycheck&lt;/groupId&gt;
              &lt;artifactId&gt;quality-check&lt;/artifactId&gt;
              &lt;version&gt;1.1&lt;/version&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
  &lt;/project&gt;
  </code></pre>
  
  <h1>Suite XML</h1>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd"&gt;
  &lt;suite name="FOC Brochures"&gt;
      &lt;listeners&gt;
          &lt;listener class-name="com.example.util.result.CustomReportListener" /&gt;
      &lt;/listeners&gt;
  
      &lt;parameter name="browser" value="gecko" /&gt;
      &lt;parameter name="mailingList" value="AUTO, FOC" /&gt;
      &lt;parameter name="remote" value="true" /&gt;
      &lt;parameter name="model" value="${runVehicle}" /&gt;
  
      &lt;test name="QA-Alpha-English"&gt;
          &lt;parameter name="baseUrl" value="http://wwwmgqa.alpha.ca/brochures/" /&gt;
          &lt;classes&gt;
              &lt;class name="ca.alpha.desktop.TC_FOC_Brochures"&gt;
                  &lt;methods&gt;
              &lt;!-- 
                      &lt;include name="init" /&gt;
               --&gt;
                  &lt;/methods&gt;
              &lt;/class&gt;
          &lt;/classes&gt;
      &lt;/test&gt;
  
      &lt;test name="QA-Alpha-French"&gt;
          &lt;parameter name="baseUrl" value="http://fr-wwwmgqa.alpha.ca/brochures/" /&gt;
          &lt;classes&gt;
              &lt;class name="ca.alpha.desktop.TC_FOC_Brochures"&gt;
                  &lt;methods&gt;
              &lt;!-- 
                      &lt;include name="init" /&gt;
               --&gt;
                  &lt;/methods&gt;
              &lt;/class&gt;
          &lt;/classes&gt;
      &lt;/test&gt;
  &lt;/suite&gt; 
  </code></pre>
  
  <p>Any ideas on how to remedy this? Thank you in advance.</p>
  
  <p><strong>UPDATE</strong>
  After removing <code>testnames</code> from Surefire completely and running again, I'm now getting this error:</p>
  
  <pre><code>[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test (default-test) on project example-project: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test failed: There was an error in the forked process
  [ERROR] org.testng.TestNGException:
  [ERROR] 
  [ERROR] Cannot instantiate class com.example.util.result.CustomReportListener
  [ERROR] at org.testng.internal.ClassHelper.newInstance(ClassHelper.java:53)
  [ERROR] at org.testng.TestNG.initializeConfiguration(TestNG.java:981)
  [ERROR] at org.testng.TestNG.run(TestNG.java:1089)
  [ERROR] at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:281)
  [ERROR] at org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(TestNGXmlTestSuite.java:75)
  [ERROR] at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:121)
  [ERROR] at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:290)
  [ERROR] at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:242)
  [ERROR] at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:121)
  [ERROR] Caused by: java.lang.ExceptionInInitializerError
  [ERROR] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
  [ERROR] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
  [ERROR] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
  [ERROR] at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
  Waiting for Jenkins to finish collecting data
  [ERROR] at java.lang.Class.newInstance(Class.java:442)
  [ERROR] at org.testng.internal.ClassHelper.newInstance(ClassHelper.java:51)
  [ERROR] ... 8 more
  [ERROR] Caused by: java.lang.NullPointerException
  [ERROR] at sun.awt.shell.Win32ShellFolder2.access$200(Win32ShellFolder2.java:72)
  [ERROR] at sun.awt.shell.Win32ShellFolder2$1.call(Win32ShellFolder2.java:242)
  [ERROR] at sun.awt.shell.Win32ShellFolder2$1.call(Win32ShellFolder2.java:237)
  [ERROR] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
  [ERROR] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
  [ERROR] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
  [ERROR] at sun.awt.shell.Win32ShellFolderManager2$ComInvoker$3.run(Win32ShellFolderManager2.java:547)
  [ERROR] at java.lang.Thread.run(Thread.java:745)
  [ERROR] -&gt; [Help 1]
  </code></pre>
  
  <p>Where the <code>CustomReportListener</code> class is inside the automation-util JAR, which is stored in <code>src/resources/lib</code> typically, though I've also tested it in a class source folder (<code>src/main/test/classes</code>).</p>