title: javax.persistance.Entity not getting imported?
body: <p>I was trying to get my hands on spring data auditing. So I started with a simple build.gragle which I wrote below. But I was not able to get all the classes for javax.persistence.* What I mean is <code>@Entity</code> over any POJO was giving me cannot resolve symbol and there was no import available.I am not able to figure what I was missing in my gradle file.</p>
  
  <pre><code>buildscript {
      ext {
          springBootVersion = '1.5.2.RELEASE'
      }
      repositories {
          mavenCentral()
      }
      dependencies {
          classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
      }
  }
  
  apply plugin: 'java'
  apply plugin: 'idea'
  apply plugin: 'eclipse'
  apply plugin: 'org.springframework.boot'
  
  
  jar {
      baseName = 'auditTest'
      version =  '1.0.0-SNAPSHOT'
  }
  
  repositories {
      mavenCentral()
      mavenLocal()
  }
  group = 'com.shubham'
  version = '1.0.0-SNAPSHOT'
  
  sourceCompatibility = 1.8
  targetCompatibility = 1.8
  
  dependencies {
      compile('org.springframework.boot:spring-boot-starter-web')
      compile('org.springframework.data:spring-data-jpa:1.11.1.RELEASE')
  }
  </code></pre>
  
  <p>But then I copied the gradle file from <a href="https://spring.io/guides/gs/accessing-data-jpa/#scratch" rel="nofollow noreferrer">Spring's Getting Started with JPA</a> page. And all the classes for <code>javax.persistance</code> were available.</p>
  
  <pre><code>buildscript {
      repositories {
          mavenCentral()
      }
      dependencies {
          classpath("org.springframework.boot:spring-boot-gradle-plugin:1.5.2.RELEASE")
      }
  }
  
  apply plugin: 'java'
  apply plugin: 'eclipse'
  apply plugin: 'idea'
  apply plugin: 'org.springframework.boot'
  
  jar {
      baseName = 'Audit'
      version =  '0.1.0'
  }
  
  repositories {
      mavenCentral()
      maven { url "https://repository.jboss.org/nexus/content/repositories/releases" }
  }
  
  sourceCompatibility = 1.8
  targetCompatibility = 1.8
  
  dependencies {
      compile("org.springframework.boot:spring-boot-starter-data-jpa")
      testCompile("org.springframework.boot:spring-boot-starter-test")
  }
  </code></pre>
  
  <p>So what was I missing in my <code>build.gradle</code> file ?</p>