From c0352429db5b02f8177d881b2b8074110706d579 Mon Sep 17 00:00:00 2001 From: Hardy Ferentschik Date: Thu, 4 Nov 2010 10:37:10 +0100 Subject: [PATCH] HHH-5714 Upgraded metamodelgen dependency The new version allows now also to use the -s option for generating the sources into a seprate directory. --- build.gradle | 2 +- .../hibernate-entitymanager.gradle | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) 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 ) ) +} + +