diff --git a/build.gradle b/build.gradle index b50d79801c..18be140f06 100644 --- a/build.gradle +++ b/build.gradle @@ -70,7 +70,7 @@ libraries = [ // testing junit: 'junit:junit:3.8.2', testng: 'org.testng:testng:5.8:jdk15', - jpa_modelgen: 'org.hibernate:hibernate-jpamodelgen:1.1.0.CR1', + jpa_modelgen: 'org.hibernate:hibernate-jpamodelgen:1.1.0.Final', shrinkwrap_api: 'org.jboss.shrinkwrap:shrinkwrap-api:1.0.0-alpha-6', shrinkwrap: 'org.jboss.shrinkwrap:shrinkwrap-impl-base:1.0.0-alpha-6' ] diff --git a/hibernate-entitymanager/hibernate-entitymanager.gradle b/hibernate-entitymanager/hibernate-entitymanager.gradle index 44c7f57ce4..b9fb474d99 100644 --- a/hibernate-entitymanager/hibernate-entitymanager.gradle +++ b/hibernate-entitymanager/hibernate-entitymanager.gradle @@ -21,6 +21,15 @@ dependencies { testRuntime( libraries.validator ) } +procTargetDirName = buildDirName + "/generated-src/jpamodelgen" +procTargetDir = dir( procTargetDirName ) +compileTestJava { + configure( options ) { + compilerArgs = [ "-s", "$procTargetDir.dir.absolutePath" ] + } +} +compileTestJava.dependsOn procTargetDir + bundlesTargetDirName = "$buildDirName/bundles" bundlesTargetDir = dir( bundlesTargetDirName ) task copyBundleResources (type: Copy) { @@ -40,6 +49,11 @@ copyBundleResources.dependsOn bundlesTargetDir // make sure that the bundles for the packaged test (PackagingTestCase) are copied as well processTestResources.dependsOn copyBundleResources +ideaModule { + testSourceDirs.add( file( procTargetDirName ) ) +} + +