forked from elastic/elasticsearch-hadoop
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
91 lines (73 loc) · 2.63 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
description = 'Elasticsearch YARN'
configurations {
hadoop2
}
dependencies {
provided("org.elasticsearch:elasticsearch:$esVersion")
provided("org.apache.hadoop:hadoop-client:$hadoop2Version")
testCompile("org.apache.hadoop:hadoop-common:$hadoop2Version")
testCompile("org.apache.hadoop:hadoop-common:$hadoop2Version:tests")
testCompile("org.apache.hadoop:hadoop-yarn-server-tests:$hadoop2Version")
testCompile("org.apache.hadoop:hadoop-yarn-server-tests:$hadoop2Version:tests")
testCompile("org.apache.hadoop:hadoop-hdfs:$hadoop2Version")
testCompile("org.apache.hadoop:hadoop-hdfs:$hadoop2Version:tests")
}
processResources {
expand (version: project.version, esVersionStable: project.esVersionStable)
}
jar {
manifest {
from manifestTemplate
attributes['Implementation-Title'] = 'elasticsearch-yarn'
attributes['Main-Class'] = 'org.elasticsearch.hadoop.yarn.cli.YarnBootstrap'
}
from("$rootDir/docs/src/info") {
include "license.txt"
include "notice.txt"
into "META-INF"
expand(copyright: new Date().format('yyyy'), version: project.version)
}
}
def baseZip(Zip zip) {
zip.group = "Distribution"
artifacts { s3 zip }
zip.from("../") {
include "LICENSE.txt"
include "NOTICE.txt"
//expand(yyyy: new Date().format("yyyy"), version: project.version)
}
zip.from (".") { include "README.md" }
zip.from jar.archivePath
// tell Gradle about our output (for incremental build) - disabled for now since the sha1 is created alongside the zip
// zip.outputs.file file(zip.archivePath.absolutePath + '.sha1.txt')
// execute phase
zip << {
ant.checksum(file: zip.archivePath, algorithm: 'SHA1', format: 'MD5SUM', fileext: '.sha1.txt')
}
}
task distZipHadoop2(type: Zip, dependsOn: [jar]) { zipTask ->
baseZip(zipTask)
description = "Builds archive (with Hadoop2/YARN dependencies) suitable for download page."
from configurations.hadoop2.allArtifacts.files
from configurations.hadoop2
}
task distZipNoHadoop(type: Zip, dependsOn: [jar]) { zipTask ->
baseZip(zipTask)
description = "Builds archive (without any Hadoop dependencies) suitable for download page."
classifier = "light"
}
task distZip(dependsOn : [distZipHadoop2, distZipNoHadoop]) {
group = "Distribution"
description = "Builds all distribution zips for Elasticseach YARN"
}
pack() {
artifacts {
archives distZipHadoop2
archives distZipNoHadoop
}
}
uploadToS3() {
ext.toDir = "elasticsearch/elasticsearch-yarn"
}
assemble.dependsOn = ['jar']
defaultTasks 'build'