title: Tomcat7 + Maven plugin: Tomcat will not start with my war
body: <p>I'm using <code>java 8</code> and <code>tomcat 7</code> and <code>maven 3.3.9</code> with the maven tomcat plugin:</p>
  
  <pre><code>&lt;build&gt;
      &lt;plugins&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;port&gt;8085&lt;/port&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
      &lt;/plugins&gt;
  &lt;/build&gt;
  </code></pre>
  
  <p>For a while everything worked just fine and <code>tomcat7:run-war</code> worked.</p>
  
  <p>And now I'm getting this error for no apparent reason:</p>
  
  <pre><code>[INFO] --- tomcat7-maven-plugin:2.2:run-war (default-cli) @ tomcat-example ---
  [INFO] Running war on http://localhost:8085/tomcat-example
  [INFO] Using existing Tomcat server configuration at /Users/shikloshi/java_workspace/webapp-examples/tomcat-example/target/tomcat
  [INFO] create webapp with contextPath: /tomcat-example
  Jul 04, 2016 2:30:45 PM org.apache.coyote.AbstractProtocol init
  INFO: Initializing ProtocolHandler ["http-bio-8085"]
  Jul 04, 2016 2:30:45 PM org.apache.catalina.core.StandardService startInternal
  INFO: Starting service Tomcat
  Jul 04, 2016 2:30:45 PM org.apache.catalina.core.StandardEngine startInternal
  INFO: Starting Servlet Engine: Apache Tomcat/7.0.47
  [INFO] ------------------------------------------------------------------------
  [INFO] BUILD FAILURE
  [INFO] ------------------------------------------------------------------------
  [INFO] Total time: 1.693s
  [INFO] Finished at: Mon Jul 04 14:30:45 IDT 2016
  [INFO] Final Memory: 17M/307M
  [INFO] ------------------------------------------------------------------------
  [ERROR] Failed to execute goal org.apache.tomcat.maven:tomcat7-maven-plugin:2.2:run-war (default-cli) on project tomcat-example: Could not start Tomcat: Failed to start component [StandardServer[-1]]: Failed to start component [StandardService[Tomcat]]: Failed to start component [StandardEngine[Tomcat]]: Failed to start component [Realm[MemoryRealm]]: Memory database file /Users/shikloshi/java_workspace/webapp-examples/tomcat-example/target/tomcat/conf/tomcat-users.xml cannot be read -&gt; [Help 1]
  </code></pre>
  
  <p>This is the error:</p>
  
  <pre><code>Tomcat: Failed to start component [StandardServer[-1]]: Failed to start component [StandardService[Tomcat]]: Failed to start component [StandardEngine[Tomcat]]: Failed to start component [Realm[MemoryRealm]]: Memory database file /Users/shikloshi/java_workspace/webapp-examples/tomcat-example/target/tomcat/conf/tomcat-users.xml cannot be read -&gt; [Help 1]
  </code></pre>
  
  <p>Who is responsible for writing the tomcat configuration inside my target dir and why is it not written?</p>