【问题标题】:antrl-hibernate maven dependency not found未找到 antlr-hibernate maven 依赖项
【发布时间】:2012-06-28 12:16:02
【问题描述】:

我尝试将休眠依赖项添加到我的 POM 文件中,但我遇到了 antlr 版本 2.7.7 的问题。

我把它放在我的 pom 文件中:

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

我得到的错误是

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

我尝试使用排除它

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

,但我明白了

java.lang.NoClassDefFoundError:LEntityManager

【问题讨论】:

    标签: hibernate maven antlr


    【解决方案1】:

    嗯...这很奇怪。再试一次,但将 -U 开关添加到 Maven 命令。它应该有所帮助,但我仍然看不出这个奇怪消息的原因。刚刚出现在 Maven Central 中的工件可能会发生这种情况,您必须等待几个小时,因为这是您的本地缓存过期时间,但这个 antlr 版本是 2007 年的!

    【讨论】:

    • 我正在使用 Eclipse,我可以从那里更新依赖项。我应该怎么做才能添加 -U 选项
    • 你应该在你的启动配置中检查Update Snapshots
    猜你喜欢
    • 2017-09-18
    • 1970-01-01
    • 2017-06-03
    • 1970-01-01
    • 2020-09-21
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多