title: Tomcat deployement issue in a Maven project
body: <p>I have been trying to create a simple maven web based project to be confident about maven. I have added tomcat7 plugin in my pom.xml to use it as a server. But when i started to deploy my war file to tomcat by using </p>
  
  <blockquote>
    <p>tomcat7:deploy</p>
  </blockquote>
  
  <p>it is throwing an error as follows,</p>
  
  <pre><code>[INFO] Deploying war to http://127.0.0.1:8080/MavenWeb  
  [INFO] ------------------------------------------------------------------------
  [INFO] BUILD FAILURE
  [INFO] ------------------------------------------------------------------------
  [INFO] Total time: 13.585s
  [INFO] Finished at: Wed Jan 30 16:03:06 IST 2013
  [INFO] Final Memory: 9M/24M
  [INFO] ------------------------------------------------------------------------
  [ERROR] Failed to execute goal org.apache.tomcat.maven:tomcat7-maven-plugin:2.0:deploy  (default-cli) on project MavenWeb: Cannot invoke Tomcat manager: Connection to http://127.0.0.1:8080 refused: Connection refused -&gt; [Help 1]
  </code></pre>
  
  <p>My plugin section in pom.xml is as follows.</p>
  
  <pre><code>&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.0&lt;/version&gt;
      &lt;configuration&gt;
         &lt;url&gt;http://127.0.0.1:8080/manager/html&lt;/url&gt;
         &lt;warFile&gt;/home/shebin/Maven Folder/MavenWeb/target/MavenWeb.war&lt;/warFile&gt;
     &lt;server&gt;TomcatServer&lt;/server&gt;
         &lt;path&gt;/MavenWeb&lt;/path&gt;
     &lt;username&gt;tomcat&lt;/username&gt;
         &lt;password&gt;tomcat&lt;/password&gt;
      &lt;/configuration&gt;
  &lt;/plugin&gt;
  </code></pre>
  
  <p>.m2/settings.xml and /home/shebin/apache-maven-3.0.4/conf/settings.xml</p>
  
  <pre><code>&lt;server&gt;
          &lt;id&gt;TomcatServer&lt;/id&gt;
          &lt;username&gt;tomcat&lt;/username&gt;
          &lt;password&gt;tomcat&lt;/password&gt;
  &lt;/server&gt;
  </code></pre>
  
  <p>/home/shebin/apache-tomcat-7.0.35/conf/tomcat-users.xml</p>
  
  <pre><code>&lt;role rolename="manager-gui"/&gt;
  &lt;user username="tomcat" password="tomcat" roles="manager-gui"/&gt;
  </code></pre>
  
  <p>I have came through various solution and nothing is working in my way. My Maven version is 3.0.4 and using tomcat7 plugin.</p>