title: Error when I try deploy application to tomcat7 server
body: <p>I am trying deploy a web application to tomcat7 via eclipse luna, but I am getting this error:</p>
  
  <pre><code>Uploading: http://localhost:8080/manager/text/deploy?path=%2Floja
  
  [INFO] I/O exception (java.net.SocketException) caught when processing request: Connection reset
  [INFO] Retrying request
  Uploading: http://localhost:8080/manager/text/deploy?path=%2Floja
  
  [INFO] I/O exception (java.net.SocketException) caught when processing request: Connection reset
  [INFO] Retrying request
  Uploading: http://localhost:8080/manager/text/deploy?path=%2Floja
  
  [INFO] I/O exception (java.net.SocketException) caught when processing request: Connection reset
  [INFO] Retrying request
  Uploading: http://localhost:8080/manager/text/deploy?path=%2Floja
  
  [INFO] ------------------------------------------------------------------------
  [INFO] BUILD FAILURE
  [INFO] ------------------------------------------------------------------------
  [INFO] Total time: 4.936 s
  [INFO] Finished at: 2014-08-15T22:10:04-03:00
  [INFO] Final Memory: 13M/112M
  [INFO] ------------------------------------------------------------------------
  [ERROR] Failed to execute goal org.apache.tomcat.maven:tomcat7-maven-plugin:2.2:deploy (default-cli) on project loja: Cannot invoke Tomcat manager: Connection reset -&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/MojoExecutionException
  </code></pre>
  
  <p>I also try deploy to tomcat8, but I get this same error.</p>
  
  <p>In my pom.xml, I have this configuration related to this operation:</p>
  
  <pre><code>  &lt;build&gt;
      &lt;finalName&gt;loja&lt;/finalName&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;url&gt;http://localhost:8080/manager/text&lt;/url&gt;
                  &lt;server&gt;TomcatServer&lt;/server&gt;
                  &lt;path&gt;/loja&lt;/path&gt;
                  &lt;username&gt;user001&lt;/username&gt;
                  &lt;password&gt;123&lt;/password&gt;
             &lt;/configuration&gt;
          &lt;/plugin&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
              &lt;artifactId&gt;maven-war-plugin&lt;/artifactId&gt;
              &lt;configuration&gt;
                  &lt;failOnMissingWebXml&gt;false&lt;/failOnMissingWebXml&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
      &lt;/plugins&gt;
  &lt;/build&gt;
  </code></pre>
  
  <p>Anyone knows what's happening here?</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>I try deploy the application with the command <code>mvn:tomcat7 deploy -X</code> and the output was that:</p>
  
  <pre><code>[INFO] Retrying request
  [DEBUG] Reopening the direct connection.
  [DEBUG] Connecting to localhost:8080
  [DEBUG] Attempt 4 to execute request
  [DEBUG] Sending request: PUT /manager/text/deploy?path=%2Floja HTTP/1.1
  [DEBUG]  &gt;&gt; "PUT /manager/text/deploy?path=%2Floja HTTP/1.1[\r][\n]"
  [DEBUG]  &gt;&gt; "User-Agent: Apache Tomcat Maven Plugin/2.2[\r][\n]"
  [DEBUG]  &gt;&gt; "Content-Length: 18783041[\r][\n]"
  [DEBUG]  &gt;&gt; "Host: localhost:8080[\r][\n]"
  [DEBUG]  &gt;&gt; "Connection: Keep-Alive[\r][\n]"
  [DEBUG]  &gt;&gt; "Authorization: Basic dXNlcjAwMToxMjM=[\r][\n]"
  [DEBUG]  &gt;&gt; "[\r][\n]"
  [DEBUG] &gt;&gt; PUT /manager/text/deploy?path=%2Floja HTTP/1.1
  [DEBUG] &gt;&gt; User-Agent: Apache Tomcat Maven Plugin/2.2
  [DEBUG] &gt;&gt; Content-Length: 18783041
  [DEBUG] &gt;&gt; Host: localhost:8080
  [DEBUG] &gt;&gt; Connection: Keep-Alive
  [DEBUG] &gt;&gt; Authorization: Basic dXNlcjAwMToxMjM=
  Uploading: http://localhost:8080/manager/text/deploy?path=%2Floja
  ...
  [DEBUG] Connection 0.0.0.0:53183&lt;-&gt;127.0.0.1:8080 closed
  [DEBUG] Closing the connection.
  [DEBUG] Connection 0.0.0.0:53183&lt;-&gt;127.0.0.1:8080 closed
  [DEBUG] Connection 0.0.0.0:53183&lt;-&gt;127.0.0.1:8080 shut down
  [DEBUG] Connection 0.0.0.0:53183&lt;-&gt;127.0.0.1:8080 closed
  [DEBUG] Connection released: [id: 0][route: {}-&gt;http://localhost:8080][total kept alive: 0; route allocated: 0 of 2; total allocated: 0 of 5]
  [INFO] ------------------------------------------------------------------------
  [INFO] BUILD FAILURE
  [INFO] ------------------------------------------------------------------------
  [INFO] Total time: 5.271 s
  [INFO] Finished at: 2014-08-16T08:11:09-03:00
  [DEBUG] Connection manager is shutting down
  [INFO] Final Memory: 14M/109M
  [INFO] ------------------------------------------------------------------------
  [DEBUG] Connection manager shut down
  </code></pre>