HHH-7184 - Envers revision entity JPA2 metadata
This commit is contained in:
parent
71db4095c6
commit
ecd8ad5446
|
@ -27,9 +27,34 @@ sourceSets {
|
||||||
srcDir 'src/matrix/java'
|
srcDir 'src/matrix/java'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
main {
|
||||||
|
generatedJpaMetamodelSrcDir = file( "${buildDir}/generated-src/jpamodelgen/${name}" )
|
||||||
|
java {
|
||||||
|
srcDir generatedJpaMetamodelSrcDir
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
compileMatrixJava.options.define(compilerArgs: ["-proc:none", "-encoding", "UTF-8"])
|
compileMatrixJava.options.define(compilerArgs: ["-proc:none", "-encoding", "UTF-8"])
|
||||||
|
|
||||||
|
// Generate JPA2 static metamodel for default revision entities
|
||||||
|
task generateJpaMetamodelClasses(type: Compile) {
|
||||||
|
classpath = compileJava.classpath + configurations.hibernateJpaModelGenTool
|
||||||
|
source = sourceSets.main.originalJavaSrcDirs
|
||||||
|
destinationDir = file( buildDirName + "/tmp/apt" )
|
||||||
|
options.define(
|
||||||
|
compilerArgs: [
|
||||||
|
"-proc:only",
|
||||||
|
"-processor", "org.hibernate.jpamodelgen.JPAMetaModelEntityProcessor",
|
||||||
|
"-s", "$sourceSets.main.generatedJpaMetamodelSrcDir.absolutePath"
|
||||||
|
]
|
||||||
|
);
|
||||||
|
outputs.dir sourceSets.main.generatedJpaMetamodelSrcDir;
|
||||||
|
doFirst {
|
||||||
|
sourceSets.main.generatedJpaMetamodelSrcDir.mkdirs()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
compileJava.dependsOn generateJpaMetamodelClasses
|
||||||
|
|
||||||
idea {
|
idea {
|
||||||
module {
|
module {
|
||||||
testSourceDirs += file( 'src/matrix/java')
|
testSourceDirs += file( 'src/matrix/java')
|
||||||
|
|
Loading…
Reference in New Issue