title: Tomcat-users.xml is rewritten on container restart - how do I supply credentials?
body: <p>Im using cargo to deploy a war file to a tomcat server. I'm unable to login to the manager however as conf/tomcat-users.xml is rewritten when I start the container ie</p>
  
  <pre><code>mvn cargo:run
  </code></pre>
  
  <p>how I can supply user/password creds to access the manager?</p>
  
  <p>cheers!</p>
  
  <p><strong>Edit</strong>: Cargo configuration</p>
  
  <pre><code>&lt;plugins&gt;
      &lt;!-- Start's the plugin tag for Cargo! --&gt;
  &lt;plugin&gt;
  &lt;groupId&gt;org.codehaus.cargo&lt;/groupId&gt;
  &lt;artifactId&gt;cargo-maven2-plugin&lt;/artifactId&gt;
  &lt;configuration&gt;
    &lt;wait&gt;false&lt;/wait&gt;
    &lt;container&gt;
      &lt;containerId&gt;tomcat${tomcat.major}x&lt;/containerId&gt;
      &lt;zipUrlInstaller&gt;
        &lt;url&gt;http://archive.apache.org/dist/tomcat/tomcat-${tomcat.major}/v${tomcat.version}/bin/apache-tomcat-${tomcat.version}.tar.gz&lt;/url&gt;
        &lt;extractDir&gt;${project.build.directory}/extract/&lt;/extractDir&gt;
        &lt;downloadDir&gt;${project.build.directory}/download/&lt;/downloadDir&gt;
      &lt;/zipUrlInstaller&gt;
      &lt;output&gt;${project.build.directory}/tomcat${tomcat.major}x.log&lt;/output&gt;
      &lt;log&gt;${project.build.directory}/cargo.log&lt;/log&gt;
    &lt;/container&gt;
    &lt;configuration&gt;
      &lt;home&gt;${project.build.directory}/tomcat-${tomcat.version}/container&lt;/home&gt;
      &lt;properties&gt;
        &lt;cargo.logging&gt;high&lt;/cargo.logging&gt;
        &lt;cargo.servlet.port&gt;9080&lt;/cargo.servlet.port&gt;
        &lt;cargo.tomcat.ajp.port&gt;9008&lt;/cargo.tomcat.ajp.port&gt;
      &lt;/properties&gt;
    &lt;/configuration&gt;
  &lt;/configuration&gt;
  &lt;executions&gt;
    &lt;execution&gt;
      &lt;id&gt;start-container&lt;/id&gt;
      &lt;phase&gt;pre-integration-test&lt;/phase&gt;
      &lt;goals&gt;
        &lt;goal&gt;start&lt;/goal&gt;
        &lt;goal&gt;deploy&lt;/goal&gt;
      &lt;/goals&gt;
      &lt;configuration&gt;
        &lt;deployer&gt;
          &lt;deployables&gt;
            &lt;deployable&gt;
              &lt;groupId&gt;${project.groupId}&lt;/groupId&gt;
              &lt;artifactId&gt;mod-war&lt;/artifactId&gt;
              &lt;type&gt;war&lt;/type&gt;
              &lt;pingURL&gt;http://localhost:9080/mod-war&lt;/pingURL&gt;
              &lt;pingTimeout&gt;30000&lt;/pingTimeout&gt;
              &lt;properties&gt;
                &lt;context&gt;mod-war&lt;/context&gt;
              &lt;/properties&gt;
            &lt;/deployable&gt;
          &lt;/deployables&gt;
        &lt;/deployer&gt;
      &lt;/configuration&gt;
    &lt;/execution&gt;
    &lt;execution&gt;
      &lt;id&gt;stop-container&lt;/id&gt;
      &lt;phase&gt;post-integration-test&lt;/phase&gt;
      &lt;goals&gt;
        &lt;goal&gt;stop&lt;/goal&gt;
      &lt;/goals&gt;
    &lt;/execution&gt;
  &lt;/executions&gt;
  </code></pre>
  
  <p>
      </p>