title: How do I include JPA 2.1 functionality in my Maven project?
body: <p>I’m using Maven 3, JPA 2.1, and Hibernate 4.3.5.Final.  I want to use JPA 2.1 because it offers several features, most notably adding conditions to left outer join clauses.  I have included the following dependencies in my Maven project …</p>
  
  <pre><code>    &lt;dependency&gt;
          &lt;groupId&gt;org.hibernate.javax.persistence&lt;/groupId&gt;
          &lt;artifactId&gt;hibernate-jpa-2.1-api&lt;/artifactId&gt;
          &lt;version&gt;1.0.0.Final&lt;/version&gt;
      &lt;/dependency&gt;   
      &lt;dependency&gt;
          &lt;groupId&gt;org.hibernate&lt;/groupId&gt;
          &lt;artifactId&gt;hibernate-validator&lt;/artifactId&gt;
          &lt;version&gt;4.3.2.Final&lt;/version&gt;
          &lt;exclusions&gt;
              &lt;exclusion&gt;
                  &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
                  &lt;artifactId&gt;slf4j-api&lt;/artifactId&gt;
              &lt;/exclusion&gt;
          &lt;/exclusions&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.hibernate&lt;/groupId&gt;
          &lt;artifactId&gt;hibernate-entitymanager&lt;/artifactId&gt;
          &lt;version&gt;4.3.6.Final&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.hibernate&lt;/groupId&gt;
          &lt;artifactId&gt;hibernate-ehcache&lt;/artifactId&gt;
          &lt;version&gt;4.3.6.Final&lt;/version&gt;
      &lt;/dependency&gt;
  </code></pre>
  
  <p>However, when I try and compile the following, I get a compilation error (“cannot find symbol”) on the “.on(“ clause.  </p>
  
  <pre><code>    final CriteriaBuilder cb = m_entityManager.getCriteriaBuilder();
      CriteriaQuery&lt;Message&gt; query = cb.createQuery(Message.class);
      Root&lt;Message&gt; messageRoot = query.from(Message.class);
      final Join&lt;Message, Group&gt; groupJoin = messageRoot.join(Message_.group);
      final Join&lt;Message, MessageReadDate&gt; msgReadDateJoin = messageRoot.join(Message_.messageReads, JoinType.LEFT);
      msgReadDateJoin.on(msgReadDateJoin.get(MessageReadDate_.recipient), recipient);
  </code></pre>
  
  <p>What libraries do I need to include in my Maven project to get JPA 2.1 and hence the “join.on” functionality?</p>