title: Maven Deploy to Tomcat
body: <p>I want to deploy Maven based war file to Tomcat.
  Technologies used :</p>
  
  <p>Maven 3.1.1
  Eclipse 4.2
  JDK 7
  Spring 4.1.1.RELEASED
  Tomcat 7
  Logback 1.0.13</p>
  
  <p>I have this plugin in my maven file:</p>
  
  <pre><code>&lt;!-- For Maven Tomcat Plugin --&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;/DevicesCloudWebApp&lt;/path&gt;
                  &lt;username&gt;admin&lt;/username&gt;
                  &lt;password&gt;admin&lt;/password&gt;
                  &lt;update&gt;true&lt;/update&gt;
              &lt;/configuration&gt;
            &lt;/plugin&gt;
  </code></pre>
  
  <p>but when I deploy using the command <code>mvn tomcat7:deploy</code></p>
  
  <p>I have this error:</p>
  
  <pre><code>    [DEBUG] Connection 0.0.0.0:62265&lt;-&gt;127.0.0.1:8080 closed
     [INFO] ------------------------------------------------------------------------
  [INFO] 
  [INFO] &gt;&gt;&gt; tomcat7-maven-plugin:2.2:deploy (default-cli) &gt; package @ DevicesCloudWebApp &gt;&gt;&gt;
  [INFO] 
  [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ DevicesCloudWebApp ---
  [WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
  [INFO] Copying 1 resource
  [INFO] 
  [INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ DevicesCloudWebApp ---
  [INFO] Nothing to compile - all classes are up to date
  [INFO] 
  [INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ DevicesCloudWebApp ---
  [WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
  [INFO] skip non existing resourceDirectory /Users/nullpointer/Development/J2EE/eclipseWSJ2EE/DevicesCloudWebApp/src/test/resources
  [INFO] 
  [INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ DevicesCloudWebApp ---
  [INFO] No sources to compile
  [INFO] 
  [INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ DevicesCloudWebApp ---
  [INFO] No tests to run.
  [INFO] 
  [INFO] --- maven-war-plugin:2.2:war (default-war) @ DevicesCloudWebApp ---
  [INFO] Packaging webapp
  [INFO] Assembling webapp [DevicesCloudWebApp] in [/Users/nullpointer/Development/J2EE/eclipseWSJ2EE/DevicesCloudWebApp/target/DevicesCloudWebApp]
  [INFO] Processing war project
  [INFO] Copying webapp resources [/Users/nullpointer/Development/J2EE/eclipseWSJ2EE/DevicesCloudWebApp/src/main/webapp]
  [INFO] Webapp assembled in [97 msecs]
  [INFO] Building war: /Users/nullpointer/Development/J2EE/eclipseWSJ2EE/DevicesCloudWebApp/target/DevicesCloudWebApp.war
  [INFO] WEB-INF/web.xml already added, skipping
  [INFO] 
  [INFO] &lt;&lt;&lt; tomcat7-maven-plugin:2.2:deploy (default-cli) &lt; package @ DevicesCloudWebApp &lt;&lt;&lt;
  [INFO] 
  [INFO] --- tomcat7-maven-plugin:2.2:deploy (default-cli) @ DevicesCloudWebApp ---
  [INFO] Deploying war to http://localhost:8080/DeviceslCloudWebApp  
  Uploading: http://localhost:8080/manager/text/deploy?path=%2FDeviceslCloudWebApp
  2170/6062 KB   
  [INFO] I/O exception (java.net.SocketException) caught when processing request: Broken pipe
  [INFO] Retrying request
  Uploading: http://localhost:8080/manager/text/deploy?path=%2FDeviceslCloudWebApp
  2198/6062 KB   
  [INFO] I/O exception (java.net.SocketException) caught when processing request: Broken pipe
  [INFO] Retrying request
  Uploading: http://localhost:8080/manager/text/deploy?path=%2FDeviceslCloudWebApp
  2176/6062 KB   
  [INFO] I/O exception (java.net.SocketException) caught when processing request: Broken pipe
  [INFO] Retrying request
  Uploading: http://localhost:8080/manager/text/deploy?path=%2FDeviceslCloudWebApp
  2188/6062 KB   
  [INFO] ------------------------------------------------------------------------
  [INFO] BUILD FAILURE
  [INFO] ------------------------------------------------------------------------
  [INFO] Total time: 1.922 s
  [INFO] Finished at: 2016-12-02T20:57:29+01:00
  [INFO] Final Memory: 16M/303M
  [INFO] ------------------------------------------------------------------------
  [ERROR] Failed to execute goal org.apache.tomcat.maven:tomcat7-maven-plugin:2.2:deploy (default-cli) on project DevicesCloudWebApp: Cannot invoke Tomcat manager: Broken pipe -&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>