title: Maven gives error when trying to deploy tomcat
body: <p>I have read answers related to this on stackoverflow, but still I am having this issue.</p>
  
  <p>my tomcat-users.xml :</p>
  
  <pre><code>    &lt;role rolename = "manager-gui" /&gt; 
      &lt;role rolename = "manager-script" /&gt; 
      &lt;user username = "AppManager"password ="password"roles ="manager-gui"/&gt; 
      &lt;user username = "tomcatmvn" password = "password" roles = "manager-script" /&gt; 
  </code></pre>
  
  <p>pom.xml:</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.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;/myproject&lt;/path&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
  </code></pre>
  
  <p>settings.xml</p>
  
  <pre><code>    &lt;server&gt; 
         &lt;id&gt;TomcatServer&lt;/id&gt; 
         &lt;username&gt;tomcatmvn&lt;/username&gt; 
         &lt;password&gt;password&lt;/password&gt; 
      &lt;/server&gt; 
  </code></pre>
  
  <p>When i use following: mvn -X tomcat7:deploy
  I get the following error: </p>
  
  <pre><code>Tomcat return http status error: 403, Reason Phrase: Forbidden: &lt;html&gt;&lt;head&gt;&lt;title&gt;Apache Tomcat/7.0.47 - Error report&lt;/title&gt;&lt;style&gt;&lt;!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--&gt;&lt;/style&gt; &lt;/head&gt;&lt;body&gt;&lt;h1&gt;HTTP Status 403 - &lt;/h1&gt;&lt;HR size="1" noshade="noshade"&gt;&lt;p&gt;&lt;b&gt;type&lt;/b&gt; Status report&lt;/p&gt;&lt;p&gt;&lt;b&gt;message&lt;/b&gt; &lt;u&gt;&lt;/u&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;description&lt;/b&gt; &lt;u&gt;Access to the specified resource has been forbidden.&lt;/u&gt;&lt;/p&gt;&lt;HR size="1" noshade="noshade"&gt;&lt;h3&gt;Apache Tomcat/7.0.47&lt;/h3&gt;&lt;/body&gt;&lt;/html&gt;
  at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
  at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
  at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
  at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
  at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
  at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
  at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
  at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
  at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
  at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
  at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
  at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  at java.lang.reflect.Method.invoke(Method.java:606)
  at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
  at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
  at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
  at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
  </code></pre>
  
  <p>Caused by: org.apache.maven.plugin.MojoExecutionException: Tomcat return http status error: 403, Reason Phrase: Forbidden: Apache Tomcat/7.0.47 - Error report <h1>HTTP Status 403 - </h1><p><b>type</b> Status report</p><p><b>message</b> </p><p><b>description</b> Access to the specified resource has been forbidden.</p><h3>Apache Tomcat/7.0.47</h3>
      at org.apache.tomcat.maven.plugin.tomcat7.AbstractTomcat7Mojo.checkTomcatResponse(AbstractTomcat7Mojo.java:76)
      at org.apache.tomcat.maven.plugin.tomcat7.deploy.AbstractDeployWarMojo.deployWar(AbstractDeployWarMojo.java:88)
      at org.apache.tomcat.maven.plugin.tomcat7.deploy.AbstractDeployMojo.invokeManager(AbstractDeployMojo.java:82)
      at org.apache.tomcat.maven.plugin.tomcat7.AbstractCatalinaMojo.execute(AbstractCatalinaMojo.java:132)
      at org.apache.tomcat.maven.plugin.tomcat7.AbstractWarCatalinaMojo.execute(AbstractWarCatalinaMojo.java:68)
      at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
      ... 19 more</p>
  
  <pre><code>enter code here
  </code></pre>