Oscar Castiblanco
Oscar Castiblanco

Reputation: 1646

antrl-hibernate maven dependency not found

I try to add hibernate dependency to my POM file, but I have problems with antlr version 2.7.7.

I put this in my pom file:

<dependency>
    <groupId>org.hibernate</groupId>
    <artifactId>hibernate-entitymanager</artifactId>
    <version>4.1.4.Final</version>
</dependency>

The error I get is

ArtifactTransferException: Failure to transfer antlr:antlr:jar:2.7.7 from http://repo1.maven.org/maven2 was cached in the local repository

I try to exclude it by using

<exclusions>
  <exclusion>
     <groupId>antlr</groupId>
     <artifactId>antlr</artifactId>
  </exclusion>
</exclusions>

, but I get

java.lang.NoClassDefFoundError:LEntityManager

Upvotes: 1

Views: 794

Answers (1)

Michał Kalinowski
Michał Kalinowski

Reputation: 17983

Hmm... it's pretty weird. Try once more but add -U switch to Maven command. It should help, but I still don't see a reason for this weird message. That could happen for artifacts that just appeared in Maven Central and you have to wait few hours since that's your local cache expiration time, but this antlr version is from 2007!

Upvotes: 1

Related Questions