title: How to debug issues with deploying to tomcat from eclipse?
body: <p>I've inherited a Spring web app.  It's a gradle web app project that I've imported into Eclipse.  We're using Eclipse 4.7.3, Tomcat 7.0.47 and JDK 1.8.0.151.</p>
  
  <p>The problem is that when I deploy the project to Tomcat from Eclipse, some of the dependency jars are not copied to the project lib directory.  When TC tries to start the web app, there are ClassNotFoundException errors.</p>
  
  <p>I'm new to Java web apps, so what I need is some tips for verifying my project import/build/deploy.</p>
  
  <p>Here's what I've done so far:</p>
  
  <ul>
  <li>Install Tomcat 7.0.47 (don't start it after install) Install Eclipse
  4.7.3 JavaEE flavor (which comes with Buildship Gradle integration 2.0 installed)</li>
  <li>Import my project as a Gradle project (File -> Import -> Gradle ->
  Existing    Gradle Project).  I point at the project root, choose the
  web project for deployment, and use the default settings.</li>
  <li>Add a server to the project (from Server view click Add -> choose<br>
  Tomcat 7.0 -> point to TC root)</li>
  <li>Right click the web target and select    Run As -> Run As Server and
  choose the TC 7 server I added.</li>
  </ul>
  
  <p>At this point the project builds and deploys.  The console shows the TC log.  TC starts but the shows an error when it attempts to start the web app (for example):</p>
  
  <blockquote>
    <p>Caused by: java.lang.ClassNotFoundException: org.apache.log4j.Level</p>
  </blockquote>
  
  <p>I could copy jars but it's my impression Gradle should be grabbing the dependency jars during deployment.  I can verify that some are copied, but others are missing.  How can I debug this issue?</p>
  
  <p>Here's part of my build.gradle file</p>
  
  <pre><code>buildscript {
    repositories {
      maven {
        url projectDownloadUrl 
      }
    }
    dependencies {
      classpath lib_license_gradle_plugin
    }
  }
  </code></pre>
  
  <p>The web app is deployed to ...eclipse-workspace.metadata.plugins\org.eclipse.wst.server.core\tmp0.  The lib directory here contains some of the deployed dependency jars.  The gradle.properties file contains a list of dependencies, for example</p>
  
  <blockquote>
    <p>lib_apache_tomee=org.apache.openejb:apache-tomee:1.7.1</p>
  </blockquote>