title: Gradle project in eclipse builds fine but java files show compilation error
body: <p>This is my first gradle project. I am using <a href="http://projects.eclipse.org/projects/tools.buildship" rel="noreferrer">Buildship eclipse plugin</a> for gradle. In my <strong>build.gradle</strong> file, I have below plugins applied - </p>
  
  <pre><code>apply plugin: 'java'
  apply plugin: 'eclipse'
  apply plugin: 'idea'
  apply plugin: 'war'
  apply plugin: 'com.bmuschko.tomcat'
  </code></pre>
  
  <p>All the relevant dependencies are defined as compile as below - </p>
  
  <pre><code>.
  .
  compile ("org.hibernate:hibernate-entitymanager:${hibernateVer}")
  compile ("org.hibernate:hibernate-core:${hibernateVer}")
  compile ("org.hibernate:hibernate-validator:${hibernateValVer}")
  
  compile ("org.slf4j:slf4j-api:${slf4jVer}")
  compile ("org.slf4j:slf4j-log4j12:${slf4jVer}")
  .
  .
  </code></pre>
  
  <p>The project builds and runs successfully using tomcatRun command as well. But the eclipse is showing compilation errors on my imports in java files, saying that the dependencies can not be resolved.</p>
  
  <p>I tried Project->Clean and then refresh, but still stuck. What can i do to remove these compilation errors? Thanks in advance.</p>