title: Tomcat 7 maven build failed with Jersey
body: <p>I am trying to setup maven project with Jersey 2.5 in eclipe Luna.  </p>
  
  <p>Here is may pom.xml  </p>
  
  <pre><code>   &lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"&gt;
    &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
    &lt;groupId&gt;MavenTest&lt;/groupId&gt;
    &lt;artifactId&gt;Jersey Project&lt;/artifactId&gt;
    &lt;packaging&gt;war&lt;/packaging&gt;
    &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
    &lt;name&gt;MC-Server Maven Webapp&lt;/name&gt;
  
    &lt;url&gt;http://maven.apache.org&lt;/url&gt;   
  
        &lt;pluginRepositories&gt;
          &lt;pluginRepository&gt;
          &lt;id&gt;apache.snapshots&lt;/id&gt;
          &lt;name&gt;Apache Snapshots&lt;/name&gt;
          &lt;url&gt;http://people.apache.org/repo/m2-snapshot-repository&lt;/url&gt;
          &lt;releases&gt;
          &lt;enabled&gt;false&lt;/enabled&gt;
          &lt;/releases&gt;
          &lt;snapshots&gt;
          &lt;enabled&gt;true&lt;/enabled&gt;
          &lt;/snapshots&gt;
          &lt;/pluginRepository&gt;
      &lt;/pluginRepositories&gt;
  
  
      &lt;build&gt;
      &lt;finalName&gt;MavenJerseyTest&lt;/finalName&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.1&lt;/version&gt;    
          &lt;/plugin&gt;                     
      &lt;/plugins&gt;    
  
    &lt;/build&gt;
  
    &lt;dependencies&gt;
    &lt;dependency&gt;
   &lt;groupId&gt;org.glassfish.jersey.containers&lt;/groupId&gt;
   &lt;artifactId&gt;jersey-container-servlet&lt;/artifactId&gt;
   &lt;version&gt;2.5.1&lt;/version&gt;
  &lt;/dependency&gt;
    &lt;/dependencies&gt;
  
  &lt;/project&gt;    
  </code></pre>
  
  <p>When I build it   </p>
  
  <pre><code>[INFO] Scanning for projects...
  [WARNING] The POM for org.apache.tomcat.maven:tomcat7-maven-plugin:jar:7 is missing, no dependency information available
  [WARNING] Failed to retrieve plugin descriptor for org.apache.tomcat.maven:tomcat7-maven-plugin:7: Plugin org.apache.tomcat.maven:tomcat7-maven-plugin:7 or one of its dependencies could not be resolved: Failure to find org.apache.tomcat.maven:tomcat7-maven-plugin:jar:7 in http://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced
  [INFO] Downloading: http://people.apache.org/repo/m2-snapshot-repository/org/apache/maven/plugins/maven-metadata.xml
  [INFO] Downloading: http://people.apache.org/repo/m2-snapshot-repository/org/codehaus/mojo/maven-metadata.xml
  [WARNING] Could not transfer metadata org.apache.maven.plugins/maven-metadata.xml from/to apache.snapshots (http://people.apache.org/repo/m2-snapshot-repository): connect timed out
  [WARNING] Could not transfer metadata org.codehaus.mojo/maven-metadata.xml from/to apache.snapshots (http://people.apache.org/repo/m2-snapshot-repository): connect timed out
  [INFO] Downloading: http://people.apache.org/repo/m2-snapshot-repository/org/codehaus/mojo/tomcat-maven-plugin/maven-metadata.xml
  [WARNING] Could not transfer metadata org.codehaus.mojo:tomcat-maven-plugin/maven-metadata.xml from/to apache.snapshots (http://people.apache.org/repo/m2-snapshot-repository): connect timed out
  [INFO] 
  [INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder with a thread count of 1
  [INFO]                                                                         
  [INFO] ------------------------------------------------------------------------
  [INFO] Building MC-Server Maven Webapp 0.0.1-SNAPSHOT
  [INFO] ------------------------------------------------------------------------
  [WARNING] The POM for org.apache.tomcat.maven:tomcat7-maven-plugin:jar:7 is missing, no dependency information available
  [WARNING] Failed to retrieve plugin descriptor for org.apache.tomcat.maven:tomcat7-maven-plugin:7: Plugin org.apache.tomcat.maven:tomcat7-maven-plugin:7 or one of its dependencies could not be resolved: Failure to find org.apache.tomcat.maven:tomcat7-maven-plugin:jar:7 in http://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced
  [WARNING] Failure to transfer org.apache.maven.plugins/maven-metadata.xml from http://people.apache.org/repo/m2-snapshot-repository was cached in the local repository, resolution will not be reattempted until the update interval of apache.snapshots has elapsed or updates are forced. Original error: Could not transfer metadata org.apache.maven.plugins/maven-metadata.xml from/to apache.snapshots (http://people.apache.org/repo/m2-snapshot-repository): connect timed out
  [WARNING] Failure to transfer org.codehaus.mojo/maven-metadata.xml from http://people.apache.org/repo/m2-snapshot-repository was cached in the local repository, resolution will not be reattempted until the update interval of apache.snapshots has elapsed or updates are forced. Original error: Could not transfer metadata org.codehaus.mojo/maven-metadata.xml from/to apache.snapshots (http://people.apache.org/repo/m2-snapshot-repository): connect timed out
  [WARNING] Failure to transfer org.codehaus.mojo:tomcat-maven-plugin/maven-metadata.xml from http://people.apache.org/repo/m2-snapshot-repository was cached in the local repository, resolution will not be reattempted until the update interval of apache.snapshots has elapsed or updates are forced. Original error: Could not transfer metadata org.codehaus.mojo:tomcat-maven-plugin/maven-metadata.xml from/to apache.snapshots (http://people.apache.org/repo/m2-snapshot-repository): connect timed out
  [INFO] 
  [INFO] &gt;&gt;&gt; tomcat-maven-plugin:1.1:run (default-cli) @ MC-Server &gt;&gt;&gt;
  [INFO] 
  [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ MC-Server ---
  [WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is plat
  form dependent!
  [INFO] Copying 3 resources
  [INFO] 
  [INFO] --- maven-compiler-plugin:2.5.1:compile (default-compile) @ MC-Server ---
  [INFO] No sources to compile
  [INFO] 
  [INFO] &lt;&lt;&lt; tomcat-maven-plugin:1.1:run (default-cli) @ MC-Server &lt;&lt;&lt;
  [INFO] 
  [INFO] --- tomcat-maven-plugin:1.1:run (default-cli) @ MC-Server ---
  [INFO] Running war on http://localhost:8080/MavenJerseyTest
  [INFO] Creating Tomcat server configuration at /myprojects/maven/MavenJerseyTest/target/tomcat    
  </code></pre>
  
  <p>This seemed to be not working with tomcat 7, but 6.</p>
  
  <p>Any one let me know where I have gone wrong ? (This same project structure could be built as a noraml web project in eclipse and worked calm, also there are same question like <a href="https://stackoverflow.com/questions/7899981/tomcat-7-maven-plugin-snapshot-repository-issue">this</a> , but I tried them, not working.. I changed the tomcat plugin version as 2.1 which was suggested as an answer in another question, it also not worked.. )</p>