HHH-5616 - Switch to Gradle for builds .. uploads
This commit is contained in:
parent
cf19ba338f
commit
901513ed7c
69
build.gradle
69
build.gradle
|
@ -77,10 +77,6 @@ subprojects { subProject ->
|
||||||
// minimize changes, at least for now (gradle uses 'build' by default)..
|
// minimize changes, at least for now (gradle uses 'build' by default)..
|
||||||
buildDirName = "target"
|
buildDirName = "target"
|
||||||
|
|
||||||
// if ( 'hibernate-release' == subProject.name ) {
|
|
||||||
// apply plugin : 'base'
|
|
||||||
// }
|
|
||||||
// else {
|
|
||||||
if ( 'hibernate-release' != subProject.name ) {
|
if ( 'hibernate-release' != subProject.name ) {
|
||||||
apply plugin: 'java'
|
apply plugin: 'java'
|
||||||
apply plugin: 'maven' // for install task as well as deploy dependencies
|
apply plugin: 'maven' // for install task as well as deploy dependencies
|
||||||
|
@ -90,6 +86,9 @@ subprojects { subProject ->
|
||||||
// todo : need to make sure these are non-exported
|
// todo : need to make sure these are non-exported
|
||||||
description = 'Non-exported compile-time dependencies.'
|
description = 'Non-exported compile-time dependencies.'
|
||||||
}
|
}
|
||||||
|
deployerJars {
|
||||||
|
description = 'Jars needed for doing deployment to JBoss Nexus repo'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// appropriately inject the common dependencies into each sub-project
|
// appropriately inject the common dependencies into each sub-project
|
||||||
|
@ -102,6 +101,7 @@ subprojects { subProject ->
|
||||||
testRuntime( libraries.jcl )
|
testRuntime( libraries.jcl )
|
||||||
testRuntime( libraries.javassist )
|
testRuntime( libraries.javassist )
|
||||||
testRuntime( libraries.h2 )
|
testRuntime( libraries.h2 )
|
||||||
|
deployerJars "org.apache.maven.wagon:wagon-http:1.0-beta-6"
|
||||||
}
|
}
|
||||||
|
|
||||||
sourceSets {
|
sourceSets {
|
||||||
|
@ -120,12 +120,11 @@ subprojects { subProject ->
|
||||||
|
|
||||||
test {
|
test {
|
||||||
// ignoreFailures = true
|
// ignoreFailures = true
|
||||||
environment['hibernate.test.validatefailureexpected'] = true
|
systemProperties['hibernate.test.validatefailureexpected'] = true
|
||||||
maxHeapSize = "1024m"
|
maxHeapSize = "1024m"
|
||||||
}
|
}
|
||||||
|
|
||||||
processTestResources.doLast(
|
processTestResources.doLast( {
|
||||||
{
|
|
||||||
copy {
|
copy {
|
||||||
from( sourceSets.test.java.srcDirs ) {
|
from( sourceSets.test.java.srcDirs ) {
|
||||||
include '**/*.properties'
|
include '**/*.properties'
|
||||||
|
@ -133,8 +132,7 @@ subprojects { subProject ->
|
||||||
}
|
}
|
||||||
into sourceSets.test.classesDir
|
into sourceSets.test.classesDir
|
||||||
}
|
}
|
||||||
}
|
} )
|
||||||
)
|
|
||||||
|
|
||||||
assemble.doLast( { install } )
|
assemble.doLast( { install } )
|
||||||
uploadArchives.dependsOn install
|
uploadArchives.dependsOn install
|
||||||
|
@ -151,7 +149,60 @@ subprojects { subProject ->
|
||||||
module.dependencies*.exported = true
|
module.dependencies*.exported = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// elements used to customize the generated POM used during upload
|
||||||
|
def pomConfig = {
|
||||||
|
url 'http://hibernate.org'
|
||||||
|
organization 'Hibernate.org'
|
||||||
|
issueManagement {
|
||||||
|
system 'jira'
|
||||||
|
url 'http://opensource.atlassian.com/projects/hibernate/browse/HHH'
|
||||||
}
|
}
|
||||||
|
scm {
|
||||||
|
url "http://github.com/hibernate/hibernate-core"
|
||||||
|
connection "scm:git:http://github.com/hibernate/hibernate-core.git"
|
||||||
|
developerConnection "scm:git:git@github.com:hibernate/hibernate-core.git"
|
||||||
|
}
|
||||||
|
licenses {
|
||||||
|
license {
|
||||||
|
name 'GNU Lesser General Public License'
|
||||||
|
url 'http://www.gnu.org/licenses/lgpl-2.1.html'
|
||||||
|
comments 'See discussion at http://hibernate.org/356.html for more details.'
|
||||||
|
distribution 'repo'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
developers {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
configure(install.repositories.mavenInstaller) {
|
||||||
|
pom.project pomConfig
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( ! project.hasProperty('MY_JBOSS_USER') ) {
|
||||||
|
MY_JBOSS_USER = "";
|
||||||
|
}
|
||||||
|
if ( ! project.hasProperty('MY_JBOSS_PASS') ) {
|
||||||
|
MY_JBOSS_PASS = "";
|
||||||
|
}
|
||||||
|
|
||||||
|
uploadArchives {
|
||||||
|
repositories.mavenDeployer {
|
||||||
|
name = 'jbossDeployer'
|
||||||
|
configuration = configurations.deployerJars
|
||||||
|
pom.project pomConfig
|
||||||
|
credentials = [userName: MY_JBOSS_USER, password: MY_JBOSS_PASS]
|
||||||
|
repository(url: "https://repository.jboss.org/nexus/service/local/staging/deploy/maven2/") {
|
||||||
|
authentication(credentials)
|
||||||
|
}
|
||||||
|
snapshotRepository(url: "https://repository.jboss.org/nexus/content/repositories/snapshots") {
|
||||||
|
authentication(credentials)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
dependsOnChildren()
|
dependsOnChildren()
|
|
@ -44,6 +44,9 @@ sourceSets {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// http://jira.codehaus.org/browse/GRADLE-1158
|
||||||
|
test.testReport = false
|
||||||
|
|
||||||
//ideaModule {
|
//ideaModule {
|
||||||
// sourceDirs.add( file( buildDirName + '/generated-src/antlr/main' ) )
|
// sourceDirs.add( file( buildDirName + '/generated-src/antlr/main' ) )
|
||||||
// testSourceDirs.addAll( sourceSets.matrix.java.srcDirs )
|
// testSourceDirs.addAll( sourceSets.matrix.java.srcDirs )
|
||||||
|
|
Loading…
Reference in New Issue