title: How to execute maven project from command line
body: <p>Below is the message I received every time when I ran MVN TEST on the project folder from command line.</p>
  
  <pre><code>[INFO] No tests to run.
  [INFO] ----------------
  [INFO] BUILD SUCCESS
  </code></pre>
  
  <p>My Testscripts location is below. I went to the below folder and ran mvn test from the command line.</p>
  
  <pre><code>/Copy of naukri/src/testScripts/NewTest.java
  </code></pre>
  
  <p>Below is the POM file of the project</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &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;naukri&lt;/groupId&gt;
      &lt;artifactId&gt;NewTest&lt;/artifactId&gt;
      &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
      &lt;name&gt;NaukriUpdate&lt;/name&gt;
      &lt;description&gt;----------------&lt;/description&gt;
      &lt;build&gt;
          &lt;sourceDirectory&gt;../src/testScripts/&lt;/sourceDirectory&gt;
  
          &lt;plugins&gt;
              &lt;plugin&gt;
                  &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
                  &lt;version&gt;3.1&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;source&gt;1.6&lt;/source&gt;
                      &lt;target&gt;1.6&lt;/target&gt;
                      &lt;testSourceDirectory&gt;../src/testScripts/&lt;/testSourceDirectory&gt; 
                      &lt;suiteXmlFiles&gt;
                          &lt;suiteXmlFile&gt;testng.xml&lt;/suiteXmlFile&gt;
  
                      &lt;/suiteXmlFiles&gt;
                      &lt;manifest&gt;
                          &lt;mainClass&gt;testScripts.NewTest&lt;/mainClass&gt;
                      &lt;/manifest&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.18.1&lt;/version&gt;
  
                  &lt;configuration&gt;
                      &lt;systemPropertyVariables&gt;
                          &lt;propertyName&gt;firefox&lt;/propertyName&gt;
                      &lt;/systemPropertyVariables&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/build&gt;
      &lt;properties&gt;
          &lt;java.version&gt;1.8&lt;/java.version&gt;
      &lt;/properties&gt;
  
      &lt;dependencies&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.5.3&lt;/version&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;exclusions&gt;
      &lt;exclusion&gt;
        &lt;groupId&gt;org.testng&lt;/groupId&gt;
        &lt;artifactId&gt;testng&lt;/artifactId&gt;
      &lt;/exclusion&gt;
    &lt;/exclusions&gt;                                                             
         &lt;/dependency&gt;
      &lt;/dependencies&gt;
  &lt;/project&gt;
  </code></pre>