title: Run Tomcat and deploy project with own server.xml
body: <p>I just want to run a web project that has been configured in a maven project with the pom.xml.
  It uses the maven tomcat7-maven-plugin to deploy the web app artifact and all is working properly at this point.</p>
  
  <p>Now I want to add its own server.xml and tomcat-users.xml in the tomcat configuration. I read that I need to add the following lines.</p>
  
  <pre><code> &lt;serverXml&gt;src/main/resources/tomcat/server.xml&lt;/serverXml&gt;
   &lt;tomcatUsers&gt;src/main/resources/tomcat/tomcat-users.xml&lt;/tomcatUsers&gt;
  </code></pre>
  
  <p>And that is fine. It is working now and tomcat is deployed using the configuration file above,but the problem is > <strong>Web application artifact is not deployed there</strong> (is not deployed automatically when I run tomcat7:run). It seems the artifact is not detected by the plugin and just starts the tomcat server without adding the artifact to the webapps just use the new config files.</p>
  
  <p>I use this config.</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;executions&gt;
            &lt;execution&gt;
              &lt;id&gt;tomcat-run&lt;/id&gt;
              &lt;goals&gt;
                &lt;goal&gt;exec-war-only&lt;/goal&gt;
              &lt;/goals&gt;
              &lt;phase&gt;package&lt;/phase&gt;
             &lt;configuration&gt;
          &lt;url&gt;http://localhost:8080/web-services&lt;/url&gt;
          &lt;path&gt;/web-services&lt;/path&gt;
          &lt;serverXml&gt;src/main/resources/tomcat/server.xml&lt;/serverXml&gt;
                  &lt;tomcatUsers&gt;src/main/resources/tomcat/tomcat-users.xml&lt;/tomcatUsers&gt;
                     &lt;warRunDependencies&gt;
                      &lt;warRunDependency&gt;
                       &lt;dependency&gt;
                          &lt;groupId&gt;com.koitoer.webservices&lt;/groupId&gt;
                          &lt;artifactId&gt;web-services&lt;/artifactId&gt;
                          &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
                          &lt;type&gt;war&lt;/type&gt;
                        &lt;/dependency&gt;
                      &lt;contextPath&gt;/web-services&lt;/contextPath&gt;
                  &lt;/warRunDependency&gt;
                &lt;/warRunDependencies&gt;
      &lt;/configuration&gt;
      &lt;/execution&gt;
          &lt;/executions&gt;
  &lt;/plugin&gt;
  </code></pre>
  
  <p>But tomcat starts deploy the webapp artifact but does not use the new config files.</p>
  
  <p>What is the correct configuration there, I checked this <a href="https://stackoverflow.com/questions/13604377/tomcat7-maven-plugin-custom-server-xml">post</a> but nothing, this is possible or I should add the war file manually using tomcat manager?</p>