title: TestNG Error: Not able to run TestNG ,getting Reference to undefined variable surefireArgLine?
body: <p>Here is my pom.xml code. While debugging as TestNG getting </p>
  
  <blockquote>
    <p>"Reference to undefined variable surefireArgLine"</p>
  </blockquote>
  
  <p>Googled and tried some solutions. By removing below line,</p>
  
  <blockquote>
    <p>${surefireArgLine}</p>
  </blockquote>
  
  <p>getting below error</p>
  
  <blockquote>
    <p>"Error: Could not find or load main class argLine"</p>
  </blockquote>
  
  <p>still facing issue.</p>
  
  <pre><code>            &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.20.1&lt;/version&gt;
              &lt;configuration&gt;
                  &lt;suiteXmlFiles&gt;
                      &lt;suiteXmlFile&gt;suite.xml&lt;/suiteXmlFile&gt;
                  &lt;/suiteXmlFiles&gt;
                  &lt;useSystemClassLoader&gt;false&lt;/useSystemClassLoader&gt;
                  &lt;argLine&gt;${surefireArgLine}&lt;/argLine&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt; 
          &lt;plugin&gt;
  </code></pre>