Author: steve.ebersole(a)jboss.com
Date: 2010-06-23 23:59:36 -0400 (Wed, 23 Jun 2010)
New Revision: 19809
Added:
core/branches/gradle2/hibernate-entitymanager/src/intgTest/
Removed:
core/branches/gradle2/hibernate-entitymanager/.cvsignore
core/branches/gradle2/hibernate-entitymanager/build.xml
core/branches/gradle2/hibernate-entitymanager/pom.xml
core/branches/gradle2/hibernate-entitymanager/src/test/
Modified:
core/branches/gradle2/hibernate-entitymanager/hibernate-entitymanager.gradle
Log:
semi working entitymanager module (see note in .gradle)
Deleted: core/branches/gradle2/hibernate-entitymanager/.cvsignore
===================================================================
--- core/branches/gradle2/hibernate-entitymanager/.cvsignore 2010-06-24 03:45:23 UTC (rev
19808)
+++ core/branches/gradle2/hibernate-entitymanager/.cvsignore 2010-06-24 03:59:36 UTC (rev
19809)
@@ -1,4 +0,0 @@
-build.properties
-build
-target
-test_output
Deleted: core/branches/gradle2/hibernate-entitymanager/build.xml
===================================================================
--- core/branches/gradle2/hibernate-entitymanager/build.xml 2010-06-24 03:45:23 UTC (rev
19808)
+++ core/branches/gradle2/hibernate-entitymanager/build.xml 2010-06-24 03:59:36 UTC (rev
19809)
@@ -1,29 +0,0 @@
-<!-- $Id: build.xml 15105 2008-08-18 19:20:37Z hardy.ferentschik $ -->
-<!--
- Hibernate Entity Manager ANT build script.
--->
-
-<project name="HibernateEntityManager" basedir=".">
-
- <target name="generate-metamodel" depends="uptodate.check"
unless="metamodel.build.notRequired">
- <echo>Processing JPA annotations for metamodel generation</echo>
- <mkdir dir="${target.dir}"/>
- <javac srcdir="${src.dir}"
- destdir="${target.dir}"
- failonerror="false"
- fork="true"
- executable="${jdk16_home}/bin/javac"
- target="1.5"
- classpath="${classpath}">
- <compilerarg value="-proc:only"/>
- </javac>
- <touch file="${target.dir}/.staleflag"/>
- </target>
-
- <target name="uptodate.check">
- <uptodate property="metamodel.build.notRequired"
targetfile="${target.dir}/.staleflag">
- <srcfiles dir="${src.dir}" includes="**/*.java"/>
- </uptodate>
- </target>
-
-</project>
Modified: core/branches/gradle2/hibernate-entitymanager/hibernate-entitymanager.gradle
===================================================================
---
core/branches/gradle2/hibernate-entitymanager/hibernate-entitymanager.gradle 2010-06-24
03:45:23 UTC (rev 19808)
+++
core/branches/gradle2/hibernate-entitymanager/hibernate-entitymanager.gradle 2010-06-24
03:59:36 UTC (rev 19809)
@@ -1,67 +1,64 @@
+apply plugin: 'java'
+apply plugin: org.hibernate.gradle.util.IntegrationTestPlugin
+
+// todo : there are test failures due to issues with how 'bundles' are handled.
+// My guess is using TCCL as the tests try to is not valid in Gradle.
+
+buildscript {
+ repositories {
+ mavenRepo name: 'jboss-nexus', urls:
"https://repository.jboss.org/nexus/content/groups/public/"
+ mavenRepo urls: "file://" + System.getProperty('user.home') +
"/.m2/repository/"
+ }
+ dependencies {
+ classpath libraries.jpa_modelgen
+ }
+}
+
dependencies {
shrinkwrapVersion = '1.0.0-alpha-6'
- compile(
- project(':hibernate-core'),
- project(':hibernate-annotations'),
- [group: 'dom4j', name: 'dom4j', version: dom4jVersion],
- [group: 'org.hibernate', name:
'hibernate-commons-annotations', version: annotationsCommonsVersion],
- [group: 'org.hibernate.javax.persistence', name:
'hibernate-jpa-2.0-api', version: jpaVersion],
- [group: 'javax.transaction', name: 'jta', version:
jtaVersion],
- [group: 'javassist', name: 'javassist', version:
javassistVersion]
- )
- testCompile(
- project(':hibernate-testing'),
- [group: 'cglib', name: 'cglib', version: cglibVersion],
- [group: 'org.hibernate', name: 'hibernate-jpamodelgen',
version: '1.0.0.Final'],
- [group: 'org.jboss.shrinkwrap', name: 'shrinkwrap-api',
version: shrinkwrapVersion],
- [group: 'org.jboss.shrinkwrap', name: 'shrinkwrap-impl-base',
version: shrinkwrapVersion],
- [group: 'javax.validation', name: 'validation-api', version:
javaxValidationVersion],
- [group: 'org.slf4j', name: 'slf4j-api', version:
slf4jVersion]
- )
- testRuntime(
- [group: 'org.hibernate', name: 'hibernate-validator',
version: hibernateValidatorVersion]
- )
+ compile( project(':hibernate-core') )
+ compile( project(':hibernate-annotations') )
+ compile( libraries.dom4j )
+ compile( libraries.commons_annotations )
+ compile( libraries.jpa )
+ compile( libraries.jta )
+ compile( libraries.javassist )
+ intgTestCompile( project(':hibernate-core').sourceSets.intgTest.classes )
+ intgTestCompile( libraries.junit )
+ intgTestCompile( libraries.jpa_modelgen )
+ intgTestCompile( libraries.shrinkwrap_api )
+ intgTestCompile( libraries.shrinkwrap )
+ intgTestCompile( libraries.validation )
+ intgTestCompile( libraries.slf4j_api )
+ intgTestRuntime( libraries.validator )
}
-processTestResources.doLast(
- {
- copy {
- from(sourceSets.test.java.srcDirs) {
- include '**/*.properties'
- include '**/*.xml'
- }
- into sourceSets.test.classesDir
- }
- }
-)
+procTargetDirName = buildDirName + "/generated-src/jpamodelgen"
+procTargetDir = dir( procTargetDirName )
+compileIntgTestJava {
+ configure( options ) {
+ fork( executable: java6Home.getJavacExecutable() )
+ compilerArgs = [ "-s", "$procTargetDir.dir.absolutePath" ]
+ }
+}
+compileIntgTestJava.dependsOn procTargetDir
+sourceSets.intgTest.java.srcDir procTargetDirName
-procTargetDir = dir(buildDirName + "/generated-src/jpamodelgen")
-if (hasProperty('jdk16_home')) {
- task generateTestStaticMetamodelClasses(dependsOn: procTargetDir) << {
- ant.javac(
- srcdir: file('src/test/java'),
- destdir: procTargetDir.dir,
- failonerror: false,
- fork: true,
- executable: "$jdk16_home/bin/javac",
- target: '1.5'
- ) {
- compilerArg(value: "-proc:only")
- sourceSets.test.runtimeClasspath.addToAntBuilder(ant, 'classpath')
- }
-
- sourceSets.test.java.srcDir(procTargetDir.dir);
+bundlesTargetDirName = "$buildDirName/bundles"
+bundlesTargetDir = dir( bundlesTargetDirName )
+task processIntgTestBundles {
+ copy {
+ from 'src/intgTest/bundles'
+ into bundlesTargetDir.dir
}
-
- compileTestJava.dependsOn generateTestStaticMetamodelClasses
-} else {
- test.enabled = false
- compileTestJava.enabled = false
}
+processIntgTestBundles.dependsOn bundlesTargetDir
+processIntgTestResources.dependsOn processIntgTestBundles
+
ideaModule {
- testSourceDirs.add(file('target/generated-src/jpamodelgen'))
+ testSourceDirs.add( file( procTargetDirName ) )
}
Deleted: core/branches/gradle2/hibernate-entitymanager/pom.xml
===================================================================
--- core/branches/gradle2/hibernate-entitymanager/pom.xml 2010-06-24 03:45:23 UTC (rev
19808)
+++ core/branches/gradle2/hibernate-entitymanager/pom.xml 2010-06-24 03:59:36 UTC (rev
19809)
@@ -1,202 +0,0 @@
-<?xml version="1.0"?>
-<project
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-parent</artifactId>
- <version>3.6.0-SNAPSHOT</version>
- <relativePath>../parent/pom.xml</relativePath>
- </parent>
-
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-entitymanager</artifactId>
- <packaging>jar</packaging>
-
- <name>Hibernate Entity Manager</name>
- <description>Hibernate Entity Manager</description>
-
- <dependencies>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>hibernate-core</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>hibernate-annotations</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>cglib</groupId>
- <artifactId>cglib</artifactId>
- </dependency>
- <dependency>
- <groupId>javassist</groupId>
- <artifactId>javassist</artifactId>
- </dependency>
- <dependency>
- <groupId>org.hibernate.javax.persistence</groupId>
- <artifactId>hibernate-jpa-2.0-api</artifactId>
- </dependency>
- <dependency>
- <groupId>javax.validation</groupId>
- <artifactId>validation-api</artifactId>
- <optional>true</optional>
- </dependency>
- <dependency>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-validator</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>${groupId}</groupId>
- <artifactId>hibernate-testing</artifactId>
- <version>${version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.jboss.shrinkwrap</groupId>
- <artifactId>shrinkwrap-api</artifactId>
- <version>1.0.0-alpha-6</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.jboss.shrinkwrap</groupId>
- <artifactId>shrinkwrap-impl-base</artifactId>
- <version>1.0.0-alpha-6</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <!--
- Only really needed for the antrun plugin defined below (which in turn is
only really needed
- to work around a missing feature on the compile plugin; lovely no?).
However I have not
- found a way to declare this dependency local to the antrun plugin and
then reference it
- from the <javac />'s <classpath /> :(
- -->
- <groupId>${project.groupId}</groupId>
- <artifactId>hibernate-jpamodelgen</artifactId>
- <version>1.0.0.Final</version>
- <scope>test</scope>
- <exclusions>
- <exclusion>
- <!-- Use the jpa-api defined here, crossing fingers they match up
signature-wise -->
- <groupId>org.hibernate.javax.persistence</groupId>
- <artifactId>hibernate-jpa-2.0-api</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- </dependencies>
-
- <build>
- <testResources>
- <testResource>
- <filtering>true</filtering>
- <directory>src/test/resources</directory>
- </testResource>
- <testResource>
- <filtering>true</filtering>
- <directory>src/test/bundles</directory>
- <targetPath>../bundles</targetPath>
- </testResource>
- </testResources>
- <plugins>
- <plugin>
- <groupId>org.jboss.maven.plugins</groupId>
- <artifactId>maven-injection-plugin</artifactId>
- <configuration>
- <bytecodeInjections>
- <bytecodeInjection>
- <expression>${pom.version}</expression>
- <targetMembers>
- <methodBodyReturn>
-
<className>org.hibernate.ejb.Version</className>
-
<methodName>getVersionString</methodName>
- </methodBodyReturn>
- </targetMembers>
- </bytecodeInjection>
- </bytecodeInjections>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-antrun-plugin</artifactId>
- <!-- Define one configuration outside executions and without a phase
in order to allow 'mvn antrun:run' -->
- <configuration>
- <tasks>
- <property name="target.dir"
value="${project.build.directory}/generated-src/jpamodelgen" />
- <property name="src.dir"
value="${project.build.testSourceDirectory}" />
- <property name="jdk16_home"
value="${jdk16_home}" />
- <property name="classpath"
refid="maven.test.classpath" />
- <ant antfile="${basedir}/build.xml">
- <target name="generate-metamodel" />
- </ant>
- </tasks>
- </configuration>
- <executions>
- <execution>
- <id>process_annotations</id>
- <phase>process-test-sources</phase>
- <configuration>
- <!-- No additional configuration needed. Unbound
configuration gets inherited. (Feels wrong, but that's how it is) -->
-
<testSourceRoot>${project.build.directory}/generated-src/jpamodelgen</testSourceRoot>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.5</source>
- <target>1.5</target>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <excludes>
- <exclude>**/*TestCase.java</exclude>
- </excludes>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
- <profiles>
- <profile>
- <id>doc</id>
- <build>
- <plugins>
- <plugin>
- <groupId>org.jboss.maven.plugins</groupId>
- <artifactId>maven-jdocbook-plugin</artifactId>
- <configuration>
-
<sourceDocumentName>master.xml</sourceDocumentName>
-
<sourceDirectory>${basedir}/src/main/docbook</sourceDirectory>
- <masterTranslation>en</masterTranslation>
- <imageResource>
-
<directory>${basedir}/src/main/docbook/en/images</directory>
- </imageResource>
- </configuration>
- <executions>
- <execution>
- <id>make-doc</id>
- <phase>package</phase>
- <goals>
- <goal>resources</goal>
- <goal>generate</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
- </profiles>
-</project>
Copied: core/branches/gradle2/hibernate-entitymanager/src/intgTest (from rev 19681,
core/branches/gradle2/hibernate-entitymanager/src/test)