From 6a3fbc2694b692142dc4d1e8ee8b0b5c977737cd Mon Sep 17 00:00:00 2001 From: Costin Leau Date: Tue, 30 Apr 2013 13:47:41 +0300 Subject: [PATCH] publish nightly builds fixes #29 --- build.gradle | 8 +++--- gradle.properties | 2 +- maven.gradle | 69 +++++++++++++++++++++++++++++++++++++++++++++++ settings.gradle | 1 + 4 files changed, 74 insertions(+), 6 deletions(-) create mode 100644 maven.gradle create mode 100644 settings.gradle diff --git a/build.gradle b/build.gradle index f7b79551c..fe295ccdb 100644 --- a/build.gradle +++ b/build.gradle @@ -7,9 +7,6 @@ buildscript { } } -description = 'ElasticSearch Hadoop' -group = 'org.elasticsearch.hadoop' - repositories { mavenCentral() maven { url "http://oss.sonatype.org/content/groups/public/" } @@ -21,6 +18,7 @@ repositories { apply plugin: "java" apply plugin: 'eclipse' apply plugin: 'idea' +apply from: "$rootDir/maven.gradle" apply plugin: 'propdeps' apply plugin: 'propdeps-idea' apply plugin: 'propdeps-eclipse' @@ -126,7 +124,7 @@ test { "org/elasticsearch/hadoop/integration/**/*Suite.class"] testLogging { - events "started" //, "standardOut", "standardError" + events "started" , "standardOut", "standardError" minGranularity 2 maxGranularity 2 } @@ -169,7 +167,7 @@ jar { manifest.attributes['Implementation-Version'] = project.version manifest.attributes['Implementation-URL'] = "http://github.com/elasticsearch/elasticsearch-hadoop" manifest.attributes['Implementation-Vendor'] = "Elasticsearch" - manifest.attributes['Implementation-Vendor-Id'] = "org.elasticsearch" + manifest.attributes['Implementation-Vendor-Id'] = "org.elasticsearch.hadoop" def build = System.env['ESHDP.BUILD'] if (build != null) diff --git a/gradle.properties b/gradle.properties index ca18a133f..59d8e70ad 100644 --- a/gradle.properties +++ b/gradle.properties @@ -28,4 +28,4 @@ esVersion = 0.90.0 # -------------------- # Project wide version # -------------------- -version=1.0.0.BUILD-SNAPSHOT \ No newline at end of file +version=1.3.0.BUILD-SNAPSHOT \ No newline at end of file diff --git a/maven.gradle b/maven.gradle new file mode 100644 index 000000000..da9636893 --- /dev/null +++ b/maven.gradle @@ -0,0 +1,69 @@ +apply plugin: "maven" +apply plugin: "propdeps-maven" + +def customizePom(pom, gradleProject) { + pom.whenConfigured { generatedPom -> + + // eliminate test-scoped dependencies (no need in maven central poms) + generatedPom.dependencies.removeAll { dep -> + dep.scope == 'test' + } + + // add all items necessary for maven central publication + generatedPom.project { + name = gradleProject.description + description = gradleProject.description + url = 'http://github.com/elasticsearch/elasticsearch-hadoop' + organization { + name = 'Elasticsearch' + url = 'http://www.elasticsearch.org/' + } + licenses { + license { + name 'The Apache Software License, Version 2.0' + url 'http://www.apache.org/licenses/LICENSE-2.0.txt' + distribution 'repo' + } + } + scm { + url = 'http://github.com/elasticsearch/elasticsearch-hadoop' + connection = 'scm:git:git://github.com/elasticsearch/elasticsearch-hadoop' + developerConnection = 'scm:git:git://github.com/elasticsearch/elasticsearch-hadoop' + } + developers { + developer { + id = 'costin' + name = 'Costin Leau' + email = 'costin@elasticsearch.com' + properties { + twitter = 'costinl' + } + } + } + } + + groupId = "org.elasticsearch" + artifactId = "elasticsearch-hadoop" + } +} + +uploadArchives { + repositories { + mavenDeployer { + customizePom(pom, project) + + repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") { + authentication(userName: sonatypeUsername, password: sonatypePassword) + } + snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") { + authentication(userName: sonatypeUsername, password: sonatypePassword) + } + } + } +} + +install { + repositories.mavenInstaller { + customizePom(pom, project) + } +} \ No newline at end of file diff --git a/settings.gradle b/settings.gradle new file mode 100644 index 000000000..e070303b2 --- /dev/null +++ b/settings.gradle @@ -0,0 +1 @@ +rootProject.name = "elasticsearch-hadoop" \ No newline at end of file