title: import javax.persistence.column, javax.persistence.entity, javax.persistence.Id - and so on - cannot be resolved
body: <p>I am trying to follow <a href="http://viralpatel.net/blogs/spring3-mvc-hibernate-maven-tutorial-eclipse-example/" rel="nofollow noreferrer">this tutorial</a>. Instead of starting by using the downloadable project I thought I'd start from a simple "spring MVC - Maven - eclipse" project I did before. This project was running fine.</p>
  
  <p>So, as indicated in that tutorial, I started creating the packages. Then, I created my first class called <code>Contact.java</code> that contains various annotations. See the class below.</p>
  
  <pre><code>package sphbmveclp.contact.form;
  
  import javax.persistence.Column;
  import javax.persistence.Entity;
  import javax.persistence.GeneratedValue;
  import javax.persistence.Id;
  import javax.persistence.Table;
  
  @Entity
  @Table(name="CONTACTS")
  public class Contact {
  
      @Id
      @Column(name="ID")
      @GeneratedValue
      private Integer id;
  
      @Column(name="FIRSTNAME")
      private String firstname;
  
      @Column(name="LASTNAME")
      private String lastname;
  
      @Column(name="EMAIL")
      private String email;
  
      @Column(name="TELEPHONE")
      private String telephone;
  
      public String getEmail() {
          return email;
      }
      public String getTelephone() {
          return telephone;
      }
      public void setEmail(String email) {
          this.email = email;
      }
      public void setTelephone(String telephone) {
          this.telephone = telephone;
      }
      public String getFirstname() {
          return firstname;
      }
      public String getLastname() {
          return lastname;
      }
      public void setFirstname(String firstname) {
          this.firstname = firstname;
      }
      public void setLastname(String lastname) {
          this.lastname = lastname;
      }
      public Integer getId() {
          return id;
      }
      public void setId(Integer id) {
          this.id = id;
      }
  }
  </code></pre>
  
  <p>I added the following dependency thinking it'd do the job as these annotations are "standard JPA annotations"</p>
  
  <pre><code>&lt;dependency&gt;
      &lt;groupId&gt;javax.servlet&lt;/groupId&gt;
      &lt;artifactId&gt;servlet-api&lt;/artifactId&gt;
      &lt;version&gt;2.5&lt;/version&gt;
  &lt;/dependency&gt;
  </code></pre>
  
  <p>However, eclipse says</p>
  
  <pre><code>The import javax.persistence.Column cannot be resolved" for the first import.
  The import javax.persistence.Entity cannot be resolved" for the second import.
  </code></pre>
  
  <p>and so on.</p>
  
  <p>Here is the list of dependencies defined in my <code>pom.xml</code>:</p>
  
  <pre><code>  &lt;properties&gt;
          &lt;org.springframework.version&gt;3.0.5.RELEASE&lt;/org.springframework.version&gt;
          &lt;javax.servlet.jstl.version&gt;1.2&lt;/javax.servlet.jstl.version&gt;
      &lt;/properties&gt;
  
    &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;javax.servlet&lt;/groupId&gt;
              &lt;artifactId&gt;servlet-api&lt;/artifactId&gt;
              &lt;version&gt;2.5&lt;/version&gt;
          &lt;/dependency&gt;
  
         &lt;dependency&gt;
              &lt;groupId&gt;org.springframework&lt;/groupId&gt;
              &lt;artifactId&gt;spring-context&lt;/artifactId&gt;
              &lt;version&gt;${org.springframework.version}&lt;/version&gt;
         &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework&lt;/groupId&gt;
              &lt;artifactId&gt;spring-webmvc&lt;/artifactId&gt;
              &lt;version&gt;${org.springframework.version}&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework&lt;/groupId&gt;
              &lt;artifactId&gt;spring-web&lt;/artifactId&gt;
              &lt;version&gt;${org.springframework.version}&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework&lt;/groupId&gt;
              &lt;artifactId&gt;spring-test&lt;/artifactId&gt;
              &lt;version&gt;${org.springframework.version}&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;javax.servlet&lt;/groupId&gt;
              &lt;artifactId&gt;jstl&lt;/artifactId&gt;
              &lt;version&gt;${javax.servlet.jstl.version}&lt;/version&gt;
          &lt;/dependency&gt;
  
         &lt;dependency&gt;
              &lt;groupId&gt;log4j&lt;/groupId&gt;
              &lt;artifactId&gt;log4j&lt;/artifactId&gt;
              &lt;version&gt;1.2.16&lt;/version&gt;
          &lt;/dependency&gt;
  
         &lt;dependency&gt;
           &lt;groupId&gt;junit&lt;/groupId&gt;
          &lt;artifactId&gt;junit&lt;/artifactId&gt;
          &lt;version&gt;4.8.1&lt;/version&gt;
          &lt;scope&gt;test&lt;/scope&gt;
         &lt;/dependency&gt;
    &lt;/dependencies&gt;
  </code></pre>