title: How to run java program using Maven
body: <p>I am trying to run a Java project using Maven, need help on how to run </p>
  
  <p>I tried with various options, Run As > Maven clean, Run As > Maven Install, Run As > Maven test, etc. 
  But the output is not showing in the console though build is successful</p>
  
  <p>I am using eclipse and able to run java file using Run As > Java Application</p>
  
  <p>My Build tag in pom.xml</p>
  
  <pre><code> &lt;build&gt;
      &lt;plugins&gt;
          &lt;plugin&gt;
          &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
          &lt;version&gt;2.0.2&lt;/version&gt;
          &lt;configuration&gt;
                  &lt;source&gt;1.6&lt;/source&gt;
                  &lt;target&gt;1.6&lt;/target&gt;
          &lt;/configuration&gt;
       &lt;/plugin&gt;
          &lt;plugin&gt;
          &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
          &lt;artifactId&gt;exec-maven-plugin&lt;/artifactId&gt;
         &lt;version&gt;1.6.0&lt;/version&gt;
          &lt;configuration&gt;
               &lt;mainClass&gt;mypackage.classnamehavingmain&lt;/mainClass&gt;
          &lt;/configuration&gt;
          &lt;/plugin&gt;
      &lt;/plugins&gt;
     &lt;/build&gt;
  </code></pre>