[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-5693) Re-enable entitymanager tests

Hardy Ferentschik (JIRA) noreply at atlassian.com
Mon Nov 1 12:47:48 EDT 2010


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-5693?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=38959#action_38959 ] 

Hardy Ferentschik commented on HHH-5693:
----------------------------------------

When using the "two compilations" trick:
{code}
procTargetDirName = buildDirName + "/generated-src/jpamodelgen"
procTargetDir = dir( procTargetDirName )

// in theory it metamodel generation and compilation should be possible in a single compilation,
// but this fails on Mac. Hence, to separate compilations. One to generate the meta model classes
// and one to compile everything
task generateMetaModel(type: Compile) {
    classpath = compileTestJava.classpath
    source = compileTestJava.source
    destinationDir = compileTestJava.destinationDir
    configure( options ) {
        compilerArgs = ["-proc:only", "-s", "$procTargetDir.dir.absolutePath"]
    }
}
generateMetaModel.dependsOn procTargetDir

compileTestJava {
    configure( options ) {
        compilerArgs = [ "-proc:none", "-s", "$procTargetDir.dir.absolutePath" ]
    }
    source += files(procTargetDir.dir)
}
compileTestJava.dependsOn generateMetaModel
{code}
the {{package-info.class}} are using the named query information contained in them. I am unable to determine why. For this reason I am reverting back to a single compilation approach, but without the _-s_ option. This means that the generated meta model classes are generated in _target/classes/test_, but since these are only test classes it is acceptable.
As a nice side effect the entitymanager build file becomes much simpler, because it relies on more defaults.

> Re-enable entitymanager tests
> -----------------------------
>
>                 Key: HHH-5693
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5693
>             Project: Hibernate Core
>          Issue Type: Bug
>          Components: build
>    Affects Versions: 3.6.0
>            Reporter: Hardy Ferentschik
>            Assignee: Hardy Ferentschik
>             Fix For: 4.0.0.Alpha1
>
>
> entitymanager tests were disabled during the move to gradle. The build and tests need to be updated.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list