title: Maven Tomcat (embedded )
body: <p>I'm trying to deploy a war to an embedded tomcat server via the tomcat maven plugin. The console shows the server starts up fine. </p>
  
  <p>It seems the war is not deployed. I get a HTTP Status 404 from Tomcat when I access <a href="http://localhost:9090/foo" rel="nofollow">http://localhost:9090/foo</a> and <a href="http://localhost:9090" rel="nofollow">http://localhost:9090</a></p>
  
  <p>I see no war file or exploded war file in target/tomcat/webapps</p>
  
  <p>My configuration is a bit (very) non standard due to factors out of my control:</p>
  
  <ul>
  <li>The project uses other means than Maven to build the war file. </li>
  <li>The project is not setup according to Maven standards.  </li>
  <li>The project has a package type of POM.</li>
  </ul>
  
  <p>POM:</p>
  
  <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.foo&lt;/groupId&gt;
      &lt;artifactId&gt;foo&lt;/artifactId&gt;
      &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
      &lt;packaging&gt;pom&lt;/packaging&gt;
      &lt;name&gt;iCON&lt;/name&gt;
      &lt;build&gt;
          &lt;plugins&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.tomcat.maven&lt;/groupId&gt;
                  &lt;artifactId&gt;tomcat7-maven-plugin&lt;/artifactId&gt;
                  &lt;version&gt;2.2&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;ignorePackaging&gt;true&lt;/ignorePackaging&gt;
                      &lt;warFile&gt;foo.war&lt;/warFile&gt;
                      &lt;port&gt;9090&lt;/port&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/build&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>Output of mvn tomcat7:run</p>
  
  <pre><code>[INFO] Scanning for projects...
  [INFO]
  [INFO] ------------------------------------------------------------------------
  [INFO] Building foo 0.0.1-SNAPSHOT
  [INFO] ------------------------------------------------------------------------
  [INFO]
  [INFO] &gt;&gt;&gt; tomcat7-maven-plugin:2.2:run (default-cli) &gt; process-classes @ foo &gt;&gt;&gt;
  [INFO]
  [INFO] &lt;&lt;&lt; tomcat7-maven-plugin:2.2:run (default-cli) &lt; process-classes @ foo &lt;&lt;&lt;
  [INFO]
  [INFO] --- tomcat7-maven-plugin:2.2:run (default-cli) @ foo ---
  [INFO] Running war on http://localhost:9090/foo
  [INFO] Creating Tomcat server configuration at C:\someDir\aProject\target\tomcat
  [INFO] create webapp with contextPath: /foo
  Apr 15, 2015 12:50:56 PM org.apache.coyote.AbstractProtocol init
  INFO: Initializing ProtocolHandler ["http-bio-9090"]
  Apr 15, 2015 12:50:56 PM org.apache.catalina.core.StandardService startInternal
  INFO: Starting service Tomcat
  Apr 15, 2015 12:50:56 PM org.apache.catalina.core.StandardEngine startInternal
  INFO: Starting Servlet Engine: Apache Tomcat/7.0.47
  Apr 15, 2015 12:50:58 PM org.apache.coyote.AbstractProtocol start
  INFO: Starting ProtocolHandler ["http-bio-9090"]
  </code></pre>