title: Maven dependencies for Hibernate
body: <p>I need to use Hibernate with Spring for which I am trying to figure out the Maven dependencies to use and it can't be too difficult but somehow I am not able to get it done.</p>
  
  <p>In toy application I am developing I need to implement a few use cases that I already developed about a year ago or two for which I used Hiebrnate 3.3.2.GA with Hibernate annotations 3.4.0.GA. So I just needed the same jars that I included in my project without using maven. So I added the following in my <code>pom.xml</code> file:</p>
  
  <pre><code>&lt;dependencies&gt;
          ...
          &lt;dependency&gt;
             &lt;groupId&gt;org.hibernate&lt;/groupId&gt;
             &lt;artifactId&gt;hibernate-core&lt;/artifactId&gt;
             &lt;version&gt;3.3.2.GA&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
             &lt;groupId&gt;org.hibernate&lt;/groupId&gt;
             &lt;artifactId&gt;hibernate-annotations&lt;/artifactId&gt;
             &lt;version&gt;3.4.0.GA&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
             &lt;groupId&gt;org.hibernate&lt;/groupId&gt;
             &lt;artifactId&gt;hibernate-commons-annotations&lt;/artifactId&gt;
             &lt;version&gt;3.3.0.GA&lt;/version&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;3.4.0.GA&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.15&lt;/version&gt;
          &lt;/dependency&gt;
         ... 
  &lt;/dependencies&gt;
      &lt;repositories&gt;  
          ...
          &lt;repository&gt;
              &lt;id&gt;JBoss&lt;/id&gt;
              &lt;name&gt;JBoss Repsitory&lt;/name&gt;
              &lt;layout&gt;default&lt;/layout&gt;
              &lt;url&gt;http://repository.jboss.org/maven2&lt;/url&gt;
          &lt;/repository&gt;
          ...
      &lt;/repositories&gt; 
  </code></pre>
  
  <p>And what I am getting as the result is:</p>
  
  <pre><code>Multiple annotations found at this line:
      - Missing artifact log4j:log4j:jar:1.2.15:compile
      - Missing artifact com.mortennobel:java-image-scaling:jar:0.8.5:compile
      - Missing artifact org.hibernate:hibernate-core:jar:3.3.2.GA:compile
      - Missing artifact com.jhlabs:filters:jar:2.0.235:compile
      - Missing artifact net.java.dev.rome:rome:jar:1.0.0:compile
      - Missing artifact javassist:javassist:jar:3.4.GA:compile
      - Missing artifact jdom:jdom:jar:1.0:compile
      - Missing artifact com.sun.jdmk:jmxtools:jar:1.2.1:compile
      - Missing artifact org.springframework:spring-web:jar:3.1.0.RELEASE:compile
      - Missing artifact org.slf4j:jcl-over-slf4j:jar:1.6.1:runtime
      - Missing artifact org.hibernate:hibernate-commons-annotations:jar:3.1.0.GA:compile
      - Missing artifact commons-io:commons-io:jar:2.0.1:compile
      - Failed to read artifact descriptor for org.hibernate:hibernate-commons-
       annotations:jar:3.3.0.GA
      - Missing artifact org.hibernate:hibernate-entitymanager:jar:3.4.0.GA:compile
      - Missing artifact org.springframework:spring-beans:jar:3.1.0.RELEASE:compile
      - Missing artifact javax.mail:mail:jar:1.4:compile
      - Missing artifact org.slf4j:slf4j-api:jar:1.6.1:compile
      - Missing artifact org.hibernate:hibernate-validator:jar:4.1.0.Final:compile
      - Missing artifact javax.validation:validation-api:jar:1.0.0.GA:compile
      - Missing artifact commons-dbcp:commons-dbcp:jar:1.4:compile
      - Missing artifact org.codehaus.jackson:jackson-mapper-asl:jar:1.8.1:compile
      - Missing artifact org.slf4j:slf4j-log4j12:jar:1.6.1:runtime
      - Missing artifact javax.jms:jms:jar:1.1:compile
      - Missing artifact javax.transaction:jta:jar:1.1:compile
      - Missing artifact joda-time:joda-time:jar:1.6.2:compile
      - Missing artifact javax.servlet.jsp:jsp-api:jar:2.1:provided
      - Missing artifact javax.activation:activation:jar:1.1:compile
      - Missing artifact javax.servlet.jsp.jstl:jstl-api:jar:1.2:compile
      - Missing artifact org.hibernate:hibernate-annotations:jar:3.4.0.GA:compile
      - Missing artifact org.springframework:spring-expression:jar:3.1.0.RELEASE:compile
      - Missing artifact junit:junit:jar:4.8:test
      - Missing artifact org.springframework:spring-core:jar:3.1.0.RELEASE:compile
      - Missing artifact org.springframework:spring-asm:jar:3.1.0.RELEASE:compile
      - Missing artifact javax.servlet:servlet-api:jar:2.5:provided
      - Missing artifact com.sun.jmx:jmxri:jar:1.2.1:compile
      - Missing artifact org.springframework:spring-webmvc:jar:3.1.0.RELEASE:compile
      - Missing artifact org.glassfish.web:jstl-impl:jar:1.2:compile
      - Missing artifact org.codehaus.jackson:jackson-core-asl:jar:1.8.1:compile
      - Missing artifact org.aspectj:aspectjrt:jar:1.6.10:compile
      - Missing artifact javax.annotation:jsr250-api:jar:1.0:compile
      - Missing artifact aopalliance:aopalliance:jar:1.0:compile
      - Missing artifact commons-pool:commons-pool:jar:1.5.4:compile
      - Missing artifact org.springframework:spring-context-support:jar:
       3.1.0.RELEASE:compile
      - Missing artifact commons-collections:commons-collections:jar:3.1:compile
      - Missing artifact commons-fileupload:commons-fileupload:jar:1.2.2:compile
      - Missing artifact mysql:mysql-connector-java:jar:5.1.15:compile
      - Missing artifact org.springframework:spring-aop:jar:3.1.0.RELEASE:compile
      - Missing artifact org.hibernate:ejb3-persistence:jar:1.0.2.GA:compile
      - Missing artifact antlr:antlr:jar:2.7.6:compile
      - Missing artifact org.springframework:spring-context:jar:3.1.0.RELEASE:compile
      - Missing artifact xml-apis:xml-apis:jar:1.0.b2:compile
      - Missing artifact dom4j:dom4j:jar:1.6.1:compile
      - Missing artifact javax.inject:javax.inject:jar:1:compile
  </code></pre>
  
  <p>I am just not able to understand that why am I getting this error?</p>
  
  <p>Could someone help me understand?</p>
  
  <p>Thanks.</p>