从源代码构建hibernate-orm会挂起

时间:2014-09-02 17:03:20

标签: hibernate gradle

我在构建hibernate-orm的新结帐时遇到了问题。基本上我是按照Contribute to Hibernate ORM的说明进行的。首先,我从github克隆当前的trunk:

git clone git@github.com:hibernate/hibernate-orm.git

之后我开始了gradle构建:

gradlew clean build

我的机器设置为:

  • Windows 7 64位
  • JDK 1.7.0_07

在执行模块hibernate-core的测试任务期间,构建过程会停止并永久挂起。其中一项测试也失败了,但这似乎是一个已知问题。我真正的问题是构建不会继续 - 即使在几个小时后也没有进展 - 构建过程就会挂起。我看到以下控制台输出:

Maven settings.xml file did not exist : C:\Users\dajudge\.m2\settings.xml
:documentation:clean
:hibernate-c3p0:clean
:hibernate-core:clean
:hibernate-ehcache:clean UP-TO-DATE
:hibernate-enhance-maven-plugin:clean UP-TO-DATE
:hibernate-entitymanager:clean UP-TO-DATE
:hibernate-envers:clean UP-TO-DATE
:hibernate-gradle-plugin:clean UP-TO-DATE
:hibernate-hikaricp:clean UP-TO-DATE
:hibernate-infinispan:clean UP-TO-DATE
:hibernate-jpamodelgen:clean UP-TO-DATE
:hibernate-osgi:clean UP-TO-DATE
:hibernate-proxool:clean UP-TO-DATE
:hibernate-testing:clean
:release:clean
:documentation:compileJava UP-TO-DATE
:documentation:processResources UP-TO-DATE
:documentation:classes UP-TO-DATE
:documentation:jar
:documentation:assemble
:documentation:compileTestJava UP-TO-DATE
:documentation:processTestResources UP-TO-DATE
:documentation:testClasses UP-TO-DATE
:documentation:test UP-TO-DATE
:documentation:check UP-TO-DATE
:documentation:build
:hibernate-c3p0:copyJavaApiSignature
:hibernate-c3p0:runSourceGenerators UP-TO-DATE
:hibernate-core:copyJavaApiSignature
:hibernate-core:generateGrammarSource
[ant:null] ANTLR Parser Generator   Version 2.7.7 (20060906)   1989-2005
[ant:null] ANTLR Parser Generator   Version 2.7.7 (20060906)   1989-2005
[ant:null] ANTLR Parser Generator   Version 2.7.7 (20060906)   1989-2005
[ant:null] ANTLR Parser Generator   Version 2.7.7 (20060906)   1989-2005
[ant:null] ANTLR Parser Generator   Version 2.7.7 (20060906)   1989-2005
[ant:null] ANTLR Parser Generator   Version 2.7.7 (20060906)   1989-2005
:hibernate-core:jaxb
:hibernate-core:runSourceGenerators
:hibernate-core:compileJava
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
:hibernate-core:processResources
:hibernate-core:classes
:hibernate-core:jar
:hibernate-c3p0:compileJava
:hibernate-c3p0:processResources
:hibernate-c3p0:classes
:hibernate-c3p0:jar
:hibernate-c3p0:assemble
:hibernate-c3p0:checkstyleMain
:hibernate-c3p0:findbugsMain
FindBugs rule violations were found. See the report at: file:///D:/git/github/hibernate-orm/hibernate-c3p0/target/reports/findbugs/main.xml
:hibernate-c3p0:runTestSourceGenerators UP-TO-DATE
:hibernate-testing:copyJavaApiSignature
:hibernate-testing:runSourceGenerators UP-TO-DATE
:hibernate-testing:compileJava
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
:hibernate-testing:processResources UP-TO-DATE
:hibernate-testing:classes
:hibernate-testing:jar
:hibernate-c3p0:compileTestJava
Note: D:\git\github\hibernate-orm\hibernate-c3p0\src\test\java\org\hibernate\test\c3p0\C3P0ConnectionProviderTest.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
:hibernate-c3p0:processTestResources
:hibernate-c3p0:testClasses
:hibernate-c3p0:findbugsTest
:hibernate-c3p0:test
:hibernate-c3p0:buildDashboard
:hibernate-c3p0:check
:hibernate-c3p0:build
:hibernate-core:assemble
:hibernate-core:checkstyleMain
Checkstyle rule violations were found. See the report at: file:///D:/git/github/hibernate-orm/hibernate-core/target/reports/checkstyle/main.xml
:hibernate-core:findbugsMain
FindBugs rule violations were found. See the report at: file:///D:/git/github/hibernate-orm/hibernate-core/target/reports/findbugs/main.xml
:hibernate-core:generateTestGrammarSource UP-TO-DATE
:hibernate-core:runTestSourceGenerators UP-TO-DATE
:hibernate-core:compileTestJava
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
:hibernate-core:processTestResources
:hibernate-core:testClasses
:hibernate-core:findbugsTest
FindBugs rule violations were found. See the report at: file:///D:/git/github/hibernate-orm/hibernate-core/target/reports/findbugs/test.xml
:hibernate-core:test

org.hibernate.test.fileimport.MultiLineImportFileTest > testImportFile FAILED
    org.junit.ComparisonFailure at MultiLineImportFileTest.java:83
> Building > :hibernate-core:test > 1929 tests completed, 1 failed, 81 skipped

此时构建过程永远挂起,我在任务监视器中看到3个java进程:

  • gradle进程本身
  • 另外2个java进程(可能是测试运行器?)

挖掘互联网并没有带来任何有用的东西,所以我转向了stackoverflow社区的问题:

有谁知道我在这里做错了什么?如何从源代码成功构建hibernate-orm?

提前感谢您的帮助!

1 个答案:

答案 0 :(得分:0)

感谢#hibernate-dev IRC频道的快速帮助,我能够解决问题。事实证明,这是目前hibernate-orm master的一个已知问题。使用以下构建命令跳过违规批次的测试可修复挂起问题:

gradlew build -Dhibernate.test.validatefailureexpected=false