diff --git a/build.gradle b/build.gradle index abea8e632c..0774db1ace 100644 --- a/build.gradle +++ b/build.gradle @@ -22,6 +22,7 @@ buildscript { } dependencies { classpath 'org.hibernate.build.gradle:gradle-maven-publish-auth:2.0.1' + classpath 'org.hibernate.build.gradle:hibernate-matrix-testing:1.0.0-SNAPSHOT' } } diff --git a/buildSrc/Readme.md b/buildSrc/Readme.md deleted file mode 100644 index bd1047fd1b..0000000000 --- a/buildSrc/Readme.md +++ /dev/null @@ -1,184 +0,0 @@ -##Hibernate Matrix Testing - -### Goal - -The idea of matrix testing is to allow testing in a varied set of configurations. Specifically for Hibernate, this -correlates to running the same set of tests against against multiple databases. This goal is achieved through -2 Gradle plugins. - -Note that the second plugin (org.hibernate.build.gradle.testing.matrix.MatrixTestingPlugin) applies the first -one (org.hibernate.build.gradle.testing.database.DatabaseProfilePlugin) automatically, so generally scripts would -not even reference it. The reason for the split is historical and these 2 may get merged later... - - -### org.hibernate.build.gradle.testing.database.DatabaseProfilePlugin - -This plugin is responsible for determining which databases are available for testing in the given environment. It -does this by performing a directory search. Well actually it can perform up to 2 directory searches: - -* The standard profile directory is named _databases_ at the base directory of the root project -* A custom profile directory, which can be named by setting a system property named _hibernate-matrix-databases_ - -These directories are searched recursively. We leverage this in Hibernate to allow the standard _databases_ directory -to hold local profiles too. That is achieved by a _.gitignore_ which says to ignore any directory named -_local_ under the directory _databases_. So one option to provide custom profiles is to drop them in there. That -has the benefit of not having to specify _hibernate-matrix-databases_ -Within these directories, the plugin looks for sub-directories which either: - -* contain a file named _matrix.gradle_. _matrix.gradle_ is a limited DSL Gradle file which currently understands - just a specialized org.gradle.api.artifacts.Configuration reference named _jdbcDependency_. All that is a fancy - way to say that _matrix.gradle_ allows you to specify some dependencies this database profile needs (JDBC drivers, - etc). Any dependency artifacts named here get resolved using whatever resolvers (Maven, etc) are associated with - the build. For example - - jdbcDependency { - "mysql:mysql-connector-java:5.1.17" - } -* contain a directory named _jdbc_ which is assumed to hold jar file(s) needed for the profile. - -Such directories become the basis of a database profile made available to the build. The name of the profile -(which becomes important when we discuss the next plugin) is taken from the directory name. Database profiles can -also contain a _resources_ directory. - -An example layout using _matrix.gradle_ might be - - ├── mysql50 - │ ├── jdbc - │ │ └── mysql-connector-java-5.1.9.jar - │ └── resources - │ └── hibernate.properties - -Or - - ├── mysql50 - │ ├── matrix.gradle - │ └── resources - │ └── hibernate.properties - - -Either would result in a database profile named _mysql50_ - -Profiles can be ignored using the *hibernate-matrix-ignore* setting which accepts either - -* a comma-separated list of the database profile names to be skipped -* the magic value **all** which indicates to ignore all profiles - - -### org.hibernate.build.gradle.testing.matrix.MatrixTestingPlugin - -The MatrixTestingPlugin essentially generates a bunch of Gradle tasks dynamically and adds them to your build. It does -this based on all the database profiles found. Running `gradle tasks --all` will list all tasks available to the build -including these generated ones. - -For each database profile the plugin will generate a task named *matrix_{profile}* that executes the tests against -that particular database profile. It also generates a task named *matrix* that groups together all the -profile-specific tasks so that running `gradle matrix` will run all the profiles. - -*see section below discussing SourceSet separation* - - -### Database Allocator (JBoss internally, VPN required) - -For developers on the Red Hat VPN, one option is to use the databases in the JBoss QA lab for testing. Note that -this tends to result in **very** slow builds but the obvious trade off is not having to install and manage these -databases locally. - -The JBoss QA team developed a servlet to allow management of "database allocations" including requesting an -allocation be set up. The MatrixTestingPlugin is able to play with that feature allowing you to ask the build -to allocate the database for you. This feature is disabled by default, to enable it, you need this system property -named _hibernate-matrix-dballcoation_ which accepts either - -* a comma-separate list of profile names -* the magic value **all** which indicates to allocate for all **supported** databases (see - org.hibernate.build.qalab.DatabaseAllocator.SUPPORTED_DB_NAMES for details) - -For example, if you want to run matrix test on PostgreSQL 8.4, knowing that the database name for that is -_postgresql84_, you can use this command: - - gradle matrix_postgresql84 -Dhibernate-matrix-dballocation=postgresql84 - -which would - -1. talk to the database allocator service and make a database instance available -2. use the information returned from the allocator service to properly set up the connection information - Hibernate would need to connect to that instance. -3. run the tests against the postgresql84 profile - -For some databases we need adjust the connection url with some options after get it from the database allocator. In -these cases we can use the system property _hibernate-matrix-dballocation-url-postfix-${dbname}_. For example - `-Dhibernate-matrix-dballocation-url-postfix-sybase155="?SQLINITSTRING=set quoted_identifier on&DYNAMIC_PREPARE=true"` - -A useful parameter to the allocator service when allocating a database is the _requester_ which is basically just a -string meant to identify who is making the request. By default the Hibernate build uses _hibernate_. But you can -specify an alternate requester using the system property _hibernate-matrix-dballocation-requestee_ - - -### Testing SourceSets - -If you are not familiar with Gradle's notion of -[SourceSet](http://gradle.org/current/docs/javadoc/org/gradle/api/tasks/SourceSet.html), you should be :) - -The Hibernate build defines 2 different testing related SourceSets in a number of modules (currently hibernate-core, -hibernate-entitymanager and hibernate-envers): - -* _test_ - tests that **should not** be run against the profiles from the MatrixTestingPlugin -* _matrix_ - tests that **should** be run against the profiles from the MatrixTestingPlugin - -Tests in _test_ include unit tests as well as a few functional tests which use a database but where the particular -database should not at all affect the outcome. Tests in _matrix_ are functional tests where the outcome of the tests -are highly dependent on the database being used (how pessimistic locks are acquired, etc). - -As always, Wikipedia is a great source of information - -* [Functional Testing](http://en.wikipedia.org/wiki/Functional_testing) -* [Unit Testing](http://en.wikipedia.org/wiki/Unit_testing) - -hibernate-core directory layout (for discussion): - - hibernate-core - ├── hibernate-core.gradle - ├── src - ├── main - │ ├── antlr - │ ├── java - │ ├── javadoc - │ ├── resources - │ └── xjb - ├── matrix - │ └── java - └── test - ├── java - └── resources - -The directories of interest include - -* matrix/java - - all functional tests go into this directory - -* test/java - - all unit tests go into this directory - -* test/resources - - all resources for **functional tests and unit tests**. Yes, resource files in this directory are shared for both, so you don't need to copy one file to both place, for example, log4j.properties. - -To make _idea plugin_ (similar entries for _eclipse plugin_) works, we also have this defined in hibernate-core.gradle: - - sourceSets { - matrix { - java { - srcDir 'src/matrix/java' - } - resources { - srcDir 'src/matrix/resources' - } - } - } - - ideaModule { - sourceDirs += file( '$buildDir/generated-src/antlr/main' ) - testSourceDirs += file( 'src/matrix/java') - testSourceDirs += file( 'src/matrix/resources') - } diff --git a/buildSrc/src/main/groovy/org/hibernate/build/gradle/testing/database/AbstractDatabaseProfileImpl.java b/buildSrc/src/main/groovy/org/hibernate/build/gradle/testing/database/AbstractDatabaseProfileImpl.java deleted file mode 100644 index fddaf9d7f7..0000000000 --- a/buildSrc/src/main/groovy/org/hibernate/build/gradle/testing/database/AbstractDatabaseProfileImpl.java +++ /dev/null @@ -1,126 +0,0 @@ -/* - * Hibernate, Relational Persistence for Idiomatic Java - * - * Copyright (c) 2012, Red Hat Inc. or third-party contributors as - * indicated by the @author tags or express copyright attribution - * statements applied by the authors. All third-party contributions are - * distributed under license by Red Hat Inc. - * - * This copyrighted material is made available to anyone wishing to use, modify, - * copy, or redistribute it subject to the terms and conditions of the GNU - * Lesser General Public License, as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License - * for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this distribution; if not, write to: - * Free Software Foundation, Inc. - * 51 Franklin Street, Fifth Floor - * Boston, MA 02110-1301 USA - */ -package org.hibernate.build.gradle.testing.database; - -import java.io.File; -import java.io.FileInputStream; -import java.io.IOException; -import java.util.HashMap; -import java.util.Map; -import java.util.Properties; - -import org.gradle.api.Project; -import org.gradle.api.artifacts.Configuration; -import org.gradle.api.logging.Logging; -import org.slf4j.Logger; - -import org.hibernate.build.qalab.DatabaseAllocation; -import org.hibernate.build.qalab.DatabaseAllocator; - -/** - * Basic support for {@link DatabaseProfile} implementations - * - * @author Steve Ebersole - * @author Strong Liu - */ -public abstract class AbstractDatabaseProfileImpl implements DatabaseProfile { - private static final Logger log = Logging.getLogger( AbstractDatabaseProfileImpl.class ); - - private final String name; - private final File profileDirectory; - private final Project project; - private final Map hibernateProperties; - private final DatabaseAllocation databaseAllocation; - - @SuppressWarnings( {"unchecked"}) - protected AbstractDatabaseProfileImpl(File profileDirectory, Project project) { - this.profileDirectory = profileDirectory; - this.name = profileDirectory.getName(); - this.project = project; - - this.hibernateProperties = new HashMap(); - final File hibernatePropertiesFile = new File( - new File( profileDirectory, "resources" ), - "hibernate.properties" - ); - if ( hibernatePropertiesFile.exists() ) { - Properties props = new Properties(); - try { - FileInputStream stream = new FileInputStream( hibernatePropertiesFile ); - try { - props.load( stream ); - } - finally { - try { - stream.close(); - } - catch (IOException ignore) { - } - } - } - catch (IOException e) { - log.warn( "Unable to read Hibernate properties for database profile [" + name + "]", e ); - } - for ( String propName : props.stringPropertyNames() ) { - hibernateProperties.put( propName, props.getProperty( propName ) ); - } - } - - this.databaseAllocation = DatabaseAllocator.locate( project ).getAllocation( this ); - } - - @Override - public String getName() { - return name; - } - - @Override - public File getDirectory() { - return profileDirectory; - } - - @Override - public Map getHibernateProperties() { - return hibernateProperties; - } - - @Override - public DatabaseAllocation getDatabaseAllocation() { - return databaseAllocation; - } - - protected Configuration prepareConfiguration(String name) { - Configuration configuration = getOrCreateConfiguration( name ); - configuration.setDescription( "The JDBC dependency configuration for the [" + name + "] profile" ); - return configuration; - } - - protected Configuration getOrCreateConfiguration(String name) { - Configuration configuration = project.getConfigurations().findByName( name ); - if ( configuration == null ) { - configuration = project.getConfigurations().create( name ); - } - return configuration; - } -} diff --git a/buildSrc/src/main/groovy/org/hibernate/build/gradle/testing/database/DatabaseAllocationCleanUp.java b/buildSrc/src/main/groovy/org/hibernate/build/gradle/testing/database/DatabaseAllocationCleanUp.java deleted file mode 100644 index 98b03e2cb0..0000000000 --- a/buildSrc/src/main/groovy/org/hibernate/build/gradle/testing/database/DatabaseAllocationCleanUp.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Hibernate, Relational Persistence for Idiomatic Java - * - * Copyright (c) 2012, Red Hat Inc. or third-party contributors as - * indicated by the @author tags or express copyright attribution - * statements applied by the authors. All third-party contributions are - * distributed under license by Red Hat Inc. - * - * This copyrighted material is made available to anyone wishing to use, modify, - * copy, or redistribute it subject to the terms and conditions of the GNU - * Lesser General Public License, as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License - * for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this distribution; if not, write to: - * Free Software Foundation, Inc. - * 51 Franklin Street, Fifth Floor - * Boston, MA 02110-1301 USA - */ -package org.hibernate.build.gradle.testing.database; - -import java.util.HashSet; -import java.util.Set; - -import org.gradle.BuildAdapter; -import org.gradle.BuildResult; - -import org.hibernate.build.qalab.DatabaseAllocation; - -/** - * A Gradle {@link org.gradle.BuildListener} used to release all databases allocated when the build is finished. - * - * @author Steve Ebersole - */ -public class DatabaseAllocationCleanUp extends BuildAdapter { - private Set databaseAllocations = new HashSet(); - - public void addDatabaseAllocation(DatabaseAllocation databaseAllocation) { - databaseAllocations.add( databaseAllocation ); - } - - @Override - public void buildFinished(BuildResult result) { - super.buildFinished( result ); - for ( DatabaseAllocation databaseAllocation : databaseAllocations ) { - databaseAllocation.release(); - } - } -} diff --git a/buildSrc/src/main/groovy/org/hibernate/build/gradle/testing/database/DatabaseProfile.java b/buildSrc/src/main/groovy/org/hibernate/build/gradle/testing/database/DatabaseProfile.java deleted file mode 100644 index 938ef5c6b7..0000000000 --- a/buildSrc/src/main/groovy/org/hibernate/build/gradle/testing/database/DatabaseProfile.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Hibernate, Relational Persistence for Idiomatic Java - * - * Copyright (c) 2012, Red Hat Inc. or third-party contributors as - * indicated by the @author tags or express copyright attribution - * statements applied by the authors. All third-party contributions are - * distributed under license by Red Hat Inc. - * - * This copyrighted material is made available to anyone wishing to use, modify, - * copy, or redistribute it subject to the terms and conditions of the GNU - * Lesser General Public License, as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License - * for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this distribution; if not, write to: - * Free Software Foundation, Inc. - * 51 Franklin Street, Fifth Floor - * Boston, MA 02110-1301 USA - */ -package org.hibernate.build.gradle.testing.database; - -import java.io.File; -import java.util.Map; - -import org.gradle.api.artifacts.Configuration; - -import org.hibernate.build.qalab.DatabaseAllocation; - -/** - * Contract for database "profiles". - * - * @author Steve Ebersole - * @author Strong Liu - */ -public interface DatabaseProfile { - public String getName(); - public File getDirectory(); - public Map getHibernateProperties(); - public Configuration getTestingRuntimeConfiguration(); - public DatabaseAllocation getDatabaseAllocation(); -} diff --git a/buildSrc/src/main/groovy/org/hibernate/build/gradle/testing/database/DatabaseProfilePlugin.java b/buildSrc/src/main/groovy/org/hibernate/build/gradle/testing/database/DatabaseProfilePlugin.java deleted file mode 100644 index aff27982ff..0000000000 --- a/buildSrc/src/main/groovy/org/hibernate/build/gradle/testing/database/DatabaseProfilePlugin.java +++ /dev/null @@ -1,169 +0,0 @@ -/* - * Hibernate, Relational Persistence for Idiomatic Java - * - * Copyright (c) 2011, Red Hat Inc. or third-party contributors as - * indicated by the @author tags or express copyright attribution - * statements applied by the authors. All third-party contributions are - * distributed under license by Red Hat Inc. - * - * This copyrighted material is made available to anyone wishing to use, modify, - * copy, or redistribute it subject to the terms and conditions of the GNU - * Lesser General Public License, as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License - * for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this distribution; if not, write to: - * Free Software Foundation, Inc. - * 51 Franklin Street, Fifth Floor - * Boston, MA 02110-1301 USA - */ - -package org.hibernate.build.gradle.testing.database; - -import java.io.File; -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.gradle.api.Plugin; -import org.gradle.api.Project; -import org.gradle.api.logging.Logger; -import org.gradle.api.logging.Logging; - -/** - * Plugin used to apply notion of database profiles, which are consumed by the matrix testing plugin. - * - * @author Steve Ebersole - * @author Strong Liu - */ -public class DatabaseProfilePlugin implements Plugin { - /** - * The directory containing standard database profiles. - */ - public static final String STANDARD_DATABASES_DIRECTORY = "databases"; - /** - * Names a system setting key that can be set to point to a directory containing additional, custom - * database profiles. - */ - public static final String CUSTOM_DATABASES_DIRECTORY_KEY = "hibernate-matrix-databases"; - public static final String HIBERNATE_MATRIX_IGNORE = "hibernate-matrix-ignore"; - - private static final String MATRIX_BUILD_FILE = "matrix.gradle"; - private static final String JDBC_DIR = "jdbc"; - - private static final Logger log = Logging.getLogger( DatabaseProfilePlugin.class ); - - private Project project; - private List profiles; - - public void apply(Project project) { - this.project = project; - - final LinkedHashMap profileMap = new LinkedHashMap(); - processStandardProfiles( profileMap ); - processCustomProfiles( profileMap ); - this.profiles = new ArrayList(); - - DatabaseAllocationCleanUp listener = new DatabaseAllocationCleanUp(); - project.getGradle().addBuildListener( listener ); - for ( DatabaseProfile profile : profileMap.values() ) { - this.profiles.add( profile ); - listener.addDatabaseAllocation( profile.getDatabaseAllocation() ); - } - } - - private void processStandardProfiles(Map profileMap) { - final File standardDatabasesDirectory = project.file( STANDARD_DATABASES_DIRECTORY ); - if ( standardDatabasesDirectory == null || ! standardDatabasesDirectory.exists() ) { - log.debug( "Standard databases directory [{}] did not exist", STANDARD_DATABASES_DIRECTORY ); - return; - } - - if ( ! standardDatabasesDirectory.isDirectory() ) { - log.warn( "Located standard databases directory [{}] was not a directory", STANDARD_DATABASES_DIRECTORY ); - return; - } - - processProfiles( standardDatabasesDirectory, profileMap ); - } - - private void processProfiles(File directory, Map profileMap) { - // the directory itself is a "database directory" if it contains either: - // 1) a file named 'matrix.gradle' - // 2) a directory named 'jdbc' - DatabaseProfile databaseProfile = null; - final File matrixDotGradleFile = new File( directory, MATRIX_BUILD_FILE ); - if ( matrixDotGradleFile.exists() && matrixDotGradleFile.isFile() ) { - log.debug( "Found matrix.gradle file : " + matrixDotGradleFile ); - databaseProfile = new MatrixDotGradleProfile( matrixDotGradleFile, project ); - } - final File jdbcDirectory = new File( directory, JDBC_DIR ); - if ( jdbcDirectory.exists() && jdbcDirectory.isDirectory() ) { - databaseProfile = new JdbcDirectoryProfile( jdbcDirectory, project ); - } - - if ( databaseProfile == null ) { - // we determined this directory is not a database directory, check its sub-directories - for ( File subDirectory : directory.listFiles() ) { - if ( subDirectory.isDirectory() ) { - processProfiles( subDirectory, profileMap ); - } - } - return; // EARLY EXIT!!! - } - - final String profileName = databaseProfile.getName(); - if ( ignored().contains( profileName ) ) { - log.debug( "Skipping ignored database profile [{}]", profileName ); - return; - } - - DatabaseProfile previousEntry = profileMap.put( profileName, databaseProfile ); - if ( previousEntry != null ) { - log.lifecycle( - "Found duplicate profile definitions [name={}], [{}] taking precedence over [{}]", - profileName, - databaseProfile.getDirectory().getAbsolutePath(), - previousEntry.getDirectory().getAbsolutePath() - ); - } - } - - private Set ignored; - - private Set ignored() { - if ( ignored == null ) { - final String values = System.getProperty( HIBERNATE_MATRIX_IGNORE ); - if ( values == null || values.length() == 0 ) { - ignored = Collections.emptySet(); - } - else { - ignored = new HashSet(); - Collections.addAll( ignored, values.split( "," ) ); - } - } - return ignored; - } - - private void processCustomProfiles(Map profileMap) { - final String customDatabaseDirectoryPath = System.getProperty( CUSTOM_DATABASES_DIRECTORY_KEY ); - if ( customDatabaseDirectoryPath != null && customDatabaseDirectoryPath.length() > 0 ) { - final File customDatabaseDirectory = new File( customDatabaseDirectoryPath ); - if ( customDatabaseDirectory.exists() && customDatabaseDirectory.isDirectory() ) { - processProfiles( customDatabaseDirectory, profileMap ); - } - } - } - - public Iterable getDatabaseProfiles() { - return profiles; - } -} diff --git a/buildSrc/src/main/groovy/org/hibernate/build/gradle/testing/database/DuplicateDatabaseProfileException.java b/buildSrc/src/main/groovy/org/hibernate/build/gradle/testing/database/DuplicateDatabaseProfileException.java deleted file mode 100644 index b0f1648e2f..0000000000 --- a/buildSrc/src/main/groovy/org/hibernate/build/gradle/testing/database/DuplicateDatabaseProfileException.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Hibernate, Relational Persistence for Idiomatic Java - * - * Copyright (c) 2011, Red Hat Inc. or third-party contributors as - * indicated by the @author tags or express copyright attribution - * statements applied by the authors. All third-party contributions are - * distributed under license by Red Hat Inc. - * - * This copyrighted material is made available to anyone wishing to use, modify, - * copy, or redistribute it subject to the terms and conditions of the GNU - * Lesser General Public License, as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License - * for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this distribution; if not, write to: - * Free Software Foundation, Inc. - * 51 Franklin Street, Fifth Floor - * Boston, MA 02110-1301 USA - */ - -package org.hibernate.build.gradle.testing.database; - -import org.hibernate.build.gradle.util.BuildException; - -/** - * Indicates that we found multiple database profiles having the same name. - * - * @author Strong Liu - * @author Steve Ebersole - */ -public class DuplicateDatabaseProfileException extends BuildException { - public DuplicateDatabaseProfileException(String message) { - super( message ); - } -} diff --git a/buildSrc/src/main/groovy/org/hibernate/build/gradle/testing/database/JdbcDirectoryProfile.groovy b/buildSrc/src/main/groovy/org/hibernate/build/gradle/testing/database/JdbcDirectoryProfile.groovy deleted file mode 100644 index 69b984dfaa..0000000000 --- a/buildSrc/src/main/groovy/org/hibernate/build/gradle/testing/database/JdbcDirectoryProfile.groovy +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Hibernate, Relational Persistence for Idiomatic Java - * - * Copyright (c) 2012, Red Hat Inc. or third-party contributors as - * indicated by the @author tags or express copyright attribution - * statements applied by the authors. All third-party contributions are - * distributed under license by Red Hat Inc. - * - * This copyrighted material is made available to anyone wishing to use, modify, - * copy, or redistribute it subject to the terms and conditions of the GNU - * Lesser General Public License, as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License - * for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this distribution; if not, write to: - * Free Software Foundation, Inc. - * 51 Franklin Street, Fifth Floor - * Boston, MA 02110-1301 USA - */ -package org.hibernate.build.gradle.testing.database; - - -import org.gradle.api.Project; -import org.gradle.api.artifacts.Configuration; -/** - * Database profile as defined by a directory named {@code jdbc} containing JDBC drivers. - * - * @author Steve Ebersole - * @author Strong Liu - */ -public class JdbcDirectoryProfile extends AbstractDatabaseProfileImpl { - private final Configuration jdbcDependencies; - - public JdbcDirectoryProfile(File jdbcDirectory, Project project) { - super( jdbcDirectory.getParentFile(), project ); - jdbcDependencies = prepareConfiguration( getName() ); - project.dependencies.add(getName(), project.files(jdbcDirectory.listFiles())) - } - - @Override - public Configuration getTestingRuntimeConfiguration() { - return jdbcDependencies; - } -} diff --git a/buildSrc/src/main/groovy/org/hibernate/build/gradle/testing/database/MatrixDotGradleProfile.java b/buildSrc/src/main/groovy/org/hibernate/build/gradle/testing/database/MatrixDotGradleProfile.java deleted file mode 100644 index 4f08a12eef..0000000000 --- a/buildSrc/src/main/groovy/org/hibernate/build/gradle/testing/database/MatrixDotGradleProfile.java +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Hibernate, Relational Persistence for Idiomatic Java - * - * Copyright (c) 2012, Red Hat Inc. or third-party contributors as - * indicated by the @author tags or express copyright attribution - * statements applied by the authors. All third-party contributions are - * distributed under license by Red Hat Inc. - * - * This copyrighted material is made available to anyone wishing to use, modify, - * copy, or redistribute it subject to the terms and conditions of the GNU - * Lesser General Public License, as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License - * for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this distribution; if not, write to: - * Free Software Foundation, Inc. - * 51 Franklin Street, Fifth Floor - * Boston, MA 02110-1301 USA - */ -package org.hibernate.build.gradle.testing.database; - -import java.io.File; -import java.util.Collections; - -import groovy.lang.Closure; -import org.gradle.api.Project; -import org.gradle.api.artifacts.Configuration; - -/** - * Database profile as defined by a {@code matrix.gradle} file - * - * @author Steve Ebersole - * @author Strong Liu - */ -public class MatrixDotGradleProfile extends AbstractDatabaseProfileImpl { - private static final String MATRIX_NODE_CONVENTION_KEY = "matrixNode"; - - private final Configuration jdbcDependencies; - - protected MatrixDotGradleProfile(File matrixDotGradleFile, Project project) { - super( matrixDotGradleFile.getParentFile(), project ); - jdbcDependencies = prepareConfiguration( getName() ); - final ConventionImpl convention = new ConventionImpl( jdbcDependencies, project ); - project.getConvention().getPlugins().put( MATRIX_NODE_CONVENTION_KEY, convention ); - try { - project.apply( Collections.singletonMap( "from", matrixDotGradleFile ) ); - } - finally { - project.getConvention().getPlugins().remove( MATRIX_NODE_CONVENTION_KEY ); - } - } - - @Override - public Configuration getTestingRuntimeConfiguration() { - return jdbcDependencies; - } - - private class ConventionImpl { - private final Configuration jdbcDependencies; - private final Project project; - - private ConventionImpl(Configuration jdbcDependencies, Project project) { - this.jdbcDependencies = jdbcDependencies; - this.project = project; - } - - @SuppressWarnings( {"UnusedDeclaration"}) - public void jdbcDependency(Object dependencyNotation, Closure closure) { - project.getDependencies().add( jdbcDependencies.getName(), dependencyNotation, closure ); - } - - @SuppressWarnings( {"UnusedDeclaration"}) - public void jdbcDependency(Object dependencyNotation) { - project.getDependencies().add( jdbcDependencies.getName(), dependencyNotation ); - } - } - -} diff --git a/buildSrc/src/main/groovy/org/hibernate/build/gradle/testing/matrix/MatrixNode.java b/buildSrc/src/main/groovy/org/hibernate/build/gradle/testing/matrix/MatrixNode.java deleted file mode 100644 index 4f1e1380fe..0000000000 --- a/buildSrc/src/main/groovy/org/hibernate/build/gradle/testing/matrix/MatrixNode.java +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Hibernate, Relational Persistence for Idiomatic Java - * - * Copyright (c) 2011, Red Hat Inc. or third-party contributors as - * indicated by the @author tags or express copyright attribution - * statements applied by the authors. All third-party contributions are - * distributed under license by Red Hat Inc. - * - * This copyrighted material is made available to anyone wishing to use, modify, - * copy, or redistribute it subject to the terms and conditions of the GNU - * Lesser General Public License, as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License - * for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this distribution; if not, write to: - * Free Software Foundation, Inc. - * 51 Franklin Street, Fifth Floor - * Boston, MA 02110-1301 USA - */ -package org.hibernate.build.gradle.testing.matrix; - -import java.io.File; - -import org.gradle.api.Project; - -import org.hibernate.build.gradle.testing.database.DatabaseProfile; -import org.hibernate.build.gradle.util.Jdk; -import org.hibernate.build.qalab.*; -import org.hibernate.build.qalab.DatabaseAllocation; - -/** - * A testing matrix node combines a database profile and a jdk (eventually) along with managing "db allocation" - * information. - * - * @author Steve Ebersole - * @author Strong Liu - */ -public class MatrixNode { - private final DatabaseProfile databaseProfile; - private final Jdk jdk; - private final File baseOutputDirectory; - - private final DatabaseAllocation databaseAllocation; - - @SuppressWarnings( {"ResultOfMethodCallIgnored"}) - public MatrixNode(Project project, DatabaseProfile databaseProfile, Jdk jdk) { - this.databaseProfile = databaseProfile; - this.jdk = jdk; - - baseOutputDirectory = new File( new File( project.getBuildDir(), "matrix" ), databaseProfile.getName() ); - baseOutputDirectory.mkdirs(); - - this.databaseAllocation = DatabaseAllocator.locate( project ).getAllocation( databaseProfile ); - } - - public String getName() { - return databaseProfile.getName(); - } - - public DatabaseProfile getDatabaseProfile() { - return databaseProfile; - } - - public Jdk getJdk() { - return jdk; - } - - public File getBaseOutputDirectory() { - return baseOutputDirectory; - } - - public DatabaseAllocation getDatabaseAllocation() { - return databaseAllocation; - } -} diff --git a/buildSrc/src/main/groovy/org/hibernate/build/gradle/testing/matrix/MatrixTestingPlugin.groovy b/buildSrc/src/main/groovy/org/hibernate/build/gradle/testing/matrix/MatrixTestingPlugin.groovy deleted file mode 100644 index 31686a0dc2..0000000000 --- a/buildSrc/src/main/groovy/org/hibernate/build/gradle/testing/matrix/MatrixTestingPlugin.groovy +++ /dev/null @@ -1,159 +0,0 @@ -/* - * Hibernate, Relational Persistence for Idiomatic Java - * - * Copyright (c) 2011, Red Hat Inc. or third-party contributors as - * indicated by the @author tags or express copyright attribution - * statements applied by the authors. All third-party contributions are - * distributed under license by Red Hat Inc. - * - * This copyrighted material is made available to anyone wishing to use, modify, - * copy, or redistribute it subject to the terms and conditions of the GNU - * Lesser General Public License, as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License - * for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this distribution; if not, write to: - * Free Software Foundation, Inc. - * 51 Franklin Street, Fifth Floor - * Boston, MA 02110-1301 USA - */ -package org.hibernate.build.gradle.testing.matrix; - -import org.gradle.api.Plugin -import org.gradle.api.Project -import org.gradle.api.Task -import org.gradle.api.artifacts.Configuration -import org.gradle.api.logging.Logger -import org.gradle.api.logging.Logging -import org.gradle.api.plugins.JavaPluginConvention -import org.gradle.api.tasks.SourceSet -import org.gradle.api.tasks.testing.Test -import org.hibernate.build.gradle.testing.database.DatabaseProfile -import org.hibernate.build.gradle.testing.database.DatabaseProfilePlugin -import org.hibernate.build.gradle.util.Jdk -import static org.gradle.api.plugins.JavaPlugin.COMPILE_CONFIGURATION_NAME -import static org.gradle.api.plugins.JavaPlugin.RUNTIME_CONFIGURATION_NAME -import static org.gradle.api.plugins.JavaPlugin.TEST_COMPILE_CONFIGURATION_NAME -import static org.gradle.api.plugins.JavaPlugin.TEST_RUNTIME_CONFIGURATION_NAME - -/** - * TODO : 1) add a base configuration of common attribute across all matrix node tasks (convention) - * TODO : 2) somehow allow applying just a single database to a project (non matrix testing). - * - * @author Steve Ebersole - * @author Strong Liu - */ -public class MatrixTestingPlugin implements Plugin { - private static final Logger log = Logging.getLogger(MatrixTestingPlugin.class); - - public static final String MATRIX_COMPILE_CONFIG_NAME = "matrixCompile"; - public static final String MATRIX_RUNTIME_CONFIG_NAME = "matrixRuntime"; - public static final String MATRIX_TASK_NAME = "matrix"; - - private Project project; - private SourceSet testSourceSet; - - private Configuration matrixCompileConfig; - private Configuration matrixRuntimeConfig; - private Task matrixTask; - - // currently, only the build jdk is supported - private Jdk theJdk = new Jdk(); - - public void apply(Project project) { - this.project = project; - - project.rootProject.plugins.apply( DatabaseProfilePlugin ); - List matrixNodes = locateMatrixNodes(); - if ( matrixNodes == null || matrixNodes.isEmpty() ) { - // no db profiles defined - return; - } - - matrixCompileConfig = prepareCompileConfiguration(); - matrixRuntimeConfig = prepareRuntimeConfiguration(); - testSourceSet = project.convention.getPlugin( JavaPluginConvention ).sourceSets - .getByName( SourceSet.TEST_SOURCE_SET_NAME ); - - matrixTask = prepareGroupingTask(); - for ( MatrixNode matrixNode: matrixNodes ) { - Task matrixNodeTask = prepareNodeTask( matrixNode ); - matrixTask.dependsOn( matrixNodeTask ); - } - } - - private List locateMatrixNodes() { - List matrixNodes = new ArrayList(); - Iterable profiles = project.rootProject.plugins[DatabaseProfilePlugin].databaseProfiles; - if ( profiles != null ) { - for ( DatabaseProfile profile : profiles ) { - matrixNodes.add( new MatrixNode( project, profile, theJdk ) ); - } - } - return matrixNodes; - } - - /** - * Prepare compile configuration for matrix source set. - */ - private Configuration prepareCompileConfiguration() { - return project.configurations.create( MATRIX_COMPILE_CONFIG_NAME ) - .setDescription( "Dependencies used to compile the matrix tests" ) - .extendsFrom( project.configurations.getByName( COMPILE_CONFIGURATION_NAME ) ) - .extendsFrom( project.configurations.getByName( TEST_COMPILE_CONFIGURATION_NAME ) ); - } - - /** - * Prepare runtime configuration for matrix source set. - */ - private Configuration prepareRuntimeConfiguration() { - return project.configurations.create( MATRIX_RUNTIME_CONFIG_NAME ) - .setDescription( "Dependencies (baseline) used to run the matrix tests" ) - .extendsFrom( matrixCompileConfig ) - .extendsFrom( project.configurations.getByName( RUNTIME_CONFIGURATION_NAME ) ) - .extendsFrom( project.configurations.getByName( TEST_RUNTIME_CONFIGURATION_NAME ) ); - } - - private Task prepareGroupingTask() { - Task matrixTask = project.tasks.create( MATRIX_TASK_NAME ); - matrixTask.group = "Verification" - matrixTask.description = "Runs the unit tests on Database Matrix" - return matrixTask; - } - - private void generateNodeTasks(List matrixNodes) { - // For now we just hard code this to locate the databases processed by - // org.hibernate.build.gradle.testing.database.DatabaseProfilePlugin. But long term would be much better to - // abstract this idea via the MatrixNode/MatrixNodeProvider interfaces; this would allow the jvm variance - // needed for jdbc3/jdbc4 testing for example. Not to mention its much more generally applicable - // - // Also the notion that the plugin as a MatrixNodeProducer might not be appropriate. probably a split there - // is in order too (config producer and jvm producer and somehow they get wired into a matrix). - // - // but again this is just a start. - } - - private Task prepareNodeTask(MatrixNode node) { - String taskName = MATRIX_TASK_NAME + '_' + node.name - log.debug( "Adding Matrix Testing task $taskName" ); - final Test nodeTask = project.tasks.create( taskName, Test ); - nodeTask.description = "Runs the matrix against ${node.name}" - nodeTask.classpath = node.databaseProfile.testingRuntimeConfiguration + testSourceSet.runtimeClasspath - nodeTask.testClassesDir = testSourceSet.output.classesDir - nodeTask.ignoreFailures = true - nodeTask.workingDir = node.baseOutputDirectory - nodeTask.testReportDir = new File(node.baseOutputDirectory, "reports") - nodeTask.testResultsDir = new File(node.baseOutputDirectory, "results") - - nodeTask.dependsOn( project.tasks.getByName( testSourceSet.classesTaskName ) ); - nodeTask.systemProperties = node.databaseAllocation.properties - nodeTask.systemProperties['hibernate.test.validatefailureexpected'] = true - nodeTask.jvmArgs = ['-Xms1024M', '-Xmx1024M']//, '-XX:MaxPermSize=512M', '-Xss4096k', '-Xverify:none', '-XX:+UseFastAccessorMethods', '-XX:+DisableExplicitGC'] - nodeTask.maxHeapSize = "1024M" - return nodeTask; - } -} diff --git a/buildSrc/src/main/groovy/org/hibernate/build/qalab/DatabaseAllocation.java b/buildSrc/src/main/groovy/org/hibernate/build/qalab/DatabaseAllocation.java deleted file mode 100644 index 91a230a94d..0000000000 --- a/buildSrc/src/main/groovy/org/hibernate/build/qalab/DatabaseAllocation.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Hibernate, Relational Persistence for Idiomatic Java - * - * Copyright (c) 2012, Red Hat Inc. or third-party contributors as - * indicated by the @author tags or express copyright attribution - * statements applied by the authors. All third-party contributions are - * distributed under license by Red Hat Inc. - * - * This copyrighted material is made available to anyone wishing to use, modify, - * copy, or redistribute it subject to the terms and conditions of the GNU - * Lesser General Public License, as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License - * for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this distribution; if not, write to: - * Free Software Foundation, Inc. - * 51 Franklin Street, Fifth Floor - * Boston, MA 02110-1301 USA - */ -package org.hibernate.build.qalab; - -import java.util.Map; - -/** - * Represents a database instances allocated in the JBoss/Red Hat Qe Lab via {@link DatabaseAllocator} - * - * @author mvecera - * @author Strong Liu - * @author Steve Ebersole - */ -public interface DatabaseAllocation { - public Map getProperties(); - - public void release(); -} diff --git a/buildSrc/src/main/groovy/org/hibernate/build/qalab/DatabaseAllocator.groovy b/buildSrc/src/main/groovy/org/hibernate/build/qalab/DatabaseAllocator.groovy deleted file mode 100644 index 8edb9dc7ff..0000000000 --- a/buildSrc/src/main/groovy/org/hibernate/build/qalab/DatabaseAllocator.groovy +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Hibernate, Relational Persistence for Idiomatic Java - * - * Copyright (c) 2012, Red Hat Inc. or third-party contributors as - * indicated by the @author tags or express copyright attribution - * statements applied by the authors. All third-party contributions are - * distributed under license by Red Hat Inc. - * - * This copyrighted material is made available to anyone wishing to use, modify, - * copy, or redistribute it subject to the terms and conditions of the GNU - * Lesser General Public License, as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License - * for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this distribution; if not, write to: - * Free Software Foundation, Inc. - * 51 Franklin Street, Fifth Floor - * Boston, MA 02110-1301 USA - */ -package org.hibernate.build.qalab - -import org.gradle.api.Project -import org.gradle.api.logging.Logger -import org.gradle.api.logging.Logging -import org.hibernate.build.gradle.testing.database.DatabaseProfile - -/** - * Helper for dealing with the "DB Allocator" service set up in the JBoss/Red Hat QE lab. - * - * Use the hibernate-matrix-dballocation setting to control db allocation. By default, - * no allocations are performed. hibernate-matrix-dballocation could be either:
    - *
  • all - allocate all non-ignored databases
  • - *
  • profile1{,profile2,...} - allocate only the named profiles, provided the name is also one of the supported names
  • - *
- * - * @author mvecera - * @author Strong Liu - * @author Steve Ebersole - */ -class DatabaseAllocator { - private static final Logger log = Logging.getLogger( DatabaseAllocator.class ); - - public static final String ALLOCATION_ENABLED = "hibernate-matrix-dballocation"; - public static final String REQUESTEE = "hibernate-matrix-dballocation-requestee"; - - public static final String DB_ALLOCATOR_KEY = "dbAllocator"; - - public static def SUPPORTED_DB_NAMES = [ - "oracle9i", "oracle10g", "oracle11gR1", "oracle11gR2", "oracle11gR2RAC", "oracle11gR1RAC", - "postgresql82", "postgresql83", "postgresql84", "postgresql91", "postgresql92", - "postgresplus92", - "mysql50", "mysql51","mysql55", - "db2-91", "db2-97", "db2-10", - "mssql2005", "mssql2008R1", "mssql2008R2", "mssql2012", - "sybase155", "sybase157" - ]; - - private Map databaseAllocationMap = new HashMap(); - private final Project rootProject; - - DatabaseAllocator(Project rootProject) { - this.rootProject = rootProject - } - - public DatabaseAllocation getAllocation(DatabaseProfile profile) { - DatabaseAllocation databaseAllocation = databaseAllocationMap.get( profile.name ); - if ( databaseAllocation == null ) { - databaseAllocation = createAllocation( profile ); - databaseAllocationMap.put( profile.name, databaseAllocation ); - } - return databaseAllocation; - } - - private DatabaseAllocation createAllocation(DatabaseProfile profile) { - if ( isAllocationEnabled( profile.name ) ) { - log.lifecycle( "using Allocator to get database [${profile.name}] connection info" ); - final File outputDirectory = new File( new File( rootProject.getBuildDir(), "matrix" ), profile.getName() ) - return new EnabledDatabaseAllocation( rootProject.getAnt(), profile, outputDirectory ); - } - return new DisabledDatabaseAllocation( profile ); - } - - private boolean isAllocationEnabled(String name) { - if ( !SUPPORTED_DB_NAMES.contains(name) ) { - return false - }; - String value = System.properties[ALLOCATION_ENABLED] - return value != null && (value.contains(name) || value.equals("all")); - } - - public static DatabaseAllocator locate(Project project) { - if ( ! project.rootProject.hasProperty( DB_ALLOCATOR_KEY ) ) { - project.rootProject.ext.setProperty( DB_ALLOCATOR_KEY, new DatabaseAllocator( project.rootProject ) ); - } - return (DatabaseAllocator) project.rootProject.properties[ DB_ALLOCATOR_KEY ]; - } -} diff --git a/buildSrc/src/main/groovy/org/hibernate/build/qalab/DisabledDatabaseAllocation.groovy b/buildSrc/src/main/groovy/org/hibernate/build/qalab/DisabledDatabaseAllocation.groovy deleted file mode 100644 index 444c780156..0000000000 --- a/buildSrc/src/main/groovy/org/hibernate/build/qalab/DisabledDatabaseAllocation.groovy +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Hibernate, Relational Persistence for Idiomatic Java - * - * Copyright (c) 2012, Red Hat Inc. or third-party contributors as - * indicated by the @author tags or express copyright attribution - * statements applied by the authors. All third-party contributions are - * distributed under license by Red Hat Inc. - * - * This copyrighted material is made available to anyone wishing to use, modify, - * copy, or redistribute it subject to the terms and conditions of the GNU - * Lesser General Public License, as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License - * for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this distribution; if not, write to: - * Free Software Foundation, Inc. - * 51 Franklin Street, Fifth Floor - * Boston, MA 02110-1301 USA - */ -package org.hibernate.build.qalab - -import org.hibernate.build.gradle.testing.database.DatabaseProfile - -/** - * @author Steve Ebersole - */ -class DisabledDatabaseAllocation implements DatabaseAllocation { - private final DatabaseProfile databaseProfile; - - DisabledDatabaseAllocation(DatabaseProfile databaseProfile) { - this.databaseProfile = databaseProfile; - } - - @Override - Map getProperties() { - return databaseProfile.hibernateProperties; - } - - @Override - void release() { - // nothing to do - } -} diff --git a/buildSrc/src/main/groovy/org/hibernate/build/qalab/EnabledDatabaseAllocation.groovy b/buildSrc/src/main/groovy/org/hibernate/build/qalab/EnabledDatabaseAllocation.groovy deleted file mode 100644 index 3ae40d3a9e..0000000000 --- a/buildSrc/src/main/groovy/org/hibernate/build/qalab/EnabledDatabaseAllocation.groovy +++ /dev/null @@ -1,150 +0,0 @@ -/* - * Hibernate, Relational Persistence for Idiomatic Java - * - * Copyright (c) 2012, Red Hat Inc. or third-party contributors as - * indicated by the @author tags or express copyright attribution - * statements applied by the authors. All third-party contributions are - * distributed under license by Red Hat Inc. - * - * This copyrighted material is made available to anyone wishing to use, modify, - * copy, or redistribute it subject to the terms and conditions of the GNU - * Lesser General Public License, as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License - * for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this distribution; if not, write to: - * Free Software Foundation, Inc. - * 51 Franklin Street, Fifth Floor - * Boston, MA 02110-1301 USA - */ -package org.hibernate.build.qalab - -import org.gradle.api.Project -import org.hibernate.build.gradle.testing.database.DatabaseProfile -import org.hibernate.build.gradle.util.BuildException -import org.gradle.api.logging.Logging -import org.gradle.api.logging.Logger - -/** - * @author Steve Ebersole - */ -class EnabledDatabaseAllocation implements DatabaseAllocation { - private static final Logger log = Logging.getLogger( DatabaseAllocator.class ); - - private static final String DB_ALLOCATOR_URL = "http://dballocator.mw.lab.eng.bos.redhat.com:8080/Allocator/AllocatorServlet"; - private static final String ALLOCATOR_OUTPUT_FILE_NAME = "allocated-db.properties"; - private static final String DB_ALLOCATION_URL_POSTFIX = "hibernate-matrix-dballocation-url-postfix"; - - private static final String DRIVER_PROP = "hibernate.connection.driver_class"; - private static final String URL_PROP = "hibernate.connection.url"; - private static final String USERNAME_PROP = "hibernate.connection.username"; - private static final String PASSWORD_PROP = "hibernate.connection.password"; - - private static final int RETRIES = 30 - private static final int EXPIRY = 300; - - private final DatabaseProfile databaseProfile - private final AntBuilder ant; - - private final File allocatorOutputFile; - private final String requester; - private final String uuid; - - private final File tmpFile; - - private final Map properties; - - EnabledDatabaseAllocation(AntBuilder ant, DatabaseProfile databaseProfile, File outputDirectory) { - this.ant = ant; - this.databaseProfile = databaseProfile; - - outputDirectory.mkdirs() - - this.allocatorOutputFile = new File( outputDirectory, ALLOCATOR_OUTPUT_FILE_NAME ); - this.tmpFile = new File( outputDirectory, "tmpfile" ); - - if ( System.properties.containsKey("hibernate-matrix-dballocation-requestee") ) { - requester = System.properties["hibernate-matrix-dballocation-requestee"] - } - else { - requester = "hibernate" - } - - if ( allocatorOutputFile.exists() ) { - allocatorOutputFile.delete() - } - - int attempts = 0; - while ( !(allocatorOutputFile.exists() && allocatorOutputFile.length() > 0) ) { - if ( attempts >= RETRIES ) { - throw new BuildException( 'Database unavailable' ); - } - if ( attempts > 0 ) { - log.lifecycle( "Trouble accessing Allocator servlet; waiting before trying again" ); - Thread.sleep( 60000 ); - } - def allocatorUrl = DB_ALLOCATOR_URL + - "?operation=alloc&label=${databaseProfile.name}&requestee=${requester}&expiry=${EXPIRY}" - ant.get( - src: allocatorUrl, - dest: allocatorOutputFile.absolutePath, - ignoreerrors: 'true' - ); - attempts++ - } - - def allocatorProps = new Properties(); - allocatorProps.load( new FileInputStream( allocatorOutputFile ) ); - - this.uuid = allocatorProps['uuid'] - log.lifecycle( "Finished allocating for DB instance [${databaseProfile.name}], uuid is [${uuid}]" ); - - properties = new HashMap(); - properties.putAll( databaseProfile.hibernateProperties ); - properties[DRIVER_PROP] = allocatorProps["db.jdbc_class"] - properties[URL_PROP] = allocatorProps["db.jdbc_url"] + getURLPostfix(databaseProfile.name) - properties[USERNAME_PROP] = allocatorProps["db.username"] - properties[PASSWORD_PROP] = allocatorProps["db.password"] - properties["uuid"] = allocatorProps["uuid"]; - - clean(); - } - - private String getURLPostfix(String dbName) { - for ( String key: System.properties.keySet() ) { - if ( key.startsWith(DB_ALLOCATION_URL_POSTFIX) ) { - String db = key.substring(DB_ALLOCATION_URL_POSTFIX.length() + 1, key.length()) - if ( db.equalsIgnoreCase(dbName) ) { - String postfix = System.properties[key]; - log.debug("found URL postfix[%s] for DB[%s]", postfix, db ); - return postfix; - } - } - } - return "" - } - - void clean() { - log.lifecycle( "Cleaning DB [${databaseProfile.name}]..." ); - final String allocatorUrl = DB_ALLOCATOR_URL + "?operation=erase&uuid=${uuid}"; - ant.get( src: allocatorUrl, dest: tmpFile.absolutePath ); - } - - @Override - Map getProperties() { - return properties; - } - - @Override - void release() { - log.lifecycle( "De-allocating DB [${databaseProfile.name}]..." ); - final String allocatorUrl = DB_ALLOCATOR_URL + "?operation=dealloc&uuid=${uuid}"; - ant.get( src: allocatorUrl, dest: tmpFile.absolutePath ); - } - - -} diff --git a/databases/.gitignore b/databases/.gitignore deleted file mode 100644 index 9fdb372de8..0000000000 --- a/databases/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -#Ignore any sub directory named 'local'. these are used to define custom database profiles local -# to the developer's machine -/local \ No newline at end of file diff --git a/databases/derby/matrix.gradle b/databases/derby/matrix.gradle deleted file mode 100644 index 39b1873402..0000000000 --- a/databases/derby/matrix.gradle +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Hibernate, Relational Persistence for Idiomatic Java - * - * Copyright (c) 2011, Red Hat Inc. or third-party contributors as - * indicated by the @author tags or express copyright attribution - * statements applied by the authors. All third-party contributions are - * distributed under license by Red Hat Inc. - * - * This copyrighted material is made available to anyone wishing to use, modify, - * copy, or redistribute it subject to the terms and conditions of the GNU - * Lesser General Public License, as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License - * for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this distribution; if not, write to: - * Free Software Foundation, Inc. - * 51 Franklin Street, Fifth Floor - * Boston, MA 02110-1301 USA - */ - -jdbcDependency "org.apache.derby:derby:10.8.2.2" \ No newline at end of file diff --git a/databases/derby/resources/hibernate.properties b/databases/derby/resources/hibernate.properties deleted file mode 100644 index 599da05bdc..0000000000 --- a/databases/derby/resources/hibernate.properties +++ /dev/null @@ -1,40 +0,0 @@ -# -# Hibernate, Relational Persistence for Idiomatic Java -# -# Copyright (c) 2011, Red Hat Inc. or third-party contributors as -# indicated by the @author tags or express copyright attribution -# statements applied by the authors. All third-party contributions are -# distributed under license by Red Hat Inc. -# -# This copyrighted material is made available to anyone wishing to use, modify, -# copy, or redistribute it subject to the terms and conditions of the GNU -# Lesser General Public License, as published by the Free Software Foundation. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License -# for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this distribution; if not, write to: -# Free Software Foundation, Inc. -# 51 Franklin Street, Fifth Floor -# Boston, MA 02110-1301 USA -# - -hibernate.dialect org.hibernate.dialect.DerbyTenSevenDialect -hibernate.connection.driver_class org.apache.derby.jdbc.EmbeddedDriver -hibernate.connection.url jdbc:derby:testdb;create=true -hibernate.connection.username sa - -hibernate.connection.pool_size 5 - -hibernate.show_sql true -hibernate.format_sql true - -hibernate.max_fetch_depth 5 - -hibernate.cache.region_prefix hibernate.test -hibernate.cache.region.factory_class org.hibernate.testing.cache.CachingRegionFactory - - diff --git a/databases/mysql50/matrix.gradle b/databases/mysql50/matrix.gradle deleted file mode 100644 index 9439d47bdb..0000000000 --- a/databases/mysql50/matrix.gradle +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Hibernate, Relational Persistence for Idiomatic Java - * - * Copyright (c) 2011, Red Hat Inc. or third-party contributors as - * indicated by the @author tags or express copyright attribution - * statements applied by the authors. All third-party contributions are - * distributed under license by Red Hat Inc. - * - * This copyrighted material is made available to anyone wishing to use, modify, - * copy, or redistribute it subject to the terms and conditions of the GNU - * Lesser General Public License, as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License - * for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this distribution; if not, write to: - * Free Software Foundation, Inc. - * 51 Franklin Street, Fifth Floor - * Boston, MA 02110-1301 USA - */ - -jdbcDependency "mysql:mysql-connector-java:5.1.17" \ No newline at end of file diff --git a/databases/mysql50/resources/hibernate.properties b/databases/mysql50/resources/hibernate.properties deleted file mode 100644 index 9b8811323c..0000000000 --- a/databases/mysql50/resources/hibernate.properties +++ /dev/null @@ -1,42 +0,0 @@ -# -# Hibernate, Relational Persistence for Idiomatic Java -# -# Copyright (c) 2011, Red Hat Inc. or third-party contributors as -# indicated by the @author tags or express copyright attribution -# statements applied by the authors. All third-party contributions are -# distributed under license by Red Hat Inc. -# -# This copyrighted material is made available to anyone wishing to use, modify, -# copy, or redistribute it subject to the terms and conditions of the GNU -# Lesser General Public License, as published by the Free Software Foundation. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License -# for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this distribution; if not, write to: -# Free Software Foundation, Inc. -# 51 Franklin Street, Fifth Floor -# Boston, MA 02110-1301 USA -# - -hibernate.dialect org.hibernate.dialect.MySQL5InnoDBDialect -hibernate.connection.driver_class com.mysql.jdbc.Driver -hibernate.connection.url jdbc:mysql://vmg08.mw.lab.eng.bos.redhat.com:3306/dballo01 -hibernate.connection.username dballo01 -hibernate.connection.password dballo01 - - -hibernate.connection.pool_size 5 - -hibernate.show_sql true -hibernate.format_sql true - -hibernate.max_fetch_depth 5 - -hibernate.cache.region_prefix hibernate.test -hibernate.cache.region.factory_class org.hibernate.testing.cache.CachingRegionFactory - - diff --git a/databases/mysql51/matrix.gradle b/databases/mysql51/matrix.gradle deleted file mode 100644 index 9439d47bdb..0000000000 --- a/databases/mysql51/matrix.gradle +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Hibernate, Relational Persistence for Idiomatic Java - * - * Copyright (c) 2011, Red Hat Inc. or third-party contributors as - * indicated by the @author tags or express copyright attribution - * statements applied by the authors. All third-party contributions are - * distributed under license by Red Hat Inc. - * - * This copyrighted material is made available to anyone wishing to use, modify, - * copy, or redistribute it subject to the terms and conditions of the GNU - * Lesser General Public License, as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License - * for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this distribution; if not, write to: - * Free Software Foundation, Inc. - * 51 Franklin Street, Fifth Floor - * Boston, MA 02110-1301 USA - */ - -jdbcDependency "mysql:mysql-connector-java:5.1.17" \ No newline at end of file diff --git a/databases/mysql51/resources/hibernate.properties b/databases/mysql51/resources/hibernate.properties deleted file mode 100644 index cc3b732cbc..0000000000 --- a/databases/mysql51/resources/hibernate.properties +++ /dev/null @@ -1,46 +0,0 @@ -# -# Hibernate, Relational Persistence for Idiomatic Java -# -# Copyright (c) 2011, Red Hat Inc. or third-party contributors as -# indicated by the @author tags or express copyright attribution -# statements applied by the authors. All third-party contributions are -# distributed under license by Red Hat Inc. -# -# This copyrighted material is made available to anyone wishing to use, modify, -# copy, or redistribute it subject to the terms and conditions of the GNU -# Lesser General Public License, as published by the Free Software Foundation. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License -# for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this distribution; if not, write to: -# Free Software Foundation, Inc. -# 51 Franklin Street, Fifth Floor -# Boston, MA 02110-1301 USA -# - -hibernate.dialect org.hibernate.dialect.MySQL5InnoDBDialect -hibernate.connection.driver_class com.mysql.jdbc.Driver -#hibernate.connection.url jdbc:mysql://vmg02.mw.lab.eng.bos.redhat.com:3306/dballo01 -#hibernate.connection.username dballo01 -#hibernate.connection.password dballo01 - -hibernate.connection.url jdbc:mysql://127.0.0.1:3306/hibernate -hibernate.connection.username hibernate -hibernate.connection.password hibernate - - -hibernate.connection.pool_size 5 - -hibernate.show_sql true -hibernate.format_sql true - -hibernate.max_fetch_depth 5 - -hibernate.cache.region_prefix hibernate.test -hibernate.cache.region.factory_class org.hibernate.testing.cache.CachingRegionFactory - - diff --git a/databases/postgresql82/matrix.gradle b/databases/postgresql82/matrix.gradle deleted file mode 100644 index 78c7bc8678..0000000000 --- a/databases/postgresql82/matrix.gradle +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Hibernate, Relational Persistence for Idiomatic Java - * - * Copyright (c) 2011, Red Hat Inc. or third-party contributors as - * indicated by the @author tags or express copyright attribution - * statements applied by the authors. All third-party contributions are - * distributed under license by Red Hat Inc. - * - * This copyrighted material is made available to anyone wishing to use, modify, - * copy, or redistribute it subject to the terms and conditions of the GNU - * Lesser General Public License, as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License - * for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this distribution; if not, write to: - * Free Software Foundation, Inc. - * 51 Franklin Street, Fifth Floor - * Boston, MA 02110-1301 USA - */ -jdbcDependency "postgresql:postgresql:8.4-701.jdbc4" \ No newline at end of file diff --git a/databases/postgresql82/resources/hibernate.properties b/databases/postgresql82/resources/hibernate.properties deleted file mode 100644 index 76bf7f0e13..0000000000 --- a/databases/postgresql82/resources/hibernate.properties +++ /dev/null @@ -1,42 +0,0 @@ -# -# Hibernate, Relational Persistence for Idiomatic Java -# -# Copyright (c) 2011, Red Hat Inc. or third-party contributors as -# indicated by the @author tags or express copyright attribution -# statements applied by the authors. All third-party contributions are -# distributed under license by Red Hat Inc. -# -# This copyrighted material is made available to anyone wishing to use, modify, -# copy, or redistribute it subject to the terms and conditions of the GNU -# Lesser General Public License, as published by the Free Software Foundation. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License -# for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this distribution; if not, write to: -# Free Software Foundation, Inc. -# 51 Franklin Street, Fifth Floor -# Boston, MA 02110-1301 USA -# - -hibernate.dialect org.hibernate.dialect.PostgreSQLDialect -hibernate.connection.driver_class org.postgresql.Driver -hibernate.connection.url jdbc:postgresql://postgresql01.mw.lab.eng.bos.redhat.com:5432/dballo03 -hibernate.connection.username dballo03 -hibernate.connection.password dballo03 - - -hibernate.connection.pool_size 5 - -hibernate.show_sql true -hibernate.format_sql true - -hibernate.max_fetch_depth 5 - -hibernate.cache.region_prefix hibernate.test -hibernate.cache.region.factory_class org.hibernate.testing.cache.CachingRegionFactory - - diff --git a/databases/postgresql83/matrix.gradle b/databases/postgresql83/matrix.gradle deleted file mode 100644 index 78c7bc8678..0000000000 --- a/databases/postgresql83/matrix.gradle +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Hibernate, Relational Persistence for Idiomatic Java - * - * Copyright (c) 2011, Red Hat Inc. or third-party contributors as - * indicated by the @author tags or express copyright attribution - * statements applied by the authors. All third-party contributions are - * distributed under license by Red Hat Inc. - * - * This copyrighted material is made available to anyone wishing to use, modify, - * copy, or redistribute it subject to the terms and conditions of the GNU - * Lesser General Public License, as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License - * for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this distribution; if not, write to: - * Free Software Foundation, Inc. - * 51 Franklin Street, Fifth Floor - * Boston, MA 02110-1301 USA - */ -jdbcDependency "postgresql:postgresql:8.4-701.jdbc4" \ No newline at end of file diff --git a/databases/postgresql83/resources/hibernate.properties b/databases/postgresql83/resources/hibernate.properties deleted file mode 100644 index 45f8ea203c..0000000000 --- a/databases/postgresql83/resources/hibernate.properties +++ /dev/null @@ -1,43 +0,0 @@ -# -# Hibernate, Relational Persistence for Idiomatic Java -# -# Copyright (c) 2011, Red Hat Inc. or third-party contributors as -# indicated by the @author tags or express copyright attribution -# statements applied by the authors. All third-party contributions are -# distributed under license by Red Hat Inc. -# -# This copyrighted material is made available to anyone wishing to use, modify, -# copy, or redistribute it subject to the terms and conditions of the GNU -# Lesser General Public License, as published by the Free Software Foundation. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License -# for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this distribution; if not, write to: -# Free Software Foundation, Inc. -# 51 Franklin Street, Fifth Floor -# Boston, MA 02110-1301 USA -# - -hibernate.dialect org.hibernate.dialect.PostgreSQLDialect -hibernate.connection.driver_class org.postgresql.Driver - -hibernate.connection.url jdbc:postgresql://postgresql03.mw.lab.eng.bos.redhat.com:5432/dballo03 -hibernate.connection.username dballo03 -hibernate.connection.password dballo03 - - -hibernate.connection.pool_size 5 - -hibernate.show_sql true -hibernate.format_sql true - -hibernate.max_fetch_depth 5 - -hibernate.cache.region_prefix hibernate.test -hibernate.cache.region.factory_class org.hibernate.testing.cache.CachingRegionFactory - - diff --git a/databases/postgresql84/matrix.gradle b/databases/postgresql84/matrix.gradle deleted file mode 100644 index 5d30139099..0000000000 --- a/databases/postgresql84/matrix.gradle +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Hibernate, Relational Persistence for Idiomatic Java - * - * Copyright (c) 2011, Red Hat Inc. or third-party contributors as - * indicated by the @author tags or express copyright attribution - * statements applied by the authors. All third-party contributions are - * distributed under license by Red Hat Inc. - * - * This copyrighted material is made available to anyone wishing to use, modify, - * copy, or redistribute it subject to the terms and conditions of the GNU - * Lesser General Public License, as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License - * for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this distribution; if not, write to: - * Free Software Foundation, Inc. - * 51 Franklin Street, Fifth Floor - * Boston, MA 02110-1301 USA - */ -jdbcDependency "postgresql:postgresql:9.1-901.jdbc4" \ No newline at end of file diff --git a/databases/postgresql84/resources/hibernate.properties b/databases/postgresql84/resources/hibernate.properties deleted file mode 100644 index 977b43b33a..0000000000 --- a/databases/postgresql84/resources/hibernate.properties +++ /dev/null @@ -1,42 +0,0 @@ -# -# Hibernate, Relational Persistence for Idiomatic Java -# -# Copyright (c) 2011, Red Hat Inc. or third-party contributors as -# indicated by the @author tags or express copyright attribution -# statements applied by the authors. All third-party contributions are -# distributed under license by Red Hat Inc. -# -# This copyrighted material is made available to anyone wishing to use, modify, -# copy, or redistribute it subject to the terms and conditions of the GNU -# Lesser General Public License, as published by the Free Software Foundation. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License -# for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this distribution; if not, write to: -# Free Software Foundation, Inc. -# 51 Franklin Street, Fifth Floor -# Boston, MA 02110-1301 USA -# - -hibernate.dialect org.hibernate.dialect.PostgreSQL82Dialect -hibernate.connection.driver_class org.postgresql.Driver -hibernate.connection.url jdbc:postgresql://127.0.0.1/hibernate -hibernate.connection.username hibernate -hibernate.connection.password hibernate - - -hibernate.connection.pool_size 5 - -hibernate.show_sql true -hibernate.format_sql true - -hibernate.max_fetch_depth 5 - -hibernate.cache.region_prefix hibernate.test -hibernate.cache.region.factory_class org.hibernate.testing.cache.CachingRegionFactory - - diff --git a/hibernate-core/hibernate-core.gradle b/hibernate-core/hibernate-core.gradle index b49ccff347..72f3c5c9b1 100644 --- a/hibernate-core/hibernate-core.gradle +++ b/hibernate-core/hibernate-core.gradle @@ -1,6 +1,8 @@ apply plugin: 'antlr' +apply plugin: 'hibernate-matrix-testing' + apply plugin: org.hibernate.build.gradle.inject.InjectionPlugin -apply plugin: org.hibernate.build.gradle.testing.matrix.MatrixTestingPlugin + dependencies { compile( libraries.jta ) diff --git a/hibernate-entitymanager/hibernate-entitymanager.gradle b/hibernate-entitymanager/hibernate-entitymanager.gradle index e5a16948b3..0f15d2ffd5 100644 --- a/hibernate-entitymanager/hibernate-entitymanager.gradle +++ b/hibernate-entitymanager/hibernate-entitymanager.gradle @@ -1,6 +1,6 @@ import org.apache.tools.ant.filters.ReplaceTokens -apply plugin: org.hibernate.build.gradle.testing.matrix.MatrixTestingPlugin +apply plugin: 'hibernate-matrix-testing' dependencies { compile( project(':hibernate-core') ) diff --git a/hibernate-envers/hibernate-envers.gradle b/hibernate-envers/hibernate-envers.gradle index 2ae83fb18f..5a0c8ee0be 100644 --- a/hibernate-envers/hibernate-envers.gradle +++ b/hibernate-envers/hibernate-envers.gradle @@ -1,4 +1,4 @@ -apply plugin: org.hibernate.build.gradle.testing.matrix.MatrixTestingPlugin +apply plugin: 'hibernate-matrix-testing' dependencies { compile( project( ':hibernate-core' ) )