-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
103 lines (84 loc) · 2.74 KB
/
Copy pathbuild.gradle
File metadata and controls
103 lines (84 loc) · 2.74 KB
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
92
93
94
95
96
97
98
99
100
101
102
group 'rfxlab'
version = '1.0'
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'maven'
sourceCompatibility = 1.8
repositories {
mavenCentral()
mavenLocal()
maven {
url = "https://oss.sonatype.org/content/repositories/snapshots"
}
}
dependencies {
compile(
'io.vertx:vertx-core:3.8.1'
,'com.google.code.gson:gson:2.8.5'
,'log4j:log4j:1.2.17'
,'org.jsoup:jsoup:1.12.1'
,'org.apache.commons:commons-lang3:3.3.2'
,'commons-net:commons-net:3.6'
,'commons-io:commons-io:2.6'
,'redis.clients:jedis:3.1.0'
,'org.apache.httpcomponents:httpclient:4.5.9'
,'com.google.guava:guava:22.0'
,'org.yaml:snakeyaml:1.18'
,'org.apache.commons:commons-csv:1.2'
// VertX web for REST API
,'io.vertx:vertx-web:3.8.1'
// RFX all libs
,'rfx:rfx-core:1.0'
,'rfx:rfx-data-util:1.0'
,'rfx:rfx-stream:1.0'
,'rfx:rfx-track:1.0'
// Apache Spark and Hadoop libs
,'org.apache.hadoop:hadoop-mapreduce-client-core:2.9.2',
,'org.apache.hadoop:hadoop-common:2.9.2'
,'org.apache.spark:spark-core_2.11:2.4.7'
,'org.apache.spark:spark-sql_2.11:2.4.7'
,'org.apache.spark:spark-mllib_2.11:2.4.7'
,'com.fasterxml.jackson.module:jackson-module-scala_2.11:2.9.9'
)
compile group: 'com.github.fommil.netlib', name: 'all', version: '1.1.2', ext: 'pom'
testCompile group: 'junit', name: 'junit', version: '4.12'
}
tasks.withType(Jar) {
destinationDir = file("$rootDir/BUILD-OUTPUT")
}
def getClasspathStringJars() {
def baseFolder = 'deps/'
def fileNames = []
configurations.compile.each { File file -> fileNames.add(baseFolder + file.name) }
def classpath = fileNames.join(" ; ")
return classpath
}
// copy configs
task CopyConfigs(type: Copy) {
into "BUILD-OUTPUT/configs"
from files('configs')
}
// copy dependency libs
task CopyRuntimeLibs(type: Copy) {
into "BUILD-OUTPUT/deps"
from configurations.compile
}
task BuildMainStarter(type: Jar) {
dependsOn classes
from(sourceSets.main.output) {
include "**"
}
version = '1.0'
baseName = 'video-recommender'
def classpath = '. ; ' + getClasspathStringJars() + ' ; '
manifest {
attributes('Implementation-Title': 'ApiDataHttpServer',
'Implementation-Version': version,
'Main-Class': 'rfxlab.com.server.ApiDataHttpServer',
'Class-Path': classpath)
}
}
// copy and deploy
task BuildDeployToRemoteServers(type: Exec) {
commandLine 'sh', './shell-scripts/deploy.sh'
}