【问题标题】:Buiding hibernate-orm from the source in GitHub从 GitHub 中的源代码构建 hibernate-orm
【发布时间】:2015-07-16 12:12:34
【问题描述】:

我正在尝试从 GitHub 中的源代码构建 hibernate-orm:https://github.com/hibernate/hibernate-orm

我遵循了 GitHub 站点中的“快速入门”指南:

git clone git://github.com/hibernate/hibernate-orm.git
cd hibernate-orm
./gradlew clean build
The build requires a Java 8 JDK as JAVA_HOME, but will ensure Java 6  compatibility.

但是,我收到以下错误:

FAILURE:构建失败并出现异常。

  • 地点:

构建文件'/Users/salee/git/hibernate-orm/build.gradle' 行:291

  • 出了什么问题:

配置项目 ':hibernate-c3p0' 时出现问题。

配置项目“:hibernate-core”时出现问题。

无法在空对象上获取属性“absolutePath”

有人可以帮我吗?

【问题讨论】:

    标签: java git hibernate orm gradle


    【解决方案1】:

    这听起来像是一个损坏的构建。在这种情况下,您最好的选择可能是在 Hibernate 的 GitHub 项目中提出问题并附上

    ./gradlew --stacktrace clean build
    

    或者,拉取最新代码并重试。构建似乎不太可能长时间中断,并且可能已经修复。

    【讨论】:

    • 感谢您的帮助。
    【解决方案2】:

    我已经解决了这个问题。是因为我的Mac环境,rt.jar是classes.jar:What is the use of rt.jar file in java? [duplicate]

    通过输入“./gradlew --stacktrace clean build”,我发现HibernateBuildPlugin.groovy的第156行出现了null错误。

    javaCompileTask.options.bootClasspath = java6Home.runtimeJar.absolutePath

    发现runtimeJar变成了null,修改该行为

    javaCompileTask.options.bootClasspath = "/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/classes.jar"

    那么,hibernate-orm的搭建就成功了。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-06-01
      • 2012-12-11
      • 2015-08-20
      • 2011-09-05
      • 2020-06-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多