diff --git a/build.gradle b/build.gradle index 123ad83475..21be11b5af 100644 --- a/build.gradle +++ b/build.gradle @@ -109,15 +109,15 @@ subprojects { subProject -> // minimize changes, at least for now (gradle uses 'build' by default).. buildDir = "target" - if ( subProject.name.startsWith( 'release' ) || subProject.name.startsWith( 'documentation' ) ) { - return; + if ( subProject.name.startsWith( 'release' ) ) { + return } if ( subProject.name.startsWith( 'hibernate-orm-modules' ) ) { - return; + return } - // everything below here in the closure applies to java projects + // everything below here in the closure applies to modules with Java code apply plugin: 'java' apply plugin: 'maven-publish' apply plugin: 'maven-publish-auth' @@ -455,28 +455,31 @@ subprojects { subProject -> // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Publishing - publishing { - publications { - mavenJava(MavenPublication) { - from components.java + if ( !subProject.name.equals( 'documentation' ) ) { + // do not configure publishing for the documentation module + publishing { + publications { + mavenJava(MavenPublication) { + from components.java - artifact( sourcesJar ) { - classifier 'sources' + artifact( sourcesJar ) { + classifier 'sources' + } } + // 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 } - // 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" ) + model { + tasks.generatePomFileForMavenJavaPublication { + destination = file( "$subProject.buildDir/generated-pom.xml" ) + } } } // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/documentation/documentation.gradle b/documentation/documentation.gradle index 4bf010a288..53b539eabd 100644 --- a/documentation/documentation.gradle +++ b/documentation/documentation.gradle @@ -1,5 +1,6 @@ import org.apache.tools.ant.filters.ReplaceTokens import org.asciidoctor.gradle.AsciidoctorTask + /* * Hibernate, Relational Persistence for Idiomatic Java * @@ -8,13 +9,6 @@ import org.asciidoctor.gradle.AsciidoctorTask */ buildscript { repositories { - mavenCentral() - mavenLocal() - - maven { - name 'jboss-nexus' - url "http://repository.jboss.org/nexus/content/groups/public/" - } jcenter() } dependencies { @@ -74,19 +68,6 @@ dependencies { testCompile "org.osgi:org.osgi.core:4.3.1" - if (db.equalsIgnoreCase("oracle")) { - dependencies { - testRuntime( libraries.oracle ) { - exclude group: 'com.oracle.jdbc', module: 'xmlparserv2' - } - } - } - if (db.equalsIgnoreCase("hana")) { - dependencies { - testRuntime( libraries.hana ) - } - } - // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Java 9 ftw! if ( JavaVersion.current().isJava9Compatible() ) { @@ -113,21 +94,6 @@ dependencies { // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } -processTestResources.doLast( { - copy { - from( sourceSets.test.java.srcDirs ) { - include '**/*.properties' - include '**/*.xml' - } - into sourceSets.test.output.classesDir - } - copy { - ext.targetDir = file( "${buildDir}/resources/test" ) - from file('src/test/resources') - into targetDir - filter( ReplaceTokens, tokens: dbBundle[db] ); - } -} ) // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // grouping tasks - declaration, see below for task dependency definitions