-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
74 lines (61 loc) · 2.05 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
buildscript {
ext {
springBootVersion = '1.5.9.RELEASE'
}
repositories {
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
}
}
apply plugin: 'java'
apply plugin: 'org.springframework.boot'
apply from: 'gradle/dist.gradle'
group = 'com.yangxiaochen.euerka'
version = '1.0.2'
sourceCompatibility = 1.8
repositories {
mavenCentral()
}
ext {
springCloudVersion = 'Edgware.RELEASE'
}
dependencies {
compile('org.springframework.cloud:spring-cloud-starter-eureka-server')
testCompile('org.springframework.boot:spring-boot-starter-test')
}
dependencyManagement {
imports {
mavenBom "org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}"
}
}
task runExampleService1(dependsOn: [classes], type: JavaExec) {
group = "Run tasks"
description = "Run the example service1"
main = "com.yangxiaochen.euerka.EurekaServerApplication"
classpath = sourceSets.main.runtimeClasspath
args = ["--spring.profiles.active=peer1"]
}
task runExampleService2(dependsOn: [classes], type: JavaExec) {
group = "Run tasks"
description = "Run the example service2"
main = "com.yangxiaochen.euerka.EurekaServerApplication"
classpath = sourceSets.main.runtimeClasspath
args = ["--spring.profiles.active=peer2"]
}
task runExampleService3(dependsOn: [classes], type: JavaExec) {
group = "Run tasks"
description = "Run the example service3"
main = "com.yangxiaochen.euerka.EurekaServerApplication"
classpath = sourceSets.main.runtimeClasspath
args = ["--spring.profiles.active=peer3"]
}
task ExampleServiceStartScript(type: CreateStartScripts) {
mainClassName = "com.yangxiaochen.euerka.EurekaServerApplication"
applicationName = "ExampleEurekaService"
outputDir = new File(project.buildDir, 'scripts')
classpath = jar.outputs.files + project.configurations.runtime
// defaultJvmOpts = ["-Deureka.client.props=sample-eureka-service"]
// args = ["--spring.profiles.active=peer3"]
}