title: Run Tomcat with Maven and Eclipse - Unknown lifecycle phase
body: <p>I am using Eclipse Helios,Tomcat Server 7. I have build my project using Maven. When I try to build my project, I get the below error in Eclipse.</p>
  
  <pre><code> [INFO] Scanning for projects...
   [INFO]                                                                         
   [INFO] ------------------------------------------------------------------------
   [INFO] Building encore Maven Webapp 0.0.1-SNAPSHOT
   [INFO] ------------------------------------------------------------------------
   [INFO] ------------------------------------------------------------------------
   [INFO] BUILD FAILURE
   [INFO] ------------------------------------------------------------------------
   [INFO] Total time: 0.095s
   [INFO] Finished at: Tue Nov 06 18:17:55 IST 2012
   [INFO] Final Memory: 2M/36M
   [INFO] ------------------------------------------------------------------------
   [ERROR] Unknown lifecycle phase "build". You must specify a valid lifecycle phase or    a    goal in the format &lt;plugin-prefix&gt;:&lt;goal&gt; or &lt;plugin-group-id&gt;:&lt;plugin-artifact-id&gt;[:&lt;plugin-version&gt;]:&lt;goal&gt;. Available lifecycle phases are: validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy, pre-clean, clean, post-clean, pre-site, site, post-site, site-deploy. -&gt; [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/LifecyclePhaseNotFoundException
  </code></pre>
  
  <p>Please let me know what is wrong in my code and kindly point to right directions. I need to figure it out ASAP.  </p>
  
  <pre class="lang-xml prettyprint-override"><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/maven-v4_0_0.xsd"&gt;
  &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  &lt;groupId&gt;com.encore&lt;/groupId&gt;
  &lt;artifactId&gt;encore&lt;/artifactId&gt;
  &lt;packaging&gt;war&lt;/packaging&gt;
  &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
  &lt;name&gt;encore Maven Webapp&lt;/name&gt;
  &lt;url&gt;http://maven.apache.org&lt;/url&gt;
  &lt;dependencies&gt;
    &lt;dependency&gt;
      &lt;groupId&gt;junit&lt;/groupId&gt;
      &lt;artifactId&gt;junit&lt;/artifactId&gt;
      &lt;version&gt;3.8.1&lt;/version&gt;
      &lt;scope&gt;test&lt;/scope&gt;
     &lt;/dependency&gt;
     &lt;dependency&gt;
      &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
    &lt;artifactId&gt;tomcat-maven-plugin&lt;/artifactId&gt;
    &lt;version&gt;1.1&lt;/version&gt;      
  &lt;/dependency&gt;
   &lt;dependency&gt;
    &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
    &lt;artifactId&gt;maven-eclipse-plugin&lt;/artifactId&gt;
    &lt;version&gt;2.9&lt;/version&gt;     
  &lt;/dependency&gt;
  &lt;/dependencies&gt;
  
  &lt;build&gt;
  &lt;finalName&gt;encore&lt;/finalName&gt;   
  &lt;plugins&gt;
      &lt;plugin&gt;
          &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
          &lt;artifactId&gt;tomcat-maven-plugin&lt;/artifactId&gt;
           &lt;version&gt;2.9&lt;/version&gt;  
          &lt;configuration&gt;
                   &lt;server&gt;mytomcatserver&lt;/server&gt;
                   &lt;path&gt;/encore&lt;/path&gt;
                   &lt;url&gt;http://localhost:8080&lt;/url&gt;
                   &lt;username&gt;admin&lt;/username&gt;
                   &lt;password&gt;admin&lt;/password&gt;
          &lt;/configuration&gt;
      &lt;/plugin&gt;
  &lt;/plugins&gt;
  &lt;/build&gt;
   &lt;/project&gt;
  </code></pre>
  
  <p>This is my pom.xml. I am trying to Run my application as Run as-> mvn build from eclipse.</p>