-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
83 lines (69 loc) · 1.87 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
buildscript {
ext {
springBootVersion = '1.3.1.RELEASE'
}
repositories {
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
}
}
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: 'spring-boot'
version = '1.0'
jar {
baseName = 'launcher-java-opts-bug'
// version = '0.0.1-SNAPSHOT'
}
sourceCompatibility = 1.7
targetCompatibility = 1.7
repositories {
mavenCentral()
}
dependencies {
compile('org.springframework.boot:spring-boot-starter')
testCompile('org.springframework.boot:spring-boot-starter-test')
}
eclipse {
classpath {
containers.remove('org.eclipse.jdt.launching.JRE_CONTAINER')
containers 'org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8'
}
}
task wrapper(type: Wrapper) {
gradleVersion = '2.9'
}
springBoot {
executable = true
}
task demoZip(type: Zip, dependsOn:'build') {
baseName = project.name
from('build/libs') {
include "*.jar"
include "*.conf"
}
from('./') {
include "${project.name}-demo.sh"
}
}
demoZip.doFirst {
def confFile = new File("build/libs/${project.name}-${version}.conf")
confFile << 'LOG_FOLDER="${WORKING_DIR}"' + "\n"
confFile << "LOG_FILENAME=\"${project.name}.log\"\n"
confFile << 'JAVA_OPTS="-Xmx100M -Dspring.profiles.active=myProfile"'
}
demoZip.doLast {
println ""
println "////"
println "// Manual steps required to demonstrate the bug"
println "////"
println "1. Copy build/distributions/launcher-java-opts-bug-1.0.zip to a Linux machine with > Java 7"
println "1a. Linux user must have sudo priveleges"
println "2. In any folder, 'unzip launcher-java-opts-bug-1.0.zip'"
println "3. Run launcher-java-opts-bug-demo.sh"
println "3a. If necessary, provide sudoer password"
println "4. Read and follow manual steps listed in the script's output"
}