2010-05-01 18:28:28 -04:00
|
|
|
dependsOn(':elasticsearch')
|
|
|
|
|
|
|
|
apply plugin: 'java'
|
|
|
|
apply plugin: 'maven'
|
2011-05-23 10:14:22 -04:00
|
|
|
apply plugin: 'eclipse'
|
2010-05-01 18:28:28 -04:00
|
|
|
|
2010-07-24 16:39:43 -04:00
|
|
|
archivesBaseName = "elasticsearch-cloud-aws"
|
2010-05-01 18:28:28 -04:00
|
|
|
|
|
|
|
explodedDistDir = new File(distsDir, 'exploded')
|
|
|
|
|
|
|
|
configurations.compile.transitive = true
|
|
|
|
configurations.testCompile.transitive = true
|
|
|
|
|
|
|
|
// no need to use the resource dir
|
|
|
|
sourceSets.main.resources.srcDirs 'src/main/java'
|
|
|
|
sourceSets.test.resources.srcDirs 'src/test/java'
|
|
|
|
|
2010-07-24 16:39:43 -04:00
|
|
|
jar {
|
2010-05-01 18:28:28 -04:00
|
|
|
// from sourceSets.main.allJava
|
2010-07-24 16:39:43 -04:00
|
|
|
manifest {
|
|
|
|
attributes("Implementation-Title": "ElasticSearch", "Implementation-Version": rootProject.version, "Implementation-Date": buildTimeStr)
|
|
|
|
}
|
|
|
|
}
|
2010-05-01 18:28:28 -04:00
|
|
|
|
|
|
|
configurations {
|
|
|
|
dists
|
|
|
|
distLib {
|
|
|
|
visible = false
|
2010-07-24 16:39:43 -04:00
|
|
|
transitive = false
|
2010-05-01 18:28:28 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
compile project(':elasticsearch')
|
2011-07-16 01:58:48 -04:00
|
|
|
compile("com.amazonaws:aws-java-sdk:1.2.4") { transitive = false }
|
2010-07-24 16:39:43 -04:00
|
|
|
runtime("commons-logging:commons-logging:1.1.1") { transitive = false }
|
|
|
|
runtime("commons-codec:commons-codec:1.3") { transitive = false }
|
2011-05-20 19:08:39 -04:00
|
|
|
runtime("org.apache.httpcomponents:httpclient:4.1.1") { transitive = false }
|
|
|
|
runtime("org.apache.httpcomponents:httpcore:4.1") { transitive = false }
|
2010-07-24 16:39:43 -04:00
|
|
|
|
2011-07-16 01:58:48 -04:00
|
|
|
distLib("com.amazonaws:aws-java-sdk:1.2.4") { transitive = false }
|
2010-07-24 16:39:43 -04:00
|
|
|
distLib("commons-codec:commons-codec:1.3") { transitive = false }
|
|
|
|
distLib("commons-logging:commons-logging:1.1.1") { transitive = false }
|
2011-05-20 19:08:39 -04:00
|
|
|
distLib("org.apache.httpcomponents:httpclient:4.1.1") { transitive = false }
|
|
|
|
distLib("org.apache.httpcomponents:httpcore:4.1") { transitive = false }
|
2010-05-01 18:28:28 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
task explodedDist(dependsOn: [jar], description: 'Builds the plugin zip file') << {
|
|
|
|
[explodedDistDir]*.mkdirs()
|
|
|
|
|
|
|
|
copy {
|
|
|
|
from configurations.distLib
|
|
|
|
into explodedDistDir
|
|
|
|
}
|
|
|
|
|
|
|
|
// remove elasticsearch files (compile above adds the elasticsearch one)
|
|
|
|
ant.delete { fileset(dir: explodedDistDir, includes: "elasticsearch-*.jar") }
|
|
|
|
|
|
|
|
copy {
|
|
|
|
from libsDir
|
|
|
|
into explodedDistDir
|
|
|
|
}
|
|
|
|
|
|
|
|
ant.delete { fileset(dir: explodedDistDir, includes: "elasticsearch-*-javadoc.jar") }
|
|
|
|
ant.delete { fileset(dir: explodedDistDir, includes: "elasticsearch-*-sources.jar") }
|
|
|
|
}
|
|
|
|
|
|
|
|
task zip(type: Zip, dependsOn: ['explodedDist']) {
|
|
|
|
from(explodedDistDir) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
task release(dependsOn: [zip]) << {
|
|
|
|
ant.delete(dir: explodedDistDir)
|
|
|
|
copy {
|
|
|
|
from distsDir
|
|
|
|
into(new File(rootProject.distsDir, "plugins"))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
configurations {
|
|
|
|
deployerJars
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
deployerJars "org.apache.maven.wagon:wagon-http:1.0-beta-2"
|
|
|
|
}
|
|
|
|
|
|
|
|
task sourcesJar(type: Jar, dependsOn: classes) {
|
|
|
|
classifier = 'sources'
|
|
|
|
from sourceSets.main.allSource
|
|
|
|
}
|
|
|
|
|
|
|
|
task javadocJar(type: Jar, dependsOn: javadoc) {
|
|
|
|
classifier = 'javadoc'
|
|
|
|
from javadoc.destinationDir
|
|
|
|
}
|
|
|
|
|
|
|
|
artifacts {
|
|
|
|
archives sourcesJar
|
|
|
|
archives javadocJar
|
|
|
|
}
|
|
|
|
|
|
|
|
uploadArchives {
|
|
|
|
repositories.mavenDeployer {
|
|
|
|
configuration = configurations.deployerJars
|
|
|
|
repository(url: rootProject.mavenRepoUrl) {
|
|
|
|
authentication(userName: rootProject.mavenRepoUser, password: rootProject.mavenRepoPass)
|
|
|
|
}
|
|
|
|
snapshotRepository(url: rootProject.mavenSnapshotRepoUrl) {
|
|
|
|
authentication(userName: rootProject.mavenRepoUser, password: rootProject.mavenRepoPass)
|
|
|
|
}
|
|
|
|
|
|
|
|
pom.project {
|
|
|
|
inceptionYear '2009'
|
2010-07-24 16:39:43 -04:00
|
|
|
name 'elasticsearch-plugins-cloud-aws'
|
|
|
|
description 'Cloud AWS Plugin for ElasticSearch'
|
2010-05-01 18:28:28 -04:00
|
|
|
licenses {
|
|
|
|
license {
|
|
|
|
name 'The Apache Software License, Version 2.0'
|
|
|
|
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
|
|
|
|
distribution 'repo'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
scm {
|
|
|
|
connection 'git://github.com/elasticsearch/elasticsearch.git'
|
|
|
|
developerConnection 'git@github.com:elasticsearch/elasticsearch.git'
|
|
|
|
url 'http://github.com/elasticsearch/elasticsearch'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
pom.whenConfigured {pom ->
|
|
|
|
pom.dependencies = pom.dependencies.findAll {dep -> dep.scope != 'test' } // removes the test scoped ones
|
|
|
|
}
|
|
|
|
}
|
2011-05-23 10:14:22 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
eclipseClasspath {
|
|
|
|
defaultOutputDir = file('build/eclipse-build')
|
2010-07-24 16:39:43 -04:00
|
|
|
}
|