HHH-12190 - General tidying of Gradle scripts
This commit is contained in:
parent
2e541f3b15
commit
d806eff912
562
build.gradle
562
build.gradle
|
@ -10,13 +10,7 @@ import org.apache.tools.ant.filters.ReplaceTokens
|
||||||
buildscript {
|
buildscript {
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
mavenLocal()
|
|
||||||
jcenter()
|
jcenter()
|
||||||
|
|
||||||
maven {
|
|
||||||
name 'jboss-nexus'
|
|
||||||
url "http://repository.jboss.org/nexus/content/groups/public/"
|
|
||||||
}
|
|
||||||
maven {
|
maven {
|
||||||
name "jboss-snapshots"
|
name "jboss-snapshots"
|
||||||
url "http://snapshots.jboss.org/maven2/"
|
url "http://snapshots.jboss.org/maven2/"
|
||||||
|
@ -28,6 +22,7 @@ buildscript {
|
||||||
classpath 'org.hibernate.build.gradle:version-injection-plugin:1.0.0'
|
classpath 'org.hibernate.build.gradle:version-injection-plugin:1.0.0'
|
||||||
classpath 'org.hibernate.build.gradle:gradle-xjc-plugin:1.0.2.Final'
|
classpath 'org.hibernate.build.gradle:gradle-xjc-plugin:1.0.2.Final'
|
||||||
classpath 'com.github.lburgazzoli:lb-karaf-features-gen:1.0.0-SNAPSHOT'
|
classpath 'com.github.lburgazzoli:lb-karaf-features-gen:1.0.0-SNAPSHOT'
|
||||||
|
classpath 'org.asciidoctor:asciidoctor-gradle-plugin:1.5.2'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -36,20 +31,9 @@ plugins {
|
||||||
id 'me.champeau.buildscan-recipes' version '0.1.7'
|
id 'me.champeau.buildscan-recipes' version '0.1.7'
|
||||||
}
|
}
|
||||||
|
|
||||||
apply plugin: 'eclipse'
|
|
||||||
apply plugin: 'idea'
|
|
||||||
apply from: "./libraries.gradle"
|
|
||||||
apply from: "./databases.gradle"
|
|
||||||
|
|
||||||
allprojects {
|
allprojects {
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
mavenLocal()
|
|
||||||
|
|
||||||
maven {
|
|
||||||
name 'jboss-nexus'
|
|
||||||
url "http://repository.jboss.org/nexus/content/groups/public/"
|
|
||||||
}
|
|
||||||
maven {
|
maven {
|
||||||
name "jboss-snapshots"
|
name "jboss-snapshots"
|
||||||
url "http://snapshots.jboss.org/maven2/"
|
url "http://snapshots.jboss.org/maven2/"
|
||||||
|
@ -58,499 +42,39 @@ allprojects {
|
||||||
|
|
||||||
// minimize changes, at least for now (gradle uses 'build' by default)..
|
// minimize changes, at least for now (gradle uses 'build' by default)..
|
||||||
buildDir = "target"
|
buildDir = "target"
|
||||||
|
|
||||||
|
apply from: rootProject.file( 'gradle/base-information.gradle' )
|
||||||
}
|
}
|
||||||
|
|
||||||
ext {
|
|
||||||
hibernateTargetVersion = '5.3.0-SNAPSHOT'
|
|
||||||
expectedGradleVersion = '4.4'
|
|
||||||
baselineJavaVersion = '1.8'
|
|
||||||
|
|
||||||
osgiExportVersion = hibernateTargetVersion.replaceAll( '-SNAPSHOT', '.SNAPSHOT' )
|
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
// Link together all release tasks
|
||||||
final String[] versionComponents = hibernateTargetVersion.split( '\\.' );
|
|
||||||
hibernateFullVersion = hibernateTargetVersion
|
|
||||||
hibernateMajorMinorVersion = versionComponents[0] + '.' + versionComponents[1]
|
|
||||||
hibernateMajorVersion = versionComponents[0]
|
|
||||||
}
|
|
||||||
|
|
||||||
idea {
|
|
||||||
project {
|
|
||||||
jdkName = baselineJavaVersion
|
|
||||||
languageLevel = baselineJavaVersion
|
|
||||||
|
|
||||||
vcs = 'Git'
|
|
||||||
}
|
|
||||||
module {
|
|
||||||
name = "hibernate-orm"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Used in MANIFEST.MF for OSGi Bundles
|
|
||||||
def osgiDescription() {
|
|
||||||
return "A module of the Hibernate O/RM project"
|
|
||||||
}
|
|
||||||
|
|
||||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
subprojects { subProject ->
|
|
||||||
apply plugin: 'idea'
|
|
||||||
apply plugin: 'eclipse'
|
|
||||||
|
|
||||||
defaultTasks 'build'
|
|
||||||
|
|
||||||
if ( subProject.name.startsWith( 'hibernate-gradle-plugin' ) ) {
|
|
||||||
apply plugin: 'groovy'
|
|
||||||
}
|
|
||||||
|
|
||||||
group = 'org.hibernate'
|
|
||||||
version = rootProject.hibernateTargetVersion
|
|
||||||
|
|
||||||
ext.exportPackageVersion = rootProject.osgiExportVersion
|
|
||||||
|
|
||||||
if ( subProject.name.startsWith( 'release' ) ) {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( subProject.name.startsWith( 'hibernate-orm-modules' ) ) {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// everything below here in the closure applies to modules with Java code
|
|
||||||
apply plugin: 'java'
|
|
||||||
apply plugin: 'maven-publish'
|
|
||||||
apply plugin: 'maven-publish-auth'
|
|
||||||
apply plugin: 'osgi'
|
|
||||||
|
|
||||||
apply plugin: 'findbugs'
|
|
||||||
apply plugin: 'checkstyle'
|
|
||||||
apply plugin: 'build-dashboard'
|
|
||||||
apply plugin: 'project-report'
|
|
||||||
|
|
||||||
apply from: "${rootProject.projectDir}/utilities.gradle"
|
|
||||||
|
|
||||||
apply plugin: org.hibernate.build.HibernateBuildPlugin
|
|
||||||
|
|
||||||
sourceCompatibility = rootProject.baselineJavaVersion
|
|
||||||
targetCompatibility = rootProject.baselineJavaVersion
|
|
||||||
|
|
||||||
configurations {
|
|
||||||
provided {
|
|
||||||
// todo : need to make sure these are non-exported
|
|
||||||
description = 'Non-exported compile-time dependencies.'
|
|
||||||
}
|
|
||||||
jbossLoggingTool {
|
|
||||||
description = 'Dependencies for running the jboss-logging tooling.'
|
|
||||||
}
|
|
||||||
configurations {
|
|
||||||
all*.exclude group: 'xml-apis', module: 'xml-apis'
|
|
||||||
}
|
|
||||||
asciidoclet {
|
|
||||||
description = "Dependencies for Asciidoctor Javadoc taglet"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// appropriately inject the common dependencies into each sub-project
|
|
||||||
dependencies {
|
|
||||||
compile libraries.logging
|
|
||||||
|
|
||||||
provided libraries.logging_annotations
|
|
||||||
|
|
||||||
jbossLoggingTool( libraries.logging_processor )
|
|
||||||
|
|
||||||
testCompile( libraries.junit )
|
|
||||||
testCompile( libraries.byteman )
|
|
||||||
testCompile( libraries.byteman_install )
|
|
||||||
testCompile( libraries.byteman_bmunit )
|
|
||||||
|
|
||||||
testRuntime( libraries.log4j )
|
|
||||||
testRuntime( libraries.javassist )
|
|
||||||
testRuntime( libraries.byteBuddy )
|
|
||||||
testRuntime( libraries.woodstox )
|
|
||||||
|
|
||||||
//Databases
|
|
||||||
testRuntime( libraries.h2 )
|
|
||||||
testRuntime( libraries.hsqldb )
|
|
||||||
testRuntime( libraries.postgresql )
|
|
||||||
testRuntime( libraries.mysql )
|
|
||||||
testRuntime( libraries.mariadb )
|
|
||||||
testRuntime( libraries.mssql )
|
|
||||||
testRuntime( libraries.informix )
|
|
||||||
|
|
||||||
asciidoclet 'org.asciidoctor:asciidoclet:1.+'
|
|
||||||
|
|
||||||
if (db.equalsIgnoreCase("oracle")) {
|
|
||||||
dependencies {
|
|
||||||
testRuntime( libraries.oracle ) {
|
|
||||||
exclude group: 'com.oracle.jdbc', module: 'xmlparserv2'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (db.equalsIgnoreCase("db2")) {
|
|
||||||
dependencies {
|
|
||||||
testRuntime( libraries.db2 )
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (db.equalsIgnoreCase("hana")) {
|
|
||||||
dependencies {
|
|
||||||
testRuntime( libraries.hana )
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// 6.6 gave me some NPE problems from within checkstyle...
|
|
||||||
checkstyle 'com.puppycrawl.tools:checkstyle:6.5'
|
|
||||||
}
|
|
||||||
|
|
||||||
// mac-specific stuff ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
// should really use Jvm.current().toolsJar
|
|
||||||
ext.toolsJar = file("${System.getProperty('java.home')}/../lib/tools.jar")
|
|
||||||
if ( ext.toolsJar.exists() ) {
|
|
||||||
dependencies{
|
|
||||||
testCompile files( toolsJar )
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
// compilation
|
|
||||||
compileJava.options.encoding = 'UTF-8'
|
|
||||||
|
|
||||||
tasks.withType(JavaCompile) {
|
|
||||||
options.encoding = 'UTF-8'
|
|
||||||
}
|
|
||||||
|
|
||||||
task compile
|
|
||||||
compile.dependsOn compileJava, processResources, compileTestJava, processTestResources
|
|
||||||
|
|
||||||
sourceSets.main {
|
|
||||||
compileClasspath += configurations.provided
|
|
||||||
compileClasspath += configurations.jbossLoggingTool
|
|
||||||
}
|
|
||||||
|
|
||||||
subProject.getConvention().findPlugin( JavaPluginConvention.class ).sourceSets.each { sourceSet ->
|
|
||||||
JavaCompile javaCompileTask = project.tasks.findByName( sourceSet.compileJavaTaskName ) as JavaCompile
|
|
||||||
|
|
||||||
// NOTE : this aptDir stuff is needed until we can have IntelliJ run annotation processors for us
|
|
||||||
// which cannot happen until we can fold hibernate-testing back into hibernate-core/src/test
|
|
||||||
// which cannot happen until... ugh
|
|
||||||
File aptDir = subProject.file( "${subProject.buildDir}/generated-src/apt/${sourceSet.name}" )
|
|
||||||
sourceSet.allJava.srcDir( aptDir )
|
|
||||||
|
|
||||||
javaCompileTask.options.compilerArgs += [
|
|
||||||
"-nowarn",
|
|
||||||
"-encoding", "UTF-8",
|
|
||||||
"-s", "${aptDir.absolutePath}"
|
|
||||||
]
|
|
||||||
javaCompileTask.doFirst {
|
|
||||||
aptDir.mkdirs()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
|
|
||||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
// testing
|
|
||||||
subProject.tasks.withType( Test.class ).all { task ->
|
|
||||||
if ( JavaVersion.current().isJava9Compatible() ) {
|
|
||||||
// Byteman needs this property to be set, https://developer.jboss.org/thread/274997
|
|
||||||
task.jvmArgs += ["-Djdk.attach.allowAttachSelf=true"]
|
|
||||||
}
|
|
||||||
task.jvmArgs += [
|
|
||||||
'-XX:+HeapDumpOnOutOfMemoryError',
|
|
||||||
"-XX:HeapDumpPath=${project.file( "${project.buildDir}/OOM-dump.hprof" ).absolutePath}",
|
|
||||||
'-XX:MetaspaceSize=512M'
|
|
||||||
]
|
|
||||||
|
|
||||||
task.maxHeapSize = '2G'
|
|
||||||
|
|
||||||
task.systemProperties['hibernate.test.validatefailureexpected'] = true
|
|
||||||
task.systemProperties += System.properties.findAll { it.key.startsWith( "hibernate.") }
|
|
||||||
|
|
||||||
// uncomment to help identify pauses in test executions : where they occur
|
|
||||||
// task.beforeTest { descriptor ->
|
|
||||||
// println "Starting test: " + descriptor
|
|
||||||
// }
|
|
||||||
// task.afterTest { descriptor ->
|
|
||||||
// println "Completed test: " + descriptor
|
|
||||||
// }
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
The latest versions of IntelliJ copy and use the test resources into out/test/resources
|
|
||||||
this occurs before the placeholder in the test config file are substituted
|
|
||||||
with the testing values.
|
|
||||||
|
|
||||||
This behaviour prevents the execution of the hibernate tests from inside the IDE.
|
|
||||||
|
|
||||||
A solution is to enable the 'After Build' Execution of the copyResourcesToIntelliJOutFolder task
|
|
||||||
from the 'Gradle project' IntelliJ tool window ( The task can be found under hibernate-orm > Task > other)
|
|
||||||
*/
|
|
||||||
task copyResourcesToIntelliJOutFolder(type: Copy) {
|
|
||||||
from "$subProject.buildDir/resources/test"
|
|
||||||
into 'out/test/resources'
|
|
||||||
}
|
|
||||||
|
|
||||||
processTestResources.doLast( {
|
|
||||||
copy {
|
|
||||||
from( sourceSets.test.java.srcDirs ) {
|
|
||||||
include '**/*.properties'
|
|
||||||
include '**/*.xml'
|
|
||||||
}
|
|
||||||
into sourceSets.test.output.classesDir
|
|
||||||
}
|
|
||||||
copy {
|
|
||||||
from file('src/test/resources')
|
|
||||||
into file( "${buildDir}/resources/test" )
|
|
||||||
exclude 'src/test/resources/arquillian.xml'
|
|
||||||
exclude 'src/test/resources/hibernate.properties'
|
|
||||||
}
|
|
||||||
copy {
|
|
||||||
from file('src/test/resources/hibernate.properties')
|
|
||||||
into file( "${buildDir}/resources/test" )
|
|
||||||
filter( ReplaceTokens, tokens: dbBundle[db] )
|
|
||||||
}
|
|
||||||
} )
|
|
||||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
|
|
||||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
// artifact
|
|
||||||
|
|
||||||
jar {
|
|
||||||
manifest = osgiManifest {
|
|
||||||
// GRADLE-1411: Even if we override Imports and Exports
|
|
||||||
// auto-generation with instructions, classesDir and classpath
|
|
||||||
// need to be here (temporarily).
|
|
||||||
|
|
||||||
if ( subProject.name.startsWith( 'hibernate-gradle-plugin' ) ) {
|
|
||||||
classesDir = sourceSets.main.groovy.outputDir
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
classesDir = sourceSets.main.output.classesDir
|
|
||||||
}
|
|
||||||
classpath = configurations.runtime
|
|
||||||
|
|
||||||
|
|
||||||
String moduleSimpleName = java9ModuleName( subProject )
|
|
||||||
String moduleName = "org.hibernate.orm.$moduleSimpleName"
|
|
||||||
|
|
||||||
// Java 9 module name
|
|
||||||
instruction 'Automatic-Module-Name', moduleName
|
|
||||||
|
|
||||||
// the OSGi metadata
|
|
||||||
symbolicName moduleName
|
|
||||||
vendor 'Hibernate.org'
|
|
||||||
description subProject.osgiDescription()
|
|
||||||
docURL "http://www.hibernate.org/orm/${hibernateMajorMinorVersion}"
|
|
||||||
|
|
||||||
instruction 'Import-Package',
|
|
||||||
// Temporarily support JTA 1.1 -- Karaf and other frameworks still
|
|
||||||
// use it. Without this, the plugin generates [1.2,2).
|
|
||||||
'javax.transaction;version="[1.1,2)"',
|
|
||||||
// Tell Gradle OSGi to still dynamically import the other packages.
|
|
||||||
// IMPORTANT: Do not include the * in the modules' .gradle files.
|
|
||||||
// If it exists more than once, the manifest will physically contain a *.
|
|
||||||
'*'
|
|
||||||
|
|
||||||
// Basic JAR manifest metadata
|
|
||||||
instruction 'Specification-Title', name
|
|
||||||
instruction 'Specification-Version', version
|
|
||||||
instruction 'Specification-Vendor', 'Hibernate.org'
|
|
||||||
instruction 'Implementation-Title', name
|
|
||||||
instruction 'Implementation-Version', version
|
|
||||||
instruction 'Implementation-VersionFamily', hibernateMajorMinorVersion
|
|
||||||
instruction 'Implementation-Vendor', 'Hibernate.org'
|
|
||||||
instruction 'Implementation-Vendor-Id', 'org.hibernate'
|
|
||||||
instruction 'Implementation-Url', 'http://hibernate.org/orm'
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
task sourcesJar(type: Jar, dependsOn: compileJava) {
|
|
||||||
from sourceSets.main.allSource
|
|
||||||
manifest = jar.manifest
|
|
||||||
classifier = 'sources'
|
|
||||||
}
|
|
||||||
|
|
||||||
javadoc {
|
|
||||||
exclude( "**/internal/*" )
|
|
||||||
exclude( "**/generated-src/**" )
|
|
||||||
|
|
||||||
final int currentYear = new GregorianCalendar().get( Calendar.YEAR )
|
|
||||||
|
|
||||||
configure( options ) {
|
|
||||||
docletpath = configurations.asciidoclet.files.asType(List)
|
|
||||||
doclet = 'org.asciidoctor.Asciidoclet'
|
|
||||||
|
|
||||||
windowTitle = "$subProject.name JavaDocs"
|
|
||||||
docTitle = "$subProject.name JavaDocs ($project.version)"
|
|
||||||
bottom = "Copyright © 2001-$currentYear <a href=\"http://redhat.com\">Red Hat, Inc.</a> All Rights Reserved."
|
|
||||||
use = true
|
|
||||||
encoding = 'UTF-8'
|
|
||||||
links += [
|
|
||||||
'https://docs.oracle.com/javase/8/docs/api/',
|
|
||||||
'http://docs.jboss.org/hibernate/beanvalidation/spec/2.0/api/',
|
|
||||||
'http://docs.jboss.org/cdi/api/2.0/',
|
|
||||||
'https://docs.oracle.com/javaee/7/api/'
|
|
||||||
]
|
|
||||||
|
|
||||||
if ( JavaVersion.current().isJava8Compatible() ) {
|
|
||||||
options.addStringOption( 'Xdoclint:none', '-quiet' )
|
|
||||||
}
|
|
||||||
|
|
||||||
|
// relies on the fact that subprojects will appropriately define a release task
|
||||||
|
// themselves if they have any release-related activities to perform
|
||||||
|
task release {
|
||||||
doFirst {
|
doFirst {
|
||||||
// ordering problems if we try to do this during config phase :(
|
println "Starting version $project.hibernateVersion release"
|
||||||
classpath += subProject.sourceSets.main.output + subProject.sourceSets.main.compileClasspath + subProject.configurations.provided
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
task javadocJar(type: Jar, dependsOn: javadoc) {
|
|
||||||
from tasks.javadoc.outputs
|
|
||||||
classifier = 'javadoc'
|
|
||||||
}
|
|
||||||
|
|
||||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
// IDE options
|
|
||||||
idea {
|
|
||||||
module {
|
|
||||||
jdkName = subProject.sourceCompatibility
|
|
||||||
|
|
||||||
excludeDirs = [file( ".gradle" )]
|
|
||||||
excludeDirs += file( "$buildDir/classes" )
|
|
||||||
excludeDirs += file( "$buildDir/bundles" )
|
|
||||||
excludeDirs += file( "$buildDir/packages" )
|
|
||||||
excludeDirs += file( "$buildDir/dependency-cache" )
|
|
||||||
excludeDirs += file( "$buildDir/libs" )
|
|
||||||
excludeDirs += file( "$buildDir/reports" )
|
|
||||||
excludeDirs += file( "$buildDir/test-results" )
|
|
||||||
excludeDirs += file( "$buildDir/tmp" )
|
|
||||||
excludeDirs += file( "$buildDir/matrix" )
|
|
||||||
excludeDirs += file( "$buildDir/resources" )
|
|
||||||
|
|
||||||
downloadSources = true
|
|
||||||
scopes.PROVIDED.plus += [configurations.provided]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
eclipse {
|
|
||||||
jdt {
|
|
||||||
sourceCompatibility = subProject.sourceCompatibility
|
|
||||||
targetCompatibility = subProject.targetCompatibility
|
|
||||||
}
|
|
||||||
classpath {
|
|
||||||
plusConfigurations.add( configurations.provided )
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// eclipseClasspath will not add sources to classpath unless the dirs actually exist.
|
|
||||||
// TODO: Eclipse's annotation processor handling is also fairly stupid (and completely lacks in the
|
|
||||||
// Gradle plugin). For now, just compile first in order to get the logging classes.
|
|
||||||
eclipseClasspath.dependsOn compile
|
|
||||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
|
|
||||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
// Report configs
|
|
||||||
checkstyle {
|
|
||||||
sourceSets = [ subProject.sourceSets.main ]
|
|
||||||
configFile = rootProject.file( 'shared/config/checkstyle/checkstyle.xml' )
|
|
||||||
showViolations = false
|
|
||||||
}
|
|
||||||
// exclude generated java sources - by explicitly setting the base source dir
|
|
||||||
checkstyleMain.source = 'src/main/java'
|
|
||||||
|
|
||||||
// define a second checkstyle task for checking non-fatal violations
|
|
||||||
task nonFatalCheckstyle(type:Checkstyle) {
|
|
||||||
source = subProject.sourceSets.main.java
|
|
||||||
classpath = subProject.configurations.checkstyle
|
|
||||||
showViolations = false
|
|
||||||
configFile = rootProject.file( 'shared/config/checkstyle/checkstyle-non-fatal.xml' )
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( JavaVersion.current().isJava9Compatible() ) {
|
|
||||||
logger.warn( '[WARN] Disabling findbugs, it does not support JDK 9' )
|
|
||||||
findbugs {
|
|
||||||
sourceSets = []
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
findbugs {
|
|
||||||
sourceSets = [subProject.sourceSets.main, subProject.sourceSets.test]
|
|
||||||
ignoreFailures = true
|
|
||||||
toolVersion = '3.0.1'
|
|
||||||
// for now we need to set this to low so that FindBugs will actually report the DM_CONVERT_CASE warning we care about
|
|
||||||
reportLevel = 'low'
|
|
||||||
// remove all low level bug warnings except DM_CONVERT_CASE
|
|
||||||
excludeFilterConfig = resources.text.fromString( excludeAllLowLevelBugsExcept( 'DM_CONVERT_CASE' ) )
|
|
||||||
}
|
|
||||||
|
|
||||||
// exclude generated java sources and cfg package is a mess mainly from annotation stuff
|
|
||||||
findbugsMain.doFirst {
|
|
||||||
classes = classes.filter {
|
|
||||||
!it.path.contains( 'org/hibernate/hql/internal/antlr' ) &&
|
|
||||||
!it.path.contains( 'org/hibernate/boot/jaxb/cfg/spi' ) &&
|
|
||||||
!it.path.contains( 'org/hibernate/sql/ordering/antlr/Generated' ) &&
|
|
||||||
!it.path.contains( 'org/hibernate/sql/ordering/antlr/OrderByTemplateTokenTypes' ) &&
|
|
||||||
!it.path.contains( 'org/hibernate/boot/jaxb/hbm/spi/Jaxb' ) &&
|
|
||||||
!it.path.contains( 'org/hibernate/boot/jaxb/hbm/spi/Adapter' ) &&
|
|
||||||
!it.path.contains( 'org/hibernate/boot/jaxb/hbm/spi/ObjectFactory' ) &&
|
|
||||||
!it.path.contains( 'org/hibernate/cfg' ) &&
|
|
||||||
!it.path.contains( '_\$logger' )
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// because cfg package is a mess mainly from annotation stuff
|
|
||||||
checkstyleMain.exclude '**/org/hibernate/cfg/**'
|
|
||||||
checkstyleMain.exclude '**/org/hibernate/cfg/*'
|
|
||||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
|
|
||||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
// Publishing
|
|
||||||
if ( !subProject.name.equals( 'documentation' ) && !subProject.name.equals( 'hibernate-infinispan' ) ) {
|
|
||||||
// do not configure publishing for the documentation module
|
|
||||||
publishing {
|
|
||||||
publications {
|
|
||||||
mavenJava(MavenPublication) {
|
|
||||||
from components.java
|
|
||||||
|
|
||||||
artifact( sourcesJar ) {
|
|
||||||
classifier 'sources'
|
|
||||||
}
|
|
||||||
|
|
||||||
artifact(javadocJar) {
|
|
||||||
classifier "javadoc"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// http://issues.gradle.org/browse/GRADLE-2966
|
|
||||||
// Once ^^ is resolved:
|
|
||||||
// 1) Move hibernate-testing module into hibernate-core tests
|
|
||||||
// 2) Define a second publication on hibernate-core for publishing the testing jar
|
|
||||||
// We could kind of do this now, but it would just be the jar. Every module would still need
|
|
||||||
// to duplicate the testing dependencies. Well, on second thought, we could centralize the
|
|
||||||
// testing dependencies here within the subprojects block
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
model {
|
|
||||||
tasks.generatePomFileForMavenJavaPublication {
|
|
||||||
destination = file( "$subProject.buildDir/generated-pom.xml" )
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
task release(type: Task, dependsOn: 'release:release')
|
//gradle.projectsEvaluated { g ->
|
||||||
|
// g.rootProject.subprojects { subproject ->
|
||||||
|
// Task releaseTask = subproject.tasks.findByName( 'release' )
|
||||||
|
// if ( releaseTask ) {
|
||||||
|
// releaseTask.dependsOn tasks.release
|
||||||
|
// tasks.release.dependsOn releaseTask
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//}
|
||||||
|
|
||||||
|
|
||||||
task wrapper(type: Wrapper) {
|
task wrapper(type: Wrapper) {
|
||||||
gradleVersion = expectedGradleVersion
|
gradleVersion = '4.4'
|
||||||
|
distributionType = 'ALL'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
buildScan {
|
buildScan {
|
||||||
licenseAgreementUrl = 'https://gradle.com/terms-of-service'
|
licenseAgreementUrl = 'https://gradle.com/terms-of-service'
|
||||||
licenseAgree = 'yes'
|
licenseAgree = 'yes'
|
||||||
|
@ -560,18 +84,30 @@ buildScan {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def excludeAllLowLevelBugsExcept(String[] bugTypes){
|
|
||||||
def writer = new StringWriter()
|
|
||||||
def xml = new groovy.xml.MarkupBuilder(writer);
|
|
||||||
xml.FindBugsFilter {
|
|
||||||
Match {
|
|
||||||
Confidence( value: '3' )
|
//idea {
|
||||||
bugTypes.each { bug ->
|
// project {
|
||||||
Not {
|
// jdkName = baselineJavaVersion
|
||||||
Bug( pattern: "${bug}" )
|
// languageLevel = baselineJavaVersion
|
||||||
}
|
//
|
||||||
}
|
// vcs = 'Git'
|
||||||
}
|
// }
|
||||||
}
|
// module {
|
||||||
return writer.toString( )
|
// name = "hibernate-orm"
|
||||||
}
|
// }
|
||||||
|
//}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//allprojects {
|
||||||
|
// apply plugin: 'idea'
|
||||||
|
// apply plugin: 'eclipse'
|
||||||
|
//}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -7,16 +7,25 @@ import org.asciidoctor.gradle.AsciidoctorTask
|
||||||
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
|
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
|
||||||
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
|
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
|
||||||
*/
|
*/
|
||||||
buildscript {
|
|
||||||
repositories {
|
ext {
|
||||||
jcenter()
|
projectsToSkipWhenAggregatingJavadocs = [
|
||||||
}
|
'documentation',
|
||||||
dependencies {
|
'hibernate-entitymanager',
|
||||||
classpath 'org.asciidoctor:asciidoctor-gradle-plugin:1.5.2'
|
'hibernate-infinispan',
|
||||||
|
'hibernate-java8',
|
||||||
|
'hibernate-orm-modules',
|
||||||
|
'release'
|
||||||
|
]
|
||||||
|
}
|
||||||
|
rootProject.subprojects { subproject ->
|
||||||
|
if ( !this.projectsToSkipWhenAggregatingJavadocs.contains( subproject.name ) ) {
|
||||||
|
this.evaluationDependsOn( subproject.path )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
apply plugin: "java"
|
apply from: rootProject.file( 'gradle/java-module.gradle' )
|
||||||
|
|
||||||
apply plugin: 'org.asciidoctor.convert'
|
apply plugin: 'org.asciidoctor.convert'
|
||||||
|
|
||||||
apply plugin: 'hibernate-matrix-testing'
|
apply plugin: 'hibernate-matrix-testing'
|
||||||
|
@ -50,31 +59,6 @@ dependencies {
|
||||||
testRuntime( libraries.mssql )
|
testRuntime( libraries.mssql )
|
||||||
|
|
||||||
testCompile "org.osgi:org.osgi.core:4.3.1"
|
testCompile "org.osgi:org.osgi.core:4.3.1"
|
||||||
|
|
||||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
// Java 9 ftw!
|
|
||||||
if ( JavaVersion.current().isJava9Compatible() ) {
|
|
||||||
// The JDK used to run Gradle is Java 9+, and we assume that that is the same
|
|
||||||
// JDK for executing tasks
|
|
||||||
compile( 'com.sun.xml.bind:jaxb-impl:2.2.11' )
|
|
||||||
compile( 'org.glassfish.jaxb:jaxb-xjc:2.2.11' )
|
|
||||||
compile( 'org.jvnet.jaxb2_commons:jaxb2-basics:0.11.0' )
|
|
||||||
compile( 'org.jvnet.jaxb2_commons:jaxb2-basics-ant:0.11.0' )
|
|
||||||
compile( 'javax:javaee-api:7.0' )
|
|
||||||
|
|
||||||
testCompile( 'com.sun.xml.bind:jaxb-impl:2.2.11' )
|
|
||||||
testCompile( 'org.glassfish.jaxb:jaxb-xjc:2.2.11' )
|
|
||||||
testCompile( 'org.jvnet.jaxb2_commons:jaxb2-basics:0.11.0' )
|
|
||||||
testCompile( 'org.jvnet.jaxb2_commons:jaxb2-basics-ant:0.11.0' )
|
|
||||||
testCompile( 'javax:javaee-api:7.0' )
|
|
||||||
|
|
||||||
testRuntime( 'com.sun.xml.bind:jaxb-impl:2.2.11' )
|
|
||||||
testRuntime( 'org.glassfish.jaxb:jaxb-xjc:2.2.11' )
|
|
||||||
testRuntime( 'org.jvnet.jaxb2_commons:jaxb2-basics:0.11.0' )
|
|
||||||
testRuntime( 'org.jvnet.jaxb2_commons:jaxb2-basics-ant:0.11.0' )
|
|
||||||
testRuntime( 'javax:javaee-api:7.0' )
|
|
||||||
}
|
|
||||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -103,8 +87,6 @@ final File javadocDir = mkdir( new File( (File) project.buildDir, 'javadocs' ) )
|
||||||
* Builds the JavaDocs aggregated (unified) across all the sub-projects
|
* Builds the JavaDocs aggregated (unified) across all the sub-projects
|
||||||
*/
|
*/
|
||||||
task aggregateJavadocs(type: Javadoc) {
|
task aggregateJavadocs(type: Javadoc) {
|
||||||
String[] projectsToSkip = ['release','documentation', 'hibernate-orm-modules']
|
|
||||||
|
|
||||||
description = 'Builds the aggregated (unified) JavaDocs across all sub-projects'
|
description = 'Builds the aggregated (unified) JavaDocs across all sub-projects'
|
||||||
|
|
||||||
final int currentYear = new GregorianCalendar().get( Calendar.YEAR )
|
final int currentYear = new GregorianCalendar().get( Calendar.YEAR )
|
||||||
|
@ -142,15 +124,13 @@ task aggregateJavadocs(type: Javadoc) {
|
||||||
// 2) classpath
|
// 2) classpath
|
||||||
parent.subprojects.each { Project subProject->
|
parent.subprojects.each { Project subProject->
|
||||||
// skip certain sub-projects
|
// skip certain sub-projects
|
||||||
if ( projectsToSkip.contains( subProject.name ) ) {
|
if ( ! projectsToSkipWhenAggregatingJavadocs.contains( subProject.name ) ) {
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// we only care about the main SourceSet...
|
// we only care about the main SourceSet...
|
||||||
source subProject.sourceSets.main.java
|
source subProject.sourceSets.main.java
|
||||||
|
|
||||||
classpath += subProject.sourceSets.main.output + subProject.sourceSets.main.compileClasspath + subProject.configurations.provided
|
classpath += subProject.sourceSets.main.output + subProject.sourceSets.main.compileClasspath + subProject.configurations.provided
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
asciidoctor {
|
asciidoctor {
|
||||||
|
@ -167,7 +147,7 @@ task renderTopicalGuides(type: AsciidoctorTask, group: 'Documentation') {
|
||||||
backends "html5"
|
backends "html5"
|
||||||
separateOutputDirs false
|
separateOutputDirs false
|
||||||
options logDocuments: true
|
options logDocuments: true
|
||||||
attributes icons: 'font', experimental: true, 'source-highlighter': 'prettify', majorMinorVersion: rootProject.hibernateMajorMinorVersion, fullVersion: rootProject.hibernateFullVersion
|
attributes icons: 'font', experimental: true, 'source-highlighter': 'prettify', majorMinorVersion: rootProject.hibernateMajorMinorVersion, fullVersion: rootProject.hibernateVersion
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -191,8 +171,8 @@ task buildTutorialZip(type: Zip) {
|
||||||
expand(
|
expand(
|
||||||
version: project.version,
|
version: project.version,
|
||||||
slf4j: "1.7.5",
|
slf4j: "1.7.5",
|
||||||
junit: parent.junitVersion,
|
junit: project.junitVersion,
|
||||||
h2: parent.h2Version
|
h2: project.h2Version
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -233,7 +213,7 @@ task renderUserGuide(type: AsciidoctorTask, group: 'Documentation') {
|
||||||
linkcss: true,
|
linkcss: true,
|
||||||
stylesheet: "css/hibernate.css",
|
stylesheet: "css/hibernate.css",
|
||||||
majorMinorVersion: rootProject.hibernateMajorMinorVersion,
|
majorMinorVersion: rootProject.hibernateMajorMinorVersion,
|
||||||
fullVersion: rootProject.hibernateFullVersion,
|
fullVersion: rootProject.hibernateVersion,
|
||||||
docinfo: true
|
docinfo: true
|
||||||
|
|
||||||
resources {
|
resources {
|
||||||
|
@ -292,3 +272,4 @@ buildDocsForPublishing.dependsOn renderUserGuide
|
||||||
buildDocsForPublishing.dependsOn renderIntegrationGuide
|
buildDocsForPublishing.dependsOn renderIntegrationGuide
|
||||||
|
|
||||||
checkstyleMain.exclude '**/org/hibernate/userguide/model/*'
|
checkstyleMain.exclude '**/org/hibernate/userguide/model/*'
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,35 @@
|
||||||
|
/*
|
||||||
|
* Hibernate, Relational Persistence for Idiomatic Java
|
||||||
|
*
|
||||||
|
* License: GNU Lesser General Public License (LGPL), version 2.1 or later
|
||||||
|
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* Hibernate, Relational Persistence for Idiomatic Java
|
||||||
|
*
|
||||||
|
* License: GNU Lesser General Public License (LGPL), version 2.1 or later
|
||||||
|
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* Hibernate, Relational Persistence for Idiomatic Java
|
||||||
|
*
|
||||||
|
* License: GNU Lesser General Public License (LGPL), version 2.1 or later
|
||||||
|
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html
|
||||||
|
*/
|
||||||
|
|
||||||
|
apply plugin: 'base'
|
||||||
|
|
||||||
|
ext {
|
||||||
|
hibernateVersion = '5.3.0-SNAPSHOT'
|
||||||
|
baselineJavaVersion = '1.8'
|
||||||
|
jpaVersion = '2.2'
|
||||||
|
|
||||||
|
final String[] hibernateVersionComponents = project.hibernateVersion.split( '\\.' )
|
||||||
|
hibernateMajorMinorVersion = hibernateVersionComponents[0] + '.' + hibernateVersionComponents[1]
|
||||||
|
hibernateMajorVersion = hibernateVersionComponents[0]
|
||||||
|
|
||||||
|
isSnapshot = project.hibernateVersion.endsWith( "-SNAPSHOT" )
|
||||||
|
}
|
||||||
|
|
||||||
|
group = 'org.hibernate'
|
||||||
|
version = project.hibernateVersion
|
|
@ -0,0 +1,454 @@
|
||||||
|
/*
|
||||||
|
* Hibernate, Relational Persistence for Idiomatic Java
|
||||||
|
*
|
||||||
|
* License: GNU Lesser General Public License (LGPL), version 2.1 or later
|
||||||
|
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* Hibernate, Relational Persistence for Idiomatic Java
|
||||||
|
*
|
||||||
|
* License: GNU Lesser General Public License (LGPL), version 2.1 or later
|
||||||
|
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html
|
||||||
|
*/
|
||||||
|
import org.apache.tools.ant.filters.ReplaceTokens
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Support for modules that contain Java code
|
||||||
|
*/
|
||||||
|
|
||||||
|
apply from: rootProject.file( 'gradle/base-information.gradle' )
|
||||||
|
apply from: rootProject.file( 'gradle/libraries.gradle' )
|
||||||
|
apply from: rootProject.file( 'gradle/databases.gradle' )
|
||||||
|
|
||||||
|
apply plugin: 'java'
|
||||||
|
apply plugin: 'osgi'
|
||||||
|
|
||||||
|
apply plugin: 'findbugs'
|
||||||
|
apply plugin: 'checkstyle'
|
||||||
|
apply plugin: 'build-dashboard'
|
||||||
|
apply plugin: 'project-report'
|
||||||
|
|
||||||
|
ext {
|
||||||
|
java9ModuleNameBase = project.name.startsWith( 'hibernate-' ) ? name.drop( 'hibernate-'.length() ): name
|
||||||
|
java9ModuleName = "org.hibernate.orm.$project.java9ModuleNameBase"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
sourceCompatibility = project.baselineJavaVersion
|
||||||
|
targetCompatibility = project.baselineJavaVersion
|
||||||
|
|
||||||
|
afterEvaluate {
|
||||||
|
if ( !project.description ) {
|
||||||
|
project.description = "The Hibernate ORM $project.name module"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
// Configurations and Dependencies
|
||||||
|
|
||||||
|
configurations {
|
||||||
|
provided {
|
||||||
|
description = 'Non-exported compile-time dependencies.'
|
||||||
|
}
|
||||||
|
jbossLoggingTool {
|
||||||
|
description = 'Dependencies for running the jboss-logging tooling.'
|
||||||
|
}
|
||||||
|
asciidoclet {
|
||||||
|
description = "Dependencies for Asciidoctor Javadoc taglet"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
configurations.all*.exclude group: 'xml-apis', module: 'xml-apis'
|
||||||
|
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
compile libraries.logging
|
||||||
|
|
||||||
|
provided libraries.logging_annotations
|
||||||
|
|
||||||
|
jbossLoggingTool( libraries.logging_processor )
|
||||||
|
|
||||||
|
testCompile( libraries.junit )
|
||||||
|
testCompile( libraries.byteman )
|
||||||
|
testCompile( libraries.byteman_install )
|
||||||
|
testCompile( libraries.byteman_bmunit )
|
||||||
|
|
||||||
|
testRuntime( libraries.log4j )
|
||||||
|
testRuntime( libraries.javassist )
|
||||||
|
testRuntime( libraries.byteBuddy )
|
||||||
|
testRuntime( libraries.woodstox )
|
||||||
|
|
||||||
|
//Databases
|
||||||
|
testRuntime( libraries.h2 )
|
||||||
|
testRuntime( libraries.hsqldb )
|
||||||
|
testRuntime( libraries.postgresql )
|
||||||
|
testRuntime( libraries.mysql )
|
||||||
|
testRuntime( libraries.mariadb )
|
||||||
|
testRuntime( libraries.mssql )
|
||||||
|
testRuntime( libraries.informix )
|
||||||
|
|
||||||
|
asciidoclet 'org.asciidoctor:asciidoclet:1.+'
|
||||||
|
|
||||||
|
if ( db.equalsIgnoreCase( 'oracle' ) ) {
|
||||||
|
testRuntime( libraries.oracle ) {
|
||||||
|
exclude group: 'com.oracle.jdbc', module: 'xmlparserv2'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if ( db.equalsIgnoreCase( 'db2' ) ) {
|
||||||
|
testRuntime( libraries.db2 )
|
||||||
|
}
|
||||||
|
else if ( db.equalsIgnoreCase( 'hana' ) ) {
|
||||||
|
testRuntime( libraries.hana )
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
// Java 9 ftw!
|
||||||
|
if ( JavaVersion.current().isJava9Compatible() ) {
|
||||||
|
// The JDK used to run Gradle is Java 9+, and we assume that that is the same
|
||||||
|
// JDK for executing tasks
|
||||||
|
compile( 'com.sun.xml.bind:jaxb-impl:2.2.11' )
|
||||||
|
compile( 'org.glassfish.jaxb:jaxb-xjc:2.2.11' )
|
||||||
|
compile( 'org.jvnet.jaxb2_commons:jaxb2-basics:0.11.0' )
|
||||||
|
compile( 'org.jvnet.jaxb2_commons:jaxb2-basics-ant:0.11.0' )
|
||||||
|
compile( 'javax:javaee-api:7.0' )
|
||||||
|
|
||||||
|
testCompile( 'com.sun.xml.bind:jaxb-impl:2.2.11' )
|
||||||
|
testCompile( 'org.glassfish.jaxb:jaxb-xjc:2.2.11' )
|
||||||
|
testCompile( 'org.jvnet.jaxb2_commons:jaxb2-basics:0.11.0' )
|
||||||
|
testCompile( 'org.jvnet.jaxb2_commons:jaxb2-basics-ant:0.11.0' )
|
||||||
|
testCompile( 'javax:javaee-api:7.0' )
|
||||||
|
|
||||||
|
testRuntime( 'com.sun.xml.bind:jaxb-impl:2.2.11' )
|
||||||
|
testRuntime( 'org.glassfish.jaxb:jaxb-xjc:2.2.11' )
|
||||||
|
testRuntime( 'org.jvnet.jaxb2_commons:jaxb2-basics:0.11.0' )
|
||||||
|
testRuntime( 'org.jvnet.jaxb2_commons:jaxb2-basics-ant:0.11.0' )
|
||||||
|
testRuntime( 'javax:javaee-api:7.0' )
|
||||||
|
}
|
||||||
|
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
|
||||||
|
// Mac-specific
|
||||||
|
project.ext.toolsJar = file("${System.getProperty('java.home')}/../lib/tools.jar")
|
||||||
|
if ( project.toolsJar.exists() ) {
|
||||||
|
testCompile files( project.toolsJar )
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
// Compilation
|
||||||
|
|
||||||
|
tasks.withType(JavaCompile) {
|
||||||
|
options.encoding = 'UTF-8'
|
||||||
|
}
|
||||||
|
|
||||||
|
task compile(dependsOn: [compileJava, processResources, compileTestJava, processTestResources] )
|
||||||
|
|
||||||
|
sourceSets.main {
|
||||||
|
compileClasspath += configurations.provided
|
||||||
|
compileClasspath += configurations.jbossLoggingTool
|
||||||
|
}
|
||||||
|
|
||||||
|
convention.findPlugin( JavaPluginConvention.class ).sourceSets.each { sourceSet ->
|
||||||
|
JavaCompile javaCompileTask = project.tasks.findByName( sourceSet.compileJavaTaskName ) as JavaCompile
|
||||||
|
|
||||||
|
// NOTE : this aptDir stuff is needed until we can have IntelliJ run annotation processors for us
|
||||||
|
// which cannot happen until we can fold hibernate-testing back into hibernate-core/src/test
|
||||||
|
// which cannot happen until... ugh
|
||||||
|
File aptDir = file( "${buildDir}/generated-src/apt/${sourceSet.name}" )
|
||||||
|
sourceSet.allJava.srcDir( aptDir )
|
||||||
|
|
||||||
|
javaCompileTask.options.compilerArgs += [
|
||||||
|
"-nowarn",
|
||||||
|
"-encoding", "UTF-8",
|
||||||
|
"-s", "${aptDir.absolutePath}"
|
||||||
|
]
|
||||||
|
|
||||||
|
javaCompileTask.doFirst {
|
||||||
|
aptDir.mkdirs()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
// mac-specific stuff
|
||||||
|
final File toolsJar = file("${System.getProperty('java.home')}/../lib/tools.jar")
|
||||||
|
if ( ext.toolsJar.exists() ) {
|
||||||
|
dependencies{
|
||||||
|
testCompile files( toolsJar )
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
// Testing
|
||||||
|
|
||||||
|
tasks.withType( Test.class ).all { task ->
|
||||||
|
if ( JavaVersion.current().isJava9Compatible() ) {
|
||||||
|
// Byteman needs this property to be set, https://developer.jboss.org/thread/274997
|
||||||
|
task.jvmArgs += ["-Djdk.attach.allowAttachSelf=true"]
|
||||||
|
}
|
||||||
|
task.jvmArgs += [
|
||||||
|
'-XX:+HeapDumpOnOutOfMemoryError',
|
||||||
|
"-XX:HeapDumpPath=${file( "${buildDir}/OOM-dump.hprof" ).absolutePath}",
|
||||||
|
'-XX:MetaspaceSize=512M'
|
||||||
|
]
|
||||||
|
|
||||||
|
task.maxHeapSize = '2G'
|
||||||
|
|
||||||
|
task.systemProperties['hibernate.test.validatefailureexpected'] = true
|
||||||
|
task.systemProperties += System.properties.findAll { it.key.startsWith( "hibernate." ) }
|
||||||
|
}
|
||||||
|
|
||||||
|
processTestResources {
|
||||||
|
doLast {
|
||||||
|
copy {
|
||||||
|
from( sourceSets.test.java.srcDirs ) {
|
||||||
|
include '**/*.properties'
|
||||||
|
include '**/*.xml'
|
||||||
|
}
|
||||||
|
into sourceSets.test.output.classesDir
|
||||||
|
}
|
||||||
|
copy {
|
||||||
|
from file( 'src/test/resources' )
|
||||||
|
into file( "${buildDir}/resources/test" )
|
||||||
|
exclude 'src/test/resources/arquillian.xml'
|
||||||
|
exclude 'src/test/resources/hibernate.properties'
|
||||||
|
}
|
||||||
|
copy {
|
||||||
|
from file( 'src/test/resources/hibernate.properties' )
|
||||||
|
into file( "${buildDir}/resources/test" )
|
||||||
|
filter( ReplaceTokens, tokens: dbBundle[db] )
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
// Packaging
|
||||||
|
|
||||||
|
jar {
|
||||||
|
manifest = osgiManifest {
|
||||||
|
// GRADLE-1411: Even if we override Imports and Exports
|
||||||
|
// auto-generation with instructions, classesDir and classpath
|
||||||
|
// need to be here (temporarily).
|
||||||
|
|
||||||
|
if ( project.pluginManager.hasPlugin( 'groovy' ) ) {
|
||||||
|
classesDir = sourceSets.main.groovy.outputDir
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
classesDir = sourceSets.main.output.classesDir
|
||||||
|
}
|
||||||
|
classpath = configurations.runtime
|
||||||
|
|
||||||
|
|
||||||
|
// Java 9 module name
|
||||||
|
instruction 'Automatic-Module-Name', project.java9ModuleName
|
||||||
|
|
||||||
|
// the OSGi metadata
|
||||||
|
symbolicName project.java9ModuleName
|
||||||
|
vendor 'Hibernate.org'
|
||||||
|
description project.description
|
||||||
|
docURL "http://www.hibernate.org/orm/${project.hibernateMajorMinorVersion}"
|
||||||
|
|
||||||
|
instruction 'Import-Package',
|
||||||
|
// Temporarily support JTA 1.1 -- Karaf and other frameworks still
|
||||||
|
// use it. Without this, the plugin generates [1.2,2).
|
||||||
|
'javax.transaction;version="[1.1,2)"',
|
||||||
|
// Tell Gradle OSGi to still dynamically import the other packages.
|
||||||
|
// IMPORTANT: Do not include the * in the modules' .gradle files.
|
||||||
|
// If it exists more than once, the manifest will physically contain a *.
|
||||||
|
'*'
|
||||||
|
|
||||||
|
// Basic JAR manifest metadata
|
||||||
|
instruction 'Specification-Title', project.name
|
||||||
|
instruction 'Specification-Version', project.version
|
||||||
|
instruction 'Specification-Vendor', 'Hibernate.org'
|
||||||
|
instruction 'Implementation-Title', project.name
|
||||||
|
instruction 'Implementation-Version', project.version
|
||||||
|
instruction 'Implementation-Vendor', 'Hibernate.org'
|
||||||
|
instruction 'Implementation-Vendor-Id', 'org.hibernate'
|
||||||
|
instruction 'Implementation-Url', 'http://hibernate.org/orm'
|
||||||
|
|
||||||
|
instruction 'Hibernate-VersionFamily', project.hibernateMajorMinorVersion
|
||||||
|
instruction 'Hibernate-JpaVersion', project.jpaVersion
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
// Javadoc
|
||||||
|
|
||||||
|
javadoc {
|
||||||
|
exclude( "**/internal/*" )
|
||||||
|
exclude( "**/generated-src/**" )
|
||||||
|
|
||||||
|
final int currentYear = new GregorianCalendar().get( Calendar.YEAR )
|
||||||
|
|
||||||
|
configure( options ) {
|
||||||
|
docletpath = configurations.asciidoclet.files.asType(List)
|
||||||
|
doclet = 'org.asciidoctor.Asciidoclet'
|
||||||
|
|
||||||
|
windowTitle = "$project.name JavaDocs"
|
||||||
|
docTitle = "$project.name JavaDocs ($project.version)"
|
||||||
|
bottom = "Copyright © 2001-$currentYear <a href=\"http://redhat.com\">Red Hat, Inc.</a> All Rights Reserved."
|
||||||
|
use = true
|
||||||
|
encoding = 'UTF-8'
|
||||||
|
links += [
|
||||||
|
'https://docs.oracle.com/javase/8/docs/api/',
|
||||||
|
'http://docs.jboss.org/hibernate/beanvalidation/spec/2.0/api/',
|
||||||
|
'http://docs.jboss.org/cdi/api/2.0/',
|
||||||
|
'https://docs.oracle.com/javaee/7/api/'
|
||||||
|
]
|
||||||
|
|
||||||
|
if ( JavaVersion.current().isJava8Compatible() ) {
|
||||||
|
options.addStringOption( 'Xdoclint:none', '-quiet' )
|
||||||
|
}
|
||||||
|
|
||||||
|
doFirst {
|
||||||
|
// ordering problems if we try to do this during config phase :(
|
||||||
|
classpath += project.sourceSets.main.output + project.sourceSets.main.compileClasspath + project.configurations.provided
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
// IDE
|
||||||
|
|
||||||
|
|
||||||
|
//idea {
|
||||||
|
// module {
|
||||||
|
// jdkName = project.sourceCompatibility
|
||||||
|
//
|
||||||
|
// excludeDirs = [file( ".gradle" )]
|
||||||
|
// excludeDirs += file( "$buildDir/classes" )
|
||||||
|
// excludeDirs += file( "$buildDir/bundles" )
|
||||||
|
// excludeDirs += file( "$buildDir/packages" )
|
||||||
|
// excludeDirs += file( "$buildDir/dependency-cache" )
|
||||||
|
// excludeDirs += file( "$buildDir/libs" )
|
||||||
|
// excludeDirs += file( "$buildDir/reports" )
|
||||||
|
// excludeDirs += file( "$buildDir/test-results" )
|
||||||
|
// excludeDirs += file( "$buildDir/tmp" )
|
||||||
|
// excludeDirs += file( "$buildDir/matrix" )
|
||||||
|
// excludeDirs += file( "$buildDir/resources" )
|
||||||
|
//
|
||||||
|
// downloadSources = true
|
||||||
|
// scopes.PROVIDED.plus += [configurations.provided]
|
||||||
|
// }
|
||||||
|
//}
|
||||||
|
//
|
||||||
|
/*
|
||||||
|
The latest versions of IntelliJ copy and use the test resources into out/test/resources
|
||||||
|
this occurs before the placeholder in the test config file are substituted
|
||||||
|
with the testing values.
|
||||||
|
|
||||||
|
This behaviour prevents the execution of the hibernate tests from inside the IDE.
|
||||||
|
|
||||||
|
A solution is to enable the 'After Build' Execution of the copyResourcesToIntelliJOutFolder task
|
||||||
|
from the 'Gradle project' IntelliJ tool window ( The task can be found under hibernate-orm > Task > other)
|
||||||
|
*/
|
||||||
|
task copyResourcesToIntelliJOutFolder {
|
||||||
|
doLast {
|
||||||
|
copy {
|
||||||
|
from "$buildDir/resources/test"
|
||||||
|
into 'out/test/resources'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//eclipse {
|
||||||
|
// jdt {
|
||||||
|
// sourceCompatibility = project.sourceCompatibility
|
||||||
|
// targetCompatibility = project.targetCompatibility
|
||||||
|
// }
|
||||||
|
// classpath {
|
||||||
|
// plusConfigurations.add( configurations.provided )
|
||||||
|
// }
|
||||||
|
//}
|
||||||
|
//
|
||||||
|
//// eclipseClasspath will not add sources to classpath unless the dirs actually exist.
|
||||||
|
//// TODO: Eclipse's annotation processor handling is also fairly stupid (and completely lacks in the
|
||||||
|
//// Gradle plugin). For now, just compile first in order to get the logging classes.
|
||||||
|
//eclipseClasspath.dependsOn compile
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
// Report configs
|
||||||
|
|
||||||
|
checkstyle {
|
||||||
|
sourceSets = [ project.sourceSets.main ]
|
||||||
|
configFile = rootProject.file( 'shared/config/checkstyle/checkstyle.xml' )
|
||||||
|
showViolations = false
|
||||||
|
}
|
||||||
|
// exclude generated java sources - by explicitly setting the base source dir
|
||||||
|
checkstyleMain.source = 'src/main/java'
|
||||||
|
|
||||||
|
// define a second checkstyle task for checking non-fatal violations
|
||||||
|
task nonFatalCheckstyle(type:Checkstyle) {
|
||||||
|
source = project.sourceSets.main.java
|
||||||
|
classpath = project.configurations.checkstyle
|
||||||
|
showViolations = false
|
||||||
|
configFile = rootProject.file( 'shared/config/checkstyle/checkstyle-non-fatal.xml' )
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( JavaVersion.current().isJava9Compatible() ) {
|
||||||
|
logger.warn( '[WARN] Disabling findbugs, it does not support JDK 9' )
|
||||||
|
findbugs {
|
||||||
|
sourceSets = []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
findbugs {
|
||||||
|
sourceSets = [project.sourceSets.main, project.sourceSets.test]
|
||||||
|
ignoreFailures = true
|
||||||
|
toolVersion = '3.0.1'
|
||||||
|
// for now we need to set this to low so that FindBugs will actually report the DM_CONVERT_CASE warning we care about
|
||||||
|
reportLevel = 'low'
|
||||||
|
// remove all low level bug warnings except DM_CONVERT_CASE
|
||||||
|
excludeFilterConfig = resources.text.fromString( excludeAllLowLevelBugsExcept( 'DM_CONVERT_CASE' ) )
|
||||||
|
}
|
||||||
|
|
||||||
|
// exclude generated java sources and cfg package is a mess mainly from annotation stuff
|
||||||
|
findbugsMain.doFirst {
|
||||||
|
classes = classes.filter {
|
||||||
|
!it.path.contains( 'org/hibernate/hql/internal/antlr' ) &&
|
||||||
|
!it.path.contains( 'org/hibernate/boot/jaxb/cfg/spi' ) &&
|
||||||
|
!it.path.contains( 'org/hibernate/sql/ordering/antlr/Generated' ) &&
|
||||||
|
!it.path.contains( 'org/hibernate/sql/ordering/antlr/OrderByTemplateTokenTypes' ) &&
|
||||||
|
!it.path.contains( 'org/hibernate/boot/jaxb/hbm/spi/Jaxb' ) &&
|
||||||
|
!it.path.contains( 'org/hibernate/boot/jaxb/hbm/spi/Adapter' ) &&
|
||||||
|
!it.path.contains( 'org/hibernate/boot/jaxb/hbm/spi/ObjectFactory' ) &&
|
||||||
|
!it.path.contains( 'org/hibernate/cfg' ) &&
|
||||||
|
!it.path.contains( '_\$logger' )
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// because cfg package is a mess mainly from annotation stuff
|
||||||
|
checkstyleMain.exclude '**/org/hibernate/cfg/**'
|
||||||
|
checkstyleMain.exclude '**/org/hibernate/cfg/*'
|
||||||
|
|
||||||
|
def excludeAllLowLevelBugsExcept(String[] bugTypes){
|
||||||
|
def writer = new StringWriter()
|
||||||
|
def xml = new groovy.xml.MarkupBuilder(writer);
|
||||||
|
xml.FindBugsFilter {
|
||||||
|
Match {
|
||||||
|
Confidence( value: '3' )
|
||||||
|
bugTypes.each { bug ->
|
||||||
|
Not {
|
||||||
|
Bug( pattern: "${bug}" )
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return writer.toString( )
|
||||||
|
}
|
|
@ -0,0 +1,117 @@
|
||||||
|
/*
|
||||||
|
* Hibernate, Relational Persistence for Idiomatic Java
|
||||||
|
*
|
||||||
|
* License: GNU Lesser General Public License (LGPL), version 2.1 or later
|
||||||
|
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html
|
||||||
|
*/
|
||||||
|
|
||||||
|
apply from: rootProject.file( 'gradle/java-module.gradle' )
|
||||||
|
apply plugin: 'maven-publish'
|
||||||
|
apply plugin: 'maven-publish-auth'
|
||||||
|
apply from: rootProject.file( 'gradle/publishing-repos.gradle' )
|
||||||
|
|
||||||
|
|
||||||
|
task sourcesJar(type: Jar) {
|
||||||
|
from project.sourceSets.main.allSource
|
||||||
|
manifest = project.tasks.jar.manifest
|
||||||
|
classifier = 'sources'
|
||||||
|
}
|
||||||
|
|
||||||
|
task javadocJar(type: Jar) {
|
||||||
|
from project.tasks.javadoc.outputs
|
||||||
|
manifest = project.tasks.jar.manifest
|
||||||
|
classifier = 'javadoc'
|
||||||
|
}
|
||||||
|
|
||||||
|
publishing {
|
||||||
|
publications {
|
||||||
|
publishedArtifacts( MavenPublication ) {
|
||||||
|
from components.java
|
||||||
|
|
||||||
|
artifact( sourcesJar ) {
|
||||||
|
// todo : do these really need to be specified twice?
|
||||||
|
classifier 'sources'
|
||||||
|
}
|
||||||
|
|
||||||
|
artifact( javadocJar ) {
|
||||||
|
// todo : do these really need to be specified twice?
|
||||||
|
classifier "javadoc"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
model {
|
||||||
|
tasks.generatePomFileForPublishedArtifactsPublication {
|
||||||
|
destination = file( "${buildDir}/generated-pom.xml" )
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
task generatePomFile( dependsOn: 'generatePomFileForPublishedArtifactsPublication' )
|
||||||
|
|
||||||
|
task release( dependsOn: publish ) {
|
||||||
|
doFirst {
|
||||||
|
println "Starting release for $project.name:$project.version"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
afterEvaluate {
|
||||||
|
|
||||||
|
// delay pom customization until project evaluation is complete
|
||||||
|
|
||||||
|
PublishingExtension gradlePublishingExtension = project.extensions.getByType( PublishingExtension )
|
||||||
|
|
||||||
|
Set<MavenPublication> mavenPublications = gradlePublishingExtension.publications.withType( MavenPublication )
|
||||||
|
if ( mavenPublications.size() <= 0 || mavenPublications.size() > 1 ) {
|
||||||
|
throw new GradleException( "Expecting just a single MavenPublication [$project.path], but found " + mavenPublications.size() + " : " + mavenPublications*.name )
|
||||||
|
}
|
||||||
|
|
||||||
|
project.configure( mavenPublications.first() ) {
|
||||||
|
pom.withXml {
|
||||||
|
asNode().appendNode( 'name', "Hibernate ORM - $project.name" )
|
||||||
|
asNode().appendNode( 'description', project.description )
|
||||||
|
|
||||||
|
Node lgplLicenseNode = asNode().appendNode( "licenses" ).appendNode( "license" )
|
||||||
|
lgplLicenseNode.appendNode( 'name', 'GNU Lesser General Public License' )
|
||||||
|
lgplLicenseNode.appendNode( 'url', 'http://www.gnu.org/licenses/lgpl-2.1.html' )
|
||||||
|
lgplLicenseNode.appendNode(
|
||||||
|
'comments',
|
||||||
|
'See discussion at http://hibernate.org/license for more details.'
|
||||||
|
)
|
||||||
|
lgplLicenseNode.appendNode( 'distribution', 'repo' )
|
||||||
|
|
||||||
|
asNode().children().last() + {
|
||||||
|
url 'http://hibernate.org'
|
||||||
|
organization {
|
||||||
|
name 'Hibernate.org'
|
||||||
|
url 'http://hibernate.org'
|
||||||
|
}
|
||||||
|
issueManagement {
|
||||||
|
system 'jira'
|
||||||
|
url 'https://hibernate.atlassian.net/browse/HHH'
|
||||||
|
}
|
||||||
|
scm {
|
||||||
|
url 'http://github.com/hibernate/hibernate-orm'
|
||||||
|
connection 'scm:git:http://github.com/hibernate/hibernate-orm.git'
|
||||||
|
developerConnection 'scm:git:git@github.com:hibernate/hibernate-orm.git'
|
||||||
|
}
|
||||||
|
developers {
|
||||||
|
developer {
|
||||||
|
id 'hibernate-team'
|
||||||
|
name 'The Hibernate Development Team'
|
||||||
|
organization 'Hibernate.org'
|
||||||
|
organizationUrl 'http://hibernate.org'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// TEMPORARY : currently Gradle Publishing feature is exporting dependencies as 'runtime' scope,
|
||||||
|
// rather than 'compile'; fix that.
|
||||||
|
if ( asNode().dependencies != null && asNode().dependencies.size() > 0 ) {
|
||||||
|
asNode().dependencies[0].dependency.each {
|
||||||
|
it.scope[0].value = 'compile'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,25 @@
|
||||||
|
/*
|
||||||
|
* Hibernate, Relational Persistence for Idiomatic Java
|
||||||
|
*
|
||||||
|
* License: GNU Lesser General Public License (LGPL), version 2.1 or later
|
||||||
|
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html
|
||||||
|
*/
|
||||||
|
|
||||||
|
project.afterEvaluate {
|
||||||
|
publishing {
|
||||||
|
repositories {
|
||||||
|
if ( project.isSnapshot ) {
|
||||||
|
maven {
|
||||||
|
name 'jboss-snapshots-repository'
|
||||||
|
url 'https://repository.jboss.org/nexus/content/repositories/snapshots'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
maven {
|
||||||
|
name 'jboss-releases-repository'
|
||||||
|
url 'https://repository.jboss.org/nexus/service/local/staging/deploy/maven2/'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -4,6 +4,11 @@
|
||||||
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
|
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
|
||||||
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
|
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
apply from: rootProject.file( 'gradle/published-java-module.gradle' )
|
||||||
|
|
||||||
|
description = 'Integration for c3p0 Connection pooling into Hibernate ORM'
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compile project( ':hibernate-core' )
|
compile project( ':hibernate-core' )
|
||||||
compile( libraries.c3p0 )
|
compile( libraries.c3p0 )
|
||||||
|
@ -17,45 +22,10 @@ dependencies {
|
||||||
// EL libraries are provided scope in Validator
|
// EL libraries are provided scope in Validator
|
||||||
testRuntime( libraries.expression_language )
|
testRuntime( libraries.expression_language )
|
||||||
|
|
||||||
if (db.equalsIgnoreCase("oracle")) {
|
if ( db.equalsIgnoreCase( 'oracle' ) ) {
|
||||||
dependencies {
|
|
||||||
testRuntime( libraries.oracle ) {
|
testRuntime( libraries.oracle ) {
|
||||||
exclude group: 'com.oracle.jdbc', module: 'xmlparserv2'
|
exclude group: 'com.oracle.jdbc', module: 'xmlparserv2'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
// Java 9 ftw!
|
|
||||||
if ( JavaVersion.current().isJava9Compatible() ) {
|
|
||||||
// The JDK used to run Gradle is Java 9+, and we assume that that is the same
|
|
||||||
// JDK for executing tasks
|
|
||||||
compile( 'com.sun.xml.bind:jaxb-impl:2.2.11' )
|
|
||||||
compile( 'org.glassfish.jaxb:jaxb-xjc:2.2.11' )
|
|
||||||
compile( 'org.jvnet.jaxb2_commons:jaxb2-basics:0.11.0' )
|
|
||||||
compile( 'org.jvnet.jaxb2_commons:jaxb2-basics-ant:0.11.0' )
|
|
||||||
compile( 'javax:javaee-api:7.0' )
|
|
||||||
|
|
||||||
testCompile( 'com.sun.xml.bind:jaxb-impl:2.2.11' )
|
|
||||||
testCompile( 'org.glassfish.jaxb:jaxb-xjc:2.2.11' )
|
|
||||||
testCompile( 'org.jvnet.jaxb2_commons:jaxb2-basics:0.11.0' )
|
|
||||||
testCompile( 'org.jvnet.jaxb2_commons:jaxb2-basics-ant:0.11.0' )
|
|
||||||
testCompile( 'javax:javaee-api:7.0' )
|
|
||||||
|
|
||||||
testRuntime( 'com.sun.xml.bind:jaxb-impl:2.2.11' )
|
|
||||||
testRuntime( 'org.glassfish.jaxb:jaxb-xjc:2.2.11' )
|
|
||||||
testRuntime( 'org.jvnet.jaxb2_commons:jaxb2-basics:0.11.0' )
|
|
||||||
testRuntime( 'org.jvnet.jaxb2_commons:jaxb2-basics-ant:0.11.0' )
|
|
||||||
testRuntime( 'javax:javaee-api:7.0' )
|
|
||||||
}
|
|
||||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
}
|
}
|
||||||
|
|
||||||
mavenPom {
|
|
||||||
name = 'Hibernate/c3p0 Integration'
|
|
||||||
description = 'Integration for c3p0 Connection pooling into Hibernate O/RM'
|
|
||||||
}
|
|
||||||
|
|
||||||
def osgiDescription() {
|
|
||||||
return mavenPom.description
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,16 +1,18 @@
|
||||||
import org.apache.tools.ant.filters.ReplaceTokens
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Hibernate, Relational Persistence for Idiomatic Java
|
* Hibernate, Relational Persistence for Idiomatic Java
|
||||||
*
|
*
|
||||||
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
|
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
|
||||||
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
|
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
|
||||||
*/
|
*/
|
||||||
|
import org.apache.tools.ant.filters.ReplaceTokens
|
||||||
|
|
||||||
|
apply from: rootProject.file( 'gradle/published-java-module.gradle' )
|
||||||
apply plugin: 'antlr'
|
apply plugin: 'antlr'
|
||||||
apply plugin: 'hibernate-matrix-testing'
|
apply plugin: 'hibernate-matrix-testing'
|
||||||
|
|
||||||
apply plugin: 'org.hibernate.build.gradle.xjc'
|
apply plugin: 'org.hibernate.build.gradle.xjc'
|
||||||
|
|
||||||
|
description = 'Hibernate\'s core ORM functionality'
|
||||||
|
|
||||||
configurations {
|
configurations {
|
||||||
hibernateJpaModelGenTool {
|
hibernateJpaModelGenTool {
|
||||||
description = "Dependencies for running the Hibernate JPA Metamodel Generator AnnotationProcessor tool"
|
description = "Dependencies for running the Hibernate JPA Metamodel Generator AnnotationProcessor tool"
|
||||||
|
@ -37,31 +39,6 @@ dependencies {
|
||||||
compile( libraries.dom4j )
|
compile( libraries.dom4j )
|
||||||
compile( libraries.commons_annotations )
|
compile( libraries.commons_annotations )
|
||||||
|
|
||||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
// Java 9 ftw!
|
|
||||||
if ( JavaVersion.current().isJava9Compatible() ) {
|
|
||||||
// The JDK used to run Gradle is Java 9+, and we assume that that is the same
|
|
||||||
// JDK for executing tasks
|
|
||||||
xjc( 'com.sun.xml.bind:jaxb-impl:2.2.11' )
|
|
||||||
xjc( 'org.glassfish.jaxb:jaxb-xjc:2.2.11' )
|
|
||||||
xjc( 'org.jvnet.jaxb2_commons:jaxb2-basics:0.11.0' )
|
|
||||||
xjc( 'org.jvnet.jaxb2_commons:jaxb2-basics-ant:0.11.0' )
|
|
||||||
xjc( 'javax:javaee-api:7.0' )
|
|
||||||
|
|
||||||
testCompile( 'com.sun.xml.bind:jaxb-impl:2.2.11' )
|
|
||||||
testCompile( 'org.glassfish.jaxb:jaxb-xjc:2.2.11' )
|
|
||||||
testCompile( 'org.jvnet.jaxb2_commons:jaxb2-basics:0.11.0' )
|
|
||||||
testCompile( 'org.jvnet.jaxb2_commons:jaxb2-basics-ant:0.11.0' )
|
|
||||||
testCompile( 'javax:javaee-api:7.0' )
|
|
||||||
|
|
||||||
testRuntime( 'com.sun.xml.bind:jaxb-impl:2.2.11' )
|
|
||||||
testRuntime( 'org.glassfish.jaxb:jaxb-xjc:2.2.11' )
|
|
||||||
testRuntime( 'org.jvnet.jaxb2_commons:jaxb2-basics:0.11.0' )
|
|
||||||
testRuntime( 'org.jvnet.jaxb2_commons:jaxb2-basics-ant:0.11.0' )
|
|
||||||
testRuntime( 'javax:javaee-api:7.0' )
|
|
||||||
}
|
|
||||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
antlr( libraries.antlr )
|
antlr( libraries.antlr )
|
||||||
|
|
||||||
provided( libraries.jacc )
|
provided( libraries.jacc )
|
||||||
|
@ -112,15 +89,6 @@ dependencies {
|
||||||
testCompile libraries.jboss_annotation_spec_jar
|
testCompile libraries.jboss_annotation_spec_jar
|
||||||
}
|
}
|
||||||
|
|
||||||
mavenPom {
|
|
||||||
name = 'Core Hibernate O/RM functionality'
|
|
||||||
description = 'The core O/RM functionality as provided by Hibernate'
|
|
||||||
}
|
|
||||||
|
|
||||||
def osgiDescription() {
|
|
||||||
return mavenPom.description
|
|
||||||
}
|
|
||||||
|
|
||||||
jar {
|
jar {
|
||||||
manifest {
|
manifest {
|
||||||
mainAttributes( 'Main-Class': 'org.hibernate.Version' )
|
mainAttributes( 'Main-Class': 'org.hibernate.Version' )
|
||||||
|
@ -173,11 +141,11 @@ sourceSets.test.resources {
|
||||||
setSrcDirs( ['src/test/java','src/test/resources'] )
|
setSrcDirs( ['src/test/java','src/test/resources'] )
|
||||||
}
|
}
|
||||||
|
|
||||||
idea {
|
//idea {
|
||||||
module {
|
// module {
|
||||||
sourceDirs += file( "${buildDir}/generated-src/antlr/main" )
|
// sourceDirs += file( "${buildDir}/generated-src/antlr/main" )
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
|
|
||||||
xjc {
|
xjc {
|
||||||
outputDir = jaxbTargetDir
|
outputDir = jaxbTargetDir
|
||||||
|
@ -205,7 +173,7 @@ task copyBundleResources (type: Copy) {
|
||||||
from file('src/test/bundles')
|
from file('src/test/bundles')
|
||||||
into bundlesTargetDir
|
into bundlesTargetDir
|
||||||
ext.bundleTokens = dbBundle[db]
|
ext.bundleTokens = dbBundle[db]
|
||||||
ext.bundleTokens["buildDirName"] = buildDir.absolutePath
|
ext.bundleTokens['buildDirName'] = buildDir.absolutePath
|
||||||
filter( ReplaceTokens, tokens: bundleTokens);
|
filter( ReplaceTokens, tokens: bundleTokens);
|
||||||
doFirst {
|
doFirst {
|
||||||
bundlesTargetDir.mkdirs()
|
bundlesTargetDir.mkdirs()
|
||||||
|
@ -236,10 +204,10 @@ processTestResources {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
test.dependsOn ":hibernate-orm-modules:prepareWildFlyForTests"
|
test.dependsOn ':hibernate-orm-modules:prepareWildFlyForTests'
|
||||||
|
|
||||||
test {
|
test {
|
||||||
systemProperty "file.encoding", "utf-8"
|
systemProperty 'file.encoding', 'utf-8'
|
||||||
beforeTest { descriptor ->
|
beforeTest { descriptor ->
|
||||||
//println "Starting test: " + descriptor
|
//println "Starting test: " + descriptor
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,46 +4,16 @@
|
||||||
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
|
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
|
||||||
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
|
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
apply from: rootProject.file( 'gradle/published-java-module.gradle' )
|
||||||
|
|
||||||
|
description = 'Integration for Ehcache into Hibernate as a second-level caching service'
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compile project( ':hibernate-core' )
|
compile project( ':hibernate-core' )
|
||||||
compile( libraries.ehcache )
|
compile( libraries.ehcache )
|
||||||
|
|
||||||
testCompile project( ':hibernate-testing' )
|
testCompile project( ':hibernate-testing' )
|
||||||
|
|
||||||
|
|
||||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
// Java 9 ftw!
|
|
||||||
if ( JavaVersion.current().isJava9Compatible() ) {
|
|
||||||
// The JDK used to run Gradle is Java 9+, and we assume that that is the same
|
|
||||||
// JDK for executing tasks
|
|
||||||
provided( 'com.sun.xml.bind:jaxb-impl:2.2.11' )
|
|
||||||
provided( 'org.glassfish.jaxb:jaxb-xjc:2.2.11' )
|
|
||||||
provided( 'org.jvnet.jaxb2_commons:jaxb2-basics:0.11.0' )
|
|
||||||
provided( 'org.jvnet.jaxb2_commons:jaxb2-basics-ant:0.11.0' )
|
|
||||||
provided( 'javax:javaee-api:7.0' )
|
|
||||||
|
|
||||||
testCompile( 'com.sun.xml.bind:jaxb-impl:2.2.11' )
|
|
||||||
testCompile( 'org.glassfish.jaxb:jaxb-xjc:2.2.11' )
|
|
||||||
testCompile( 'org.jvnet.jaxb2_commons:jaxb2-basics:0.11.0' )
|
|
||||||
testCompile( 'org.jvnet.jaxb2_commons:jaxb2-basics-ant:0.11.0' )
|
|
||||||
testCompile( 'javax:javaee-api:7.0' )
|
|
||||||
|
|
||||||
testRuntime( 'com.sun.xml.bind:jaxb-impl:2.2.11' )
|
|
||||||
testRuntime( 'org.glassfish.jaxb:jaxb-xjc:2.2.11' )
|
|
||||||
testRuntime( 'org.jvnet.jaxb2_commons:jaxb2-basics:0.11.0' )
|
|
||||||
testRuntime( 'org.jvnet.jaxb2_commons:jaxb2-basics-ant:0.11.0' )
|
|
||||||
testRuntime( 'javax:javaee-api:7.0' )
|
|
||||||
}
|
|
||||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
}
|
|
||||||
|
|
||||||
mavenPom {
|
|
||||||
name = 'Hibernate/Ehcache Integration'
|
|
||||||
description = 'Integration for Ehcache into Hibernate as a second-level caching service'
|
|
||||||
}
|
|
||||||
|
|
||||||
def osgiDescription() {
|
|
||||||
return mavenPom.description
|
|
||||||
}
|
}
|
||||||
|
|
||||||
test {
|
test {
|
||||||
|
|
|
@ -1,4 +1,8 @@
|
||||||
// keep dependencies for transitivity to consumers
|
|
||||||
|
apply from: rootProject.file( 'gradle/published-java-module.gradle' )
|
||||||
|
|
||||||
|
description = '(deprecated - use hibernate-core instead) Hibernate O/RM implementation of the JPA specification'
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compile( project( ':hibernate-core' ) )
|
compile( project( ':hibernate-core' ) )
|
||||||
compile( libraries.dom4j )
|
compile( libraries.dom4j )
|
||||||
|
@ -9,24 +13,19 @@ dependencies {
|
||||||
compile( libraries.jta )
|
compile( libraries.jta )
|
||||||
}
|
}
|
||||||
|
|
||||||
mavenPom {
|
|
||||||
name = '(deprecated - use hibernate-core instead) Hibernate JPA Support'
|
|
||||||
description = '(deprecated - use hibernate-core instead) Hibernate O/RM implementation of the JPA specification'
|
|
||||||
}
|
|
||||||
|
|
||||||
public String osgiDescription() {
|
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
return mavenPom.description
|
// The OSGi JAR manifest support does not like a non-existent classes dir,
|
||||||
}
|
// so make sure we dont use the OSGi one :)
|
||||||
|
|
||||||
jar {
|
jar {
|
||||||
// The OSGi JAR manifest support does not like a non-existent classes dir,
|
|
||||||
// so make sure we dont use the OSGi one :)
|
|
||||||
manifest = null
|
manifest = null
|
||||||
}
|
}
|
||||||
|
|
||||||
sourcesJar {
|
sourcesJar {
|
||||||
// The OSGi JAR manifest support does not like a non-existent classes dir,
|
|
||||||
// so make sure we dont use the OSGi one :)
|
|
||||||
manifest = null
|
manifest = null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
javadocJar {
|
||||||
|
manifest = null
|
||||||
|
}
|
||||||
|
|
|
@ -4,8 +4,12 @@
|
||||||
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
|
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
|
||||||
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
|
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
apply from: rootProject.file( 'gradle/published-java-module.gradle' )
|
||||||
apply plugin: 'hibernate-matrix-testing'
|
apply plugin: 'hibernate-matrix-testing'
|
||||||
|
|
||||||
|
description = 'Hibernate\'s entity version (audit/history) support'
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compile( project( ':hibernate-core' ) )
|
compile( project( ':hibernate-core' ) )
|
||||||
|
|
||||||
|
@ -17,40 +21,6 @@ dependencies {
|
||||||
testCompile( project( path: ':hibernate-core', configuration: 'tests' ) )
|
testCompile( project( path: ':hibernate-core', configuration: 'tests' ) )
|
||||||
testRuntime( libraries.javassist )
|
testRuntime( libraries.javassist )
|
||||||
testRuntime( libraries.byteBuddy )
|
testRuntime( libraries.byteBuddy )
|
||||||
|
|
||||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
// Java 9 ftw!
|
|
||||||
if ( JavaVersion.current().isJava9Compatible() ) {
|
|
||||||
// The JDK used to run Gradle is Java 9+, and we assume that that is the same
|
|
||||||
// JDK for executing tasks
|
|
||||||
provided( 'com.sun.xml.bind:jaxb-impl:2.2.11' )
|
|
||||||
provided( 'org.glassfish.jaxb:jaxb-xjc:2.2.11' )
|
|
||||||
provided( 'org.jvnet.jaxb2_commons:jaxb2-basics:0.11.0' )
|
|
||||||
provided( 'org.jvnet.jaxb2_commons:jaxb2-basics-ant:0.11.0' )
|
|
||||||
provided( 'javax:javaee-api:7.0' )
|
|
||||||
|
|
||||||
testCompile( 'com.sun.xml.bind:jaxb-impl:2.2.11' )
|
|
||||||
testCompile( 'org.glassfish.jaxb:jaxb-xjc:2.2.11' )
|
|
||||||
testCompile( 'org.jvnet.jaxb2_commons:jaxb2-basics:0.11.0' )
|
|
||||||
testCompile( 'org.jvnet.jaxb2_commons:jaxb2-basics-ant:0.11.0' )
|
|
||||||
testCompile( 'javax:javaee-api:7.0' )
|
|
||||||
|
|
||||||
testRuntime( 'com.sun.xml.bind:jaxb-impl:2.2.11' )
|
|
||||||
testRuntime( 'org.glassfish.jaxb:jaxb-xjc:2.2.11' )
|
|
||||||
testRuntime( 'org.jvnet.jaxb2_commons:jaxb2-basics:0.11.0' )
|
|
||||||
testRuntime( 'org.jvnet.jaxb2_commons:jaxb2-basics-ant:0.11.0' )
|
|
||||||
testRuntime( 'javax:javaee-api:7.0' )
|
|
||||||
}
|
|
||||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
}
|
|
||||||
|
|
||||||
mavenPom {
|
|
||||||
name = 'ENtity VERSioning support'
|
|
||||||
description = 'ENtity VERSioning support'
|
|
||||||
}
|
|
||||||
|
|
||||||
def osgiDescription() {
|
|
||||||
return mavenPom.description
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sourceSets {
|
sourceSets {
|
||||||
|
|
|
@ -4,43 +4,14 @@
|
||||||
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
|
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
|
||||||
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
|
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
apply from: rootProject.file( 'gradle/published-java-module.gradle' )
|
||||||
|
|
||||||
|
description = 'Integration for HikariCP into Hibernate O/RM'
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compile project( ':hibernate-core' )
|
compile project( ':hibernate-core' )
|
||||||
compile( libraries.hikaricp )
|
compile( libraries.hikaricp )
|
||||||
testCompile project( ':hibernate-testing' )
|
testCompile project( ':hibernate-testing' )
|
||||||
testCompile(libraries.mockito)
|
testCompile(libraries.mockito)
|
||||||
|
|
||||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
// Java 9 ftw!
|
|
||||||
if ( JavaVersion.current().isJava9Compatible() ) {
|
|
||||||
// The JDK used to run Gradle is Java 9+, and we assume that that is the same
|
|
||||||
// JDK for executing tasks
|
|
||||||
compile( 'com.sun.xml.bind:jaxb-impl:2.2.11' )
|
|
||||||
compile( 'org.glassfish.jaxb:jaxb-xjc:2.2.11' )
|
|
||||||
compile( 'org.jvnet.jaxb2_commons:jaxb2-basics:0.11.0' )
|
|
||||||
compile( 'org.jvnet.jaxb2_commons:jaxb2-basics-ant:0.11.0' )
|
|
||||||
compile( 'javax:javaee-api:7.0' )
|
|
||||||
|
|
||||||
testCompile( 'com.sun.xml.bind:jaxb-impl:2.2.11' )
|
|
||||||
testCompile( 'org.glassfish.jaxb:jaxb-xjc:2.2.11' )
|
|
||||||
testCompile( 'org.jvnet.jaxb2_commons:jaxb2-basics:0.11.0' )
|
|
||||||
testCompile( 'org.jvnet.jaxb2_commons:jaxb2-basics-ant:0.11.0' )
|
|
||||||
testCompile( 'javax:javaee-api:7.0' )
|
|
||||||
|
|
||||||
testRuntime( 'com.sun.xml.bind:jaxb-impl:2.2.11' )
|
|
||||||
testRuntime( 'org.glassfish.jaxb:jaxb-xjc:2.2.11' )
|
|
||||||
testRuntime( 'org.jvnet.jaxb2_commons:jaxb2-basics:0.11.0' )
|
|
||||||
testRuntime( 'org.jvnet.jaxb2_commons:jaxb2-basics-ant:0.11.0' )
|
|
||||||
testRuntime( 'javax:javaee-api:7.0' )
|
|
||||||
}
|
|
||||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
}
|
|
||||||
|
|
||||||
mavenPom {
|
|
||||||
name = 'Hibernate/HikariCP Integration'
|
|
||||||
description = 'Integration for HikariCP into Hibernate O/RM'
|
|
||||||
}
|
|
||||||
|
|
||||||
def osgiDescription() {
|
|
||||||
return mavenPom.description
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,33 +5,33 @@
|
||||||
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
|
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
mavenPom {
|
apply from: rootProject.file( 'gradle/base-information.gradle' )
|
||||||
name = '(deprecated - use org.infinispan:infinispan-hibernate-cache instead)'
|
apply from: rootProject.file( 'gradle/publishing-repos.gradle' )
|
||||||
description = '(deprecated - use org.infinispan:infinispan-hibernate-cache instead)'
|
apply plugin: 'maven-publish'
|
||||||
|
apply plugin: 'maven-publish-auth'
|
||||||
|
|
||||||
|
description = '(deprecated - use org.infinispan:infinispan-hibernate-cache instead)'
|
||||||
|
|
||||||
|
ext {
|
||||||
|
relocatedGroupId = 'org.infinispan'
|
||||||
|
relocatedArtifactId = 'infinispan-hibernate-cache'
|
||||||
|
relocatedVersion = '9.1.3.Final'
|
||||||
}
|
}
|
||||||
|
|
||||||
jar.enabled = false
|
|
||||||
sourcesJar.enabled = false
|
|
||||||
javadoc.enabled = false
|
|
||||||
javadocJar.enabled = false
|
|
||||||
|
|
||||||
def relocatedGroupId = 'org.infinispan'
|
|
||||||
def relocatedArtifactId = 'infinispan-hibernate-cache'
|
|
||||||
def relocatedVersion = '9.1.3.Final'
|
|
||||||
|
|
||||||
publishing {
|
publishing {
|
||||||
publications {
|
publications {
|
||||||
relocationPom( MavenPublication ) {
|
relocationPom( MavenPublication ) {
|
||||||
groupId 'org.hibernate'
|
// groupId 'org.hibernate'
|
||||||
artifactId 'hibernate-infinispan'
|
// artifactId 'hibernate-infinispan'
|
||||||
|
//
|
||||||
pom.withXml {
|
pom.withXml {
|
||||||
def relocation = asNode().appendNode( 'distributionManagement' ).appendNode( 'relocation' )
|
def relocation = asNode().appendNode( 'distributionManagement' ).appendNode( 'relocation' )
|
||||||
relocation.appendNode( 'groupId', relocatedGroupId)
|
relocation.appendNode( 'groupId', project.relocatedGroupId)
|
||||||
relocation.appendNode( 'artifactId', relocatedArtifactId )
|
relocation.appendNode( 'artifactId', project.relocatedArtifactId )
|
||||||
relocation.appendNode( 'version', relocatedVersion )
|
relocation.appendNode( 'version', project.relocatedVersion )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
task release( dependsOn: publish )
|
|
@ -1,24 +1,23 @@
|
||||||
|
|
||||||
|
apply from: rootProject.file( 'gradle/published-java-module.gradle' )
|
||||||
|
|
||||||
|
description = '(deprecated - use hibernate-core instead) Support for Java8-specific features - mainly Java8 Date/Time (JSR 310)'
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compile( project( ':hibernate-core' ) )
|
compile( project( ':hibernate-core' ) )
|
||||||
}
|
}
|
||||||
|
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
mavenPom {
|
// The OSGi JAR manifest support does not like a non-existent classes dir,
|
||||||
name = '(deprecated - use hibernate-core instead) Java8-specific Hibernate O/RM functionality'
|
// so make sure we dont use the OSGi one :)
|
||||||
description = '(deprecated - use hibernate-core instead) Support for Java8-specific features - mainly Java8 Date/Time (JSR 310)'
|
|
||||||
}
|
|
||||||
|
|
||||||
public String osgiDescription() {
|
|
||||||
return mavenPom.description
|
|
||||||
}
|
|
||||||
|
|
||||||
jar {
|
jar {
|
||||||
// The OSGi JAR manifest support does not like a non-existent classes dir,
|
|
||||||
// so make sure we dont use the OSGi one :)
|
|
||||||
manifest = null
|
manifest = null
|
||||||
}
|
}
|
||||||
|
|
||||||
sourcesJar {
|
sourcesJar {
|
||||||
// The OSGi JAR manifest support does not like a non-existent classes dir,
|
manifest = null
|
||||||
// so make sure we dont use the OSGi one :)
|
}
|
||||||
|
|
||||||
|
javadocJar {
|
||||||
manifest = null
|
manifest = null
|
||||||
}
|
}
|
|
@ -1,3 +1,7 @@
|
||||||
|
apply from: rootProject.file( 'gradle/published-java-module.gradle' )
|
||||||
|
|
||||||
|
description = 'Integration for javax.cache into Hibernate as a second-level caching service'
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compile project( ':hibernate-core' )
|
compile project( ':hibernate-core' )
|
||||||
compile( libraries.jcache )
|
compile( libraries.jcache )
|
||||||
|
@ -6,38 +10,4 @@ dependencies {
|
||||||
testCompile( libraries.mockito )
|
testCompile( libraries.mockito )
|
||||||
testCompile( libraries.mockito_inline )
|
testCompile( libraries.mockito_inline )
|
||||||
testRuntime( libraries.ehcache3 )
|
testRuntime( libraries.ehcache3 )
|
||||||
|
|
||||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
// Java 9 ftw!
|
|
||||||
if ( JavaVersion.current().isJava9Compatible() ) {
|
|
||||||
// The JDK used to run Gradle is Java 9+, and we assume that that is the same
|
|
||||||
// JDK for executing tasks
|
|
||||||
compile( 'com.sun.xml.bind:jaxb-impl:2.2.11' )
|
|
||||||
compile( 'org.glassfish.jaxb:jaxb-xjc:2.2.11' )
|
|
||||||
compile( 'org.jvnet.jaxb2_commons:jaxb2-basics:0.11.0' )
|
|
||||||
compile( 'org.jvnet.jaxb2_commons:jaxb2-basics-ant:0.11.0' )
|
|
||||||
compile( 'javax:javaee-api:7.0' )
|
|
||||||
|
|
||||||
testCompile( 'com.sun.xml.bind:jaxb-impl:2.2.11' )
|
|
||||||
testCompile( 'org.glassfish.jaxb:jaxb-xjc:2.2.11' )
|
|
||||||
testCompile( 'org.jvnet.jaxb2_commons:jaxb2-basics:0.11.0' )
|
|
||||||
testCompile( 'org.jvnet.jaxb2_commons:jaxb2-basics-ant:0.11.0' )
|
|
||||||
testCompile( 'javax:javaee-api:7.0' )
|
|
||||||
|
|
||||||
testRuntime( 'com.sun.xml.bind:jaxb-impl:2.2.11' )
|
|
||||||
testRuntime( 'org.glassfish.jaxb:jaxb-xjc:2.2.11' )
|
|
||||||
testRuntime( 'org.jvnet.jaxb2_commons:jaxb2-basics:0.11.0' )
|
|
||||||
testRuntime( 'org.jvnet.jaxb2_commons:jaxb2-basics-ant:0.11.0' )
|
|
||||||
testRuntime( 'javax:javaee-api:7.0' )
|
|
||||||
}
|
|
||||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
}
|
|
||||||
|
|
||||||
mavenPom {
|
|
||||||
name = 'Hibernate/JCache Integration'
|
|
||||||
description = 'Integration for javax.cache into Hibernate as a second-level caching service'
|
|
||||||
}
|
|
||||||
|
|
||||||
def osgiDescription() {
|
|
||||||
return pomDescription()
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,6 +4,9 @@
|
||||||
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
|
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
|
||||||
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
|
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
apply from: rootProject.file( 'gradle/java-module.gradle' )
|
||||||
|
|
||||||
apply plugin: 'java'
|
apply plugin: 'java'
|
||||||
apply plugin: 'maven-publish'
|
apply plugin: 'maven-publish'
|
||||||
apply plugin: 'maven-publish-auth'
|
apply plugin: 'maven-publish-auth'
|
||||||
|
@ -12,16 +15,17 @@ apply plugin: 'project-report'
|
||||||
apply plugin: org.hibernate.build.HibernateBuildPlugin
|
apply plugin: org.hibernate.build.HibernateBuildPlugin
|
||||||
apply plugin: 'idea'
|
apply plugin: 'idea'
|
||||||
|
|
||||||
|
|
||||||
ext {
|
ext {
|
||||||
// NOTE : `wildflyVersion` comes from libraries.gradle...
|
// NOTE : `wildflyVersion` comes from libraries.gradle...
|
||||||
|
|
||||||
// Exact ORM version, e.g. "5.1.1.Final"
|
// Exact ORM version, e.g. "5.1.1.Final"
|
||||||
slot = rootProject.hibernateFullVersion
|
slot = rootProject.hibernateVersion
|
||||||
// Just the minor ORM version, e.g. "5.1"; Is used as an alias for the exact version
|
// Just the minor ORM version, e.g. "5.1"; Is used as an alias for the exact version
|
||||||
minorSlot = rootProject.hibernateMajorMinorVersion
|
minorSlot = rootProject.hibernateMajorMinorVersion
|
||||||
|
|
||||||
// "10" for WildFly 10.x, "11" for 11.x, etc
|
// "10" for WildFly 10.x, "11" for 11.x, etc
|
||||||
wildFlyMajorVersion = wildflyVersion.split( '\\.' )[0]
|
wildFlyMajorVersion = project.wildflyVersion.split( '\\.' )[0]
|
||||||
wildFlyJPA22PatchVersion = '1.0.0.Beta1'
|
wildFlyJPA22PatchVersion = '1.0.0.Beta1'
|
||||||
|
|
||||||
artifactClassifier = "wildfly-${wildFlyMajorVersion}-dist"
|
artifactClassifier = "wildfly-${wildFlyMajorVersion}-dist"
|
||||||
|
@ -36,16 +40,13 @@ ext {
|
||||||
expandedModuleProperties = [
|
expandedModuleProperties = [
|
||||||
slot: slot,
|
slot: slot,
|
||||||
minorSlot: minorSlot,
|
minorSlot: minorSlot,
|
||||||
version: rootProject.hibernateTargetVersion,
|
version: project.hibernateVersion,
|
||||||
wildflyVersion: wildflyVersion,
|
wildflyVersion: wildflyVersion,
|
||||||
byteBuddyVersion: byteBuddyVersion
|
byteBuddyVersion: byteBuddyVersion
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
mavenPom {
|
description = "Hibernate ORM modules for WildFly ${wildFlyMajorVersion}"
|
||||||
name = "Hibernate ORM modules for WildFly ${wildFlyMajorVersion}"
|
|
||||||
description = "Hibernate ORM modules for WildFly ${wildFlyMajorVersion}"
|
|
||||||
}
|
|
||||||
|
|
||||||
configurations {
|
configurations {
|
||||||
jipijapa {
|
jipijapa {
|
||||||
|
@ -71,29 +72,6 @@ dependencies {
|
||||||
testCompile libraries.shrinkwrap_descriptors_api_javaee
|
testCompile libraries.shrinkwrap_descriptors_api_javaee
|
||||||
testCompile libraries.shrinkwrap_descriptors_impl_javaee
|
testCompile libraries.shrinkwrap_descriptors_impl_javaee
|
||||||
testCompile libraries.wildfly_arquillian_container_managed
|
testCompile libraries.wildfly_arquillian_container_managed
|
||||||
|
|
||||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
// Java 9 ftw!
|
|
||||||
if ( JavaVersion.current().isJava9Compatible() ) {
|
|
||||||
compile( 'com.sun.xml.bind:jaxb-impl:2.2.11' )
|
|
||||||
compile( 'org.glassfish.jaxb:jaxb-xjc:2.2.11' )
|
|
||||||
compile( 'org.jvnet.jaxb2_commons:jaxb2-basics:0.11.0' )
|
|
||||||
compile( 'org.jvnet.jaxb2_commons:jaxb2-basics-ant:0.11.0' )
|
|
||||||
compile( 'javax:javaee-api:7.0' )
|
|
||||||
|
|
||||||
testCompile( 'com.sun.xml.bind:jaxb-impl:2.2.11' )
|
|
||||||
testCompile( 'org.glassfish.jaxb:jaxb-xjc:2.2.11' )
|
|
||||||
testCompile( 'org.jvnet.jaxb2_commons:jaxb2-basics:0.11.0' )
|
|
||||||
testCompile( 'org.jvnet.jaxb2_commons:jaxb2-basics-ant:0.11.0' )
|
|
||||||
testCompile( 'javax:javaee-api:7.0' )
|
|
||||||
|
|
||||||
testRuntime( 'com.sun.xml.bind:jaxb-impl:2.2.11' )
|
|
||||||
testRuntime( 'org.glassfish.jaxb:jaxb-xjc:2.2.11' )
|
|
||||||
testRuntime( 'org.jvnet.jaxb2_commons:jaxb2-basics:0.11.0' )
|
|
||||||
testRuntime( 'org.jvnet.jaxb2_commons:jaxb2-basics-ant:0.11.0' )
|
|
||||||
testRuntime( 'javax:javaee-api:7.0' )
|
|
||||||
}
|
|
||||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -166,7 +144,7 @@ publishing {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
build.dependsOn createModulesZip
|
task release( dependsOn: createModulesZip )
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -4,8 +4,12 @@
|
||||||
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
|
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
|
||||||
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
|
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
apply from: rootProject.file( 'gradle/published-java-module.gradle' )
|
||||||
apply plugin: 'karaf-featuresgen'
|
apply plugin: 'karaf-featuresgen'
|
||||||
|
|
||||||
|
description = 'Support for running Hibernate O/RM in OSGi environments'
|
||||||
|
|
||||||
sourceSets {
|
sourceSets {
|
||||||
test {
|
test {
|
||||||
// send javac output and resource copying to the same output directory for test
|
// send javac output and resource copying to the same output directory for test
|
||||||
|
@ -70,40 +74,6 @@ dependencies {
|
||||||
}
|
}
|
||||||
|
|
||||||
karafDistro "org.apache.karaf:apache-karaf:${karafVersion}@tar.gz"
|
karafDistro "org.apache.karaf:apache-karaf:${karafVersion}@tar.gz"
|
||||||
|
|
||||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
// Java 9 ftw!
|
|
||||||
if ( JavaVersion.current().isJava9Compatible() ) {
|
|
||||||
// The JDK used to run Gradle is Java 9+, and we assume that that is the same
|
|
||||||
// JDK for executing tasks
|
|
||||||
compile( 'com.sun.xml.bind:jaxb-impl:2.2.11' )
|
|
||||||
compile( 'org.glassfish.jaxb:jaxb-xjc:2.2.11' )
|
|
||||||
compile( 'org.jvnet.jaxb2_commons:jaxb2-basics:0.11.0' )
|
|
||||||
compile( 'org.jvnet.jaxb2_commons:jaxb2-basics-ant:0.11.0' )
|
|
||||||
compile( 'javax:javaee-api:7.0' )
|
|
||||||
|
|
||||||
testCompile( 'com.sun.xml.bind:jaxb-impl:2.2.11' )
|
|
||||||
testCompile( 'org.glassfish.jaxb:jaxb-xjc:2.2.11' )
|
|
||||||
testCompile( 'org.jvnet.jaxb2_commons:jaxb2-basics:0.11.0' )
|
|
||||||
testCompile( 'org.jvnet.jaxb2_commons:jaxb2-basics-ant:0.11.0' )
|
|
||||||
testCompile( 'javax:javaee-api:7.0' )
|
|
||||||
|
|
||||||
testRuntime( 'com.sun.xml.bind:jaxb-impl:2.2.11' )
|
|
||||||
testRuntime( 'org.glassfish.jaxb:jaxb-xjc:2.2.11' )
|
|
||||||
testRuntime( 'org.jvnet.jaxb2_commons:jaxb2-basics:0.11.0' )
|
|
||||||
testRuntime( 'org.jvnet.jaxb2_commons:jaxb2-basics-ant:0.11.0' )
|
|
||||||
testRuntime( 'javax:javaee-api:7.0' )
|
|
||||||
}
|
|
||||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
}
|
|
||||||
|
|
||||||
mavenPom {
|
|
||||||
name = 'Hibernate OSGi Support'
|
|
||||||
description = 'Support for running Hibernate O/RM in OSGi environments'
|
|
||||||
}
|
|
||||||
|
|
||||||
def osgiDescription() {
|
|
||||||
return mavenPom.description
|
|
||||||
}
|
}
|
||||||
|
|
||||||
jar {
|
jar {
|
||||||
|
@ -408,7 +378,7 @@ tasks.test.dependsOn tasks.publishToMavenLocal
|
||||||
|
|
||||||
publishing {
|
publishing {
|
||||||
publications {
|
publications {
|
||||||
mavenJava( MavenPublication ) {
|
publishedArtifacts( MavenPublication ) {
|
||||||
artifact( project.extensions.karafFeatures.featuresXmlFile ) {
|
artifact( project.extensions.karafFeatures.featuresXmlFile ) {
|
||||||
classifier 'karaf'
|
classifier 'karaf'
|
||||||
builtBy generateKarafFeatures
|
builtBy generateKarafFeatures
|
||||||
|
|
|
@ -4,42 +4,13 @@
|
||||||
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
|
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
|
||||||
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
|
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
apply from: rootProject.file( 'gradle/published-java-module.gradle' )
|
||||||
|
|
||||||
|
description = 'Integration for Proxool Connection pooling into Hibernate O/RM'
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compile project( ':hibernate-core' )
|
compile project( ':hibernate-core' )
|
||||||
compile( libraries.proxool )
|
compile( libraries.proxool )
|
||||||
testCompile project( ':hibernate-testing' )
|
testCompile project( ':hibernate-testing' )
|
||||||
|
|
||||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
// Java 9 ftw!
|
|
||||||
if ( JavaVersion.current().isJava9Compatible() ) {
|
|
||||||
// The JDK used to run Gradle is Java 9+, and we assume that that is the same
|
|
||||||
// JDK for executing tasks
|
|
||||||
compile( 'com.sun.xml.bind:jaxb-impl:2.2.11' )
|
|
||||||
compile( 'org.glassfish.jaxb:jaxb-xjc:2.2.11' )
|
|
||||||
compile( 'org.jvnet.jaxb2_commons:jaxb2-basics:0.11.0' )
|
|
||||||
compile( 'org.jvnet.jaxb2_commons:jaxb2-basics-ant:0.11.0' )
|
|
||||||
compile( 'javax:javaee-api:7.0' )
|
|
||||||
|
|
||||||
testCompile( 'com.sun.xml.bind:jaxb-impl:2.2.11' )
|
|
||||||
testCompile( 'org.glassfish.jaxb:jaxb-xjc:2.2.11' )
|
|
||||||
testCompile( 'org.jvnet.jaxb2_commons:jaxb2-basics:0.11.0' )
|
|
||||||
testCompile( 'org.jvnet.jaxb2_commons:jaxb2-basics-ant:0.11.0' )
|
|
||||||
testCompile( 'javax:javaee-api:7.0' )
|
|
||||||
|
|
||||||
testRuntime( 'com.sun.xml.bind:jaxb-impl:2.2.11' )
|
|
||||||
testRuntime( 'org.glassfish.jaxb:jaxb-xjc:2.2.11' )
|
|
||||||
testRuntime( 'org.jvnet.jaxb2_commons:jaxb2-basics:0.11.0' )
|
|
||||||
testRuntime( 'org.jvnet.jaxb2_commons:jaxb2-basics-ant:0.11.0' )
|
|
||||||
testRuntime( 'javax:javaee-api:7.0' )
|
|
||||||
}
|
|
||||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
}
|
|
||||||
|
|
||||||
mavenPom {
|
|
||||||
name = 'Hibernate/Proxool Integration'
|
|
||||||
description = 'Integration for Proxool Connection pooling into Hibernate O/RM'
|
|
||||||
}
|
|
||||||
|
|
||||||
def osgiDescription() {
|
|
||||||
return mavenPom.description
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,13 +4,11 @@
|
||||||
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
|
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
|
||||||
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
|
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
|
||||||
*/
|
*/
|
||||||
apply plugin: 'java'
|
|
||||||
|
apply from: rootProject.file( 'gradle/published-java-module.gradle' )
|
||||||
apply plugin: 'hibernate-matrix-testing'
|
apply plugin: 'hibernate-matrix-testing'
|
||||||
|
|
||||||
mavenPom {
|
description = 'Integrate support for Spatial/GIS data into Hibernate O/RM'
|
||||||
name = 'Integrate support for Spatial/GIS data into Hibernate O/RM'
|
|
||||||
description = 'Integrate support for Spatial/GIS data into Hibernate O/RM'
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compile(project(':hibernate-core'))
|
compile(project(':hibernate-core'))
|
||||||
|
@ -23,7 +21,6 @@ dependencies {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
testCompile(libraries.junit)
|
testCompile(libraries.junit)
|
||||||
testCompile(project(':hibernate-testing'))
|
testCompile(project(':hibernate-testing'))
|
||||||
testCompile([group: 'commons-dbcp', name: 'commons-dbcp', version: '1.4'])
|
testCompile([group: 'commons-dbcp', name: 'commons-dbcp', version: '1.4'])
|
||||||
|
@ -40,32 +37,6 @@ dependencies {
|
||||||
testRuntime('jaxen:jaxen:1.1')
|
testRuntime('jaxen:jaxen:1.1')
|
||||||
testRuntime(libraries.javassist)
|
testRuntime(libraries.javassist)
|
||||||
testRuntime(libraries.byteBuddy)
|
testRuntime(libraries.byteBuddy)
|
||||||
|
|
||||||
|
|
||||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
// Java 9 ftw!
|
|
||||||
if ( JavaVersion.current().isJava9Compatible() ) {
|
|
||||||
// The JDK used to run Gradle is Java 9+, and we assume that that is the same
|
|
||||||
// JDK for executing tasks
|
|
||||||
compile( 'com.sun.xml.bind:jaxb-impl:2.2.11' )
|
|
||||||
compile( 'org.glassfish.jaxb:jaxb-xjc:2.2.11' )
|
|
||||||
compile( 'org.jvnet.jaxb2_commons:jaxb2-basics:0.11.0' )
|
|
||||||
compile( 'org.jvnet.jaxb2_commons:jaxb2-basics-ant:0.11.0' )
|
|
||||||
compile( 'javax:javaee-api:7.0' )
|
|
||||||
|
|
||||||
testCompile( 'com.sun.xml.bind:jaxb-impl:2.2.11' )
|
|
||||||
testCompile( 'org.glassfish.jaxb:jaxb-xjc:2.2.11' )
|
|
||||||
testCompile( 'org.jvnet.jaxb2_commons:jaxb2-basics:0.11.0' )
|
|
||||||
testCompile( 'org.jvnet.jaxb2_commons:jaxb2-basics-ant:0.11.0' )
|
|
||||||
testCompile( 'javax:javaee-api:7.0' )
|
|
||||||
|
|
||||||
testRuntime( 'com.sun.xml.bind:jaxb-impl:2.2.11' )
|
|
||||||
testRuntime( 'org.glassfish.jaxb:jaxb-xjc:2.2.11' )
|
|
||||||
testRuntime( 'org.jvnet.jaxb2_commons:jaxb2-basics:0.11.0' )
|
|
||||||
testRuntime( 'org.jvnet.jaxb2_commons:jaxb2-basics-ant:0.11.0' )
|
|
||||||
testRuntime( 'javax:javaee-api:7.0' )
|
|
||||||
}
|
|
||||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sourceSets.test.resources {
|
sourceSets.test.resources {
|
||||||
|
|
|
@ -4,6 +4,11 @@
|
||||||
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
|
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
|
||||||
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
|
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
apply from: rootProject.file( 'gradle/published-java-module.gradle' )
|
||||||
|
|
||||||
|
description = 'Support for testing Hibernate ORM functionality'
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compile project( ':hibernate-core' )
|
compile project( ':hibernate-core' )
|
||||||
compile( libraries.jta )
|
compile( libraries.jta )
|
||||||
|
@ -28,11 +33,3 @@ sourceSets.test.resources {
|
||||||
// that will allow us to keep the same artifactId and publish the pom
|
// that will allow us to keep the same artifactId and publish the pom
|
||||||
// with proper dependencies
|
// with proper dependencies
|
||||||
|
|
||||||
mavenPom {
|
|
||||||
name = 'Hibernate ORM Testing'
|
|
||||||
description = 'Support for testing Hibernate ORM functionality'
|
|
||||||
}
|
|
||||||
|
|
||||||
def osgiDescription() {
|
|
||||||
return mavenPom.description
|
|
||||||
}
|
|
||||||
|
|
|
@ -4,16 +4,11 @@
|
||||||
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
|
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
|
||||||
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
|
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
|
||||||
*/
|
*/
|
||||||
plugins {
|
apply from: rootProject.file( 'gradle/base-information.gradle' )
|
||||||
id "com.jfrog.bintray" version "1.7"
|
|
||||||
}
|
|
||||||
|
|
||||||
apply plugin: 'base'
|
|
||||||
apply plugin: 'idea'
|
apply plugin: 'idea'
|
||||||
apply plugin: 'distribution'
|
apply plugin: 'distribution'
|
||||||
|
|
||||||
buildDir = "target"
|
|
||||||
|
|
||||||
idea.module {
|
idea.module {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -150,8 +145,8 @@ distributions {
|
||||||
|
|
||||||
// todo : this closure is problematic as it does not write into the hibernate-release-$project.version directory
|
// todo : this closure is problematic as it does not write into the hibernate-release-$project.version directory
|
||||||
// due to http://issues.gradle.org/browse/GRADLE-1450
|
// due to http://issues.gradle.org/browse/GRADLE-1450
|
||||||
[ 'hibernate-c3p0', 'hibernate-proxool', 'hibernate-ehcache', 'hibernate-infinispan' ].each { feature ->
|
[ 'hibernate-c3p0', 'hibernate-proxool', 'hibernate-ehcache' ].each { feature ->
|
||||||
final String shortName = feature.substring( 'hibernate-'.length() );
|
final String shortName = feature.substring( 'hibernate-'.length() )
|
||||||
// WORKAROUND http://issues.gradle.org/browse/GRADLE-1450
|
// WORKAROUND http://issues.gradle.org/browse/GRADLE-1450
|
||||||
// into('lib/optional/' + shortName) {
|
// into('lib/optional/' + shortName) {
|
||||||
owner.into('lib/optional/' + shortName) {
|
owner.into('lib/optional/' + shortName) {
|
||||||
|
@ -244,135 +239,5 @@ artifacts {
|
||||||
bundles distZip
|
bundles distZip
|
||||||
}
|
}
|
||||||
|
|
||||||
String binTrayUser = null
|
task release( dependsOn: uploadBundlesSourceForge )
|
||||||
String binTrayApiKey = null
|
|
||||||
|
|
||||||
if ( project.hasProperty( "BINTRAY_USER" ) ) {
|
|
||||||
binTrayUser = project.property( "BINTRAY_USER" ) as String;
|
|
||||||
}
|
|
||||||
if ( binTrayUser == null ) {
|
|
||||||
binTrayUser = System.getProperty( "BINTRAY_USER" );
|
|
||||||
}
|
|
||||||
if ( binTrayUser == null ) {
|
|
||||||
binTrayUser = System.getenv( "BINTRAY_USER" );
|
|
||||||
}
|
|
||||||
if ( binTrayUser == null ) {
|
|
||||||
binTrayUser = 'UNDEFINED'
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( project.hasProperty( "BINTRAY_APIKEY" ) ) {
|
|
||||||
binTrayApiKey = project.property( "BINTRAY_APIKEY" ) as String;
|
|
||||||
}
|
|
||||||
if ( binTrayApiKey == null ) {
|
|
||||||
binTrayApiKey = System.getProperty( "BINTRAY_APIKEY" );
|
|
||||||
}
|
|
||||||
if ( binTrayApiKey == null ) {
|
|
||||||
binTrayApiKey = System.getenv( "BINTRAY_APIKEY" );
|
|
||||||
}
|
|
||||||
if ( binTrayApiKey == null ) {
|
|
||||||
binTrayApiKey = 'UNDEFINED'
|
|
||||||
}
|
|
||||||
|
|
||||||
bintray {
|
|
||||||
user = binTrayUser
|
|
||||||
key = binTrayApiKey
|
|
||||||
|
|
||||||
publish = true
|
|
||||||
|
|
||||||
configurations = ['bundles']
|
|
||||||
|
|
||||||
pkg {
|
|
||||||
userOrg = 'hibernate'
|
|
||||||
repo = 'bundles'
|
|
||||||
name = 'hibernate-orm'
|
|
||||||
|
|
||||||
version {
|
|
||||||
name = project.version
|
|
||||||
desc = "The ${project.version} release of the Hibernate ORM project"
|
|
||||||
|
|
||||||
gpg {
|
|
||||||
sign = true
|
|
||||||
passphrase = 'hibernate'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
bintrayUpload.dependsOn buildBundles
|
|
||||||
|
|
||||||
bintrayUpload {
|
|
||||||
doFirst {
|
|
||||||
if ( version.endsWith( "SNAPSHOT" ) ) {
|
|
||||||
logger.error( "Cannot perform upload of SNAPSHOT bundles to BinTray" );
|
|
||||||
throw new RuntimeException( "Cannot perform upload of SNAPSHOT bundles to BinTray" )
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
logger.lifecycle( "Uploading release bundles to BinTray..." )
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
task uploadBundles(dependsOn: [bintrayUpload, uploadBundlesSourceForge]) {
|
|
||||||
description = 'Performs all release bundle uploads'
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Full release related tasks ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
task cleanAllSubProjects(type: Task) {
|
|
||||||
description = 'Performs clean on all sub-projects'
|
|
||||||
}
|
|
||||||
|
|
||||||
task testAllSubProjects(type: Task) {
|
|
||||||
description = 'Performs test on all sub-projects'
|
|
||||||
}
|
|
||||||
|
|
||||||
task publishAllSubProjects(type: Task) {
|
|
||||||
description = 'Performs publish on all sub-projects'
|
|
||||||
}
|
|
||||||
|
|
||||||
task buildAllSubProjects(type: Task, dependsOn: [testAllSubProjects,publishAllSubProjects])
|
|
||||||
|
|
||||||
task uploadReleaseArtifacts(type: Task, dependsOn: [uploadDocumentation, uploadBundles])
|
|
||||||
|
|
||||||
task announce(type: Task) { doFirst { println 'Hear ye, hear ye...' } }
|
|
||||||
|
|
||||||
task release(type: Task, dependsOn: [buildAllSubProjects, uploadReleaseArtifacts, announce]) {
|
|
||||||
description = "Coordinates all release tasks; does not perform a clean first (see cleanAndRelease task)"
|
|
||||||
}
|
|
||||||
|
|
||||||
task cleanAndRelease(type: Task, dependsOn: [cleanAllSubProjects, release]) {
|
|
||||||
description = "Coordinates all release tasks *including clean*"
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// must-run-afters ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
buildAllSubProjects.mustRunAfter cleanAllSubProjects
|
|
||||||
|
|
||||||
publishAllSubProjects.mustRunAfter testAllSubProjects
|
|
||||||
publishAllSubProjects.mustRunAfter cleanAllSubProjects
|
|
||||||
|
|
||||||
uploadReleaseArtifacts.mustRunAfter buildAllSubProjects
|
|
||||||
|
|
||||||
announce.mustRunAfter uploadReleaseArtifacts
|
|
||||||
|
|
||||||
|
|
||||||
// sub-project task dependencies ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
rootProject.subprojects { Project subproject ->
|
|
||||||
final Task subprojectCleanTask = subproject.tasks.findByPath( 'clean' );
|
|
||||||
if ( subprojectCleanTask != null ) {
|
|
||||||
cleanAllSubProjects.dependsOn subprojectCleanTask
|
|
||||||
}
|
|
||||||
|
|
||||||
final Task subprojectTestTask = subproject.tasks.findByPath( 'test' );
|
|
||||||
if ( subprojectTestTask != null ) {
|
|
||||||
testAllSubProjects.dependsOn subprojectTestTask
|
|
||||||
}
|
|
||||||
|
|
||||||
final Task subprojectPublishTask = subproject.tasks.findByPath( 'publish' );
|
|
||||||
if ( subprojectPublishTask != null ) {
|
|
||||||
publishAllSubProjects.dependsOn subprojectPublishTask
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -4,16 +4,13 @@
|
||||||
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
|
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
|
||||||
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
|
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
|
||||||
*/
|
*/
|
||||||
apply plugin: 'java'
|
apply from: rootProject.file( 'gradle/published-java-module.gradle' )
|
||||||
apply plugin: 'maven'
|
apply plugin: 'maven'
|
||||||
|
|
||||||
import org.apache.tools.ant.filters.ReplaceTokens
|
import org.apache.tools.ant.filters.ReplaceTokens
|
||||||
|
|
||||||
group = 'org.hibernate.orm.tooling'
|
group = 'org.hibernate.orm.tooling'
|
||||||
|
description = 'Enhance Plugin of the Hibernate project for use with Maven build system.'
|
||||||
repositories {
|
|
||||||
mavenCentral()
|
|
||||||
}
|
|
||||||
|
|
||||||
processResources {
|
processResources {
|
||||||
include "**/lifecycle-mapping-metadata.xml"
|
include "**/lifecycle-mapping-metadata.xml"
|
||||||
|
@ -117,7 +114,3 @@ processResources.doLast {
|
||||||
|
|
||||||
processResources.dependsOn processPluginXml
|
processResources.dependsOn processPluginXml
|
||||||
|
|
||||||
mavenPom {
|
|
||||||
name = 'Enhance Plugin of the Hibernate project for use with Maven build system.'
|
|
||||||
description = 'Enhance Plugin of the Hibernate project for use with Maven build system.'
|
|
||||||
}
|
|
||||||
|
|
|
@ -4,10 +4,13 @@
|
||||||
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
|
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
|
||||||
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
|
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
|
||||||
*/
|
*/
|
||||||
|
apply from: rootProject.file( 'gradle/published-java-module.gradle' )
|
||||||
|
apply plugin: 'groovy'
|
||||||
apply plugin: 'java-gradle-plugin'
|
apply plugin: 'java-gradle-plugin'
|
||||||
|
|
||||||
apply plugin: 'maven'
|
apply plugin: 'maven'
|
||||||
|
|
||||||
|
description = "Gradle plugin for integrating Hibernate functionality into your build"
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compile( project( ':hibernate-core' ) )
|
compile( project( ':hibernate-core' ) )
|
||||||
compile( libraries.jpa )
|
compile( libraries.jpa )
|
||||||
|
@ -16,8 +19,3 @@ dependencies {
|
||||||
compile gradleApi()
|
compile gradleApi()
|
||||||
compile localGroovy()
|
compile localGroovy()
|
||||||
}
|
}
|
||||||
|
|
||||||
mavenPom {
|
|
||||||
name = 'Hibernate Gradle plugin'
|
|
||||||
description = "Gradle plugin for integrating Hibernate functionality into your build"
|
|
||||||
}
|
|
|
@ -4,46 +4,24 @@
|
||||||
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
|
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
|
||||||
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
|
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
apply from: rootProject.file( 'gradle/published-java-module.gradle' )
|
||||||
apply plugin: 'version-injection'
|
apply plugin: 'version-injection'
|
||||||
apply plugin: 'org.hibernate.build.gradle.xjc'
|
apply plugin: 'org.hibernate.build.gradle.xjc'
|
||||||
|
|
||||||
|
description = 'Annotation Processor to generate JPA 2 static metamodel classes'
|
||||||
|
|
||||||
|
ext {
|
||||||
|
xjcTargetDir = file( "${buildDir}/generated-src/xjc/main" )
|
||||||
|
xsdDir = file( "${projectDir}/src/main/xsd" )
|
||||||
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
testCompile libraries.junit
|
testCompile libraries.junit
|
||||||
testCompile libraries.jpa
|
testCompile libraries.jpa
|
||||||
testCompile project( ':hibernate-core' )
|
testCompile project( ':hibernate-core' )
|
||||||
}
|
}
|
||||||
|
|
||||||
mavenPom {
|
|
||||||
name = 'Hibernate JPA 2 Metamodel Generator'
|
|
||||||
description = 'Annotation Processor to generate JPA 2 static metamodel classes'
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
// Java 9 ftw!
|
|
||||||
if ( JavaVersion.current().isJava9Compatible() ) {
|
|
||||||
// The JDK used to run Gradle is Java 9+, and we assume that that is the same
|
|
||||||
// JDK for executing tasks
|
|
||||||
xjc( 'com.sun.xml.bind:jaxb-impl:2.2.11' )
|
|
||||||
xjc( 'org.glassfish.jaxb:jaxb-xjc:2.2.11' )
|
|
||||||
xjc( 'org.jvnet.jaxb2_commons:jaxb2-basics:0.11.0' )
|
|
||||||
xjc( 'org.jvnet.jaxb2_commons:jaxb2-basics-ant:0.11.0' )
|
|
||||||
xjc( 'javax:javaee-api:7.0' )
|
|
||||||
|
|
||||||
testRuntime( 'com.sun.xml.bind:jaxb-impl:2.2.11' )
|
|
||||||
testRuntime( 'org.glassfish.jaxb:jaxb-xjc:2.2.11' )
|
|
||||||
testRuntime( 'org.jvnet.jaxb2_commons:jaxb2-basics:0.11.0' )
|
|
||||||
testRuntime( 'org.jvnet.jaxb2_commons:jaxb2-basics-ant:0.11.0' )
|
|
||||||
testRuntime( 'javax:javaee-api:7.0' )
|
|
||||||
}
|
|
||||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
}
|
|
||||||
|
|
||||||
ext {
|
|
||||||
xjcTargetDir = file( "${buildDir}/generated-src/xjc/main" )
|
|
||||||
xsdDir = file( "${projectDir}/src/main/xsd" )
|
|
||||||
}
|
|
||||||
|
|
||||||
sourceSets.main {
|
sourceSets.main {
|
||||||
java.srcDir xjcTargetDir
|
java.srcDir xjcTargetDir
|
||||||
resources.srcDir xsdDir
|
resources.srcDir xsdDir
|
||||||
|
@ -55,14 +33,6 @@ compileTestJava {
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
jar {
|
|
||||||
manifest {
|
|
||||||
attributes 'Implementation-Title' : name,
|
|
||||||
'Implementation-Version' : version,
|
|
||||||
'Specification-Title' : name,
|
|
||||||
'Specification-Version' : version
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
task jaxb {
|
task jaxb {
|
||||||
// configure Gradle up-to-date checking
|
// configure Gradle up-to-date checking
|
||||||
|
|
Loading…
Reference in New Issue