-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
75 lines (59 loc) · 1.75 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
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'io.spring.gradle:dependency-management-plugin:0.5.4.RELEASE'
}
}
apply plugin: "io.spring.dependency-management"
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: 'war'
archivesBaseName = ""
war {
baseName = 'rundev'
version = '1.0.0-SNAPSHOT'
archivesBaseName = baseName
}
repositories {
mavenLocal()
mavenCentral()
}
configurations {
providedRuntime
}
dependencyManagement {
imports {
mavenBom 'io.spring.platform:platform-bom:2.0.1.RELEASE'
}
}
dependencies {
// Spring Boot
compile 'org.springframework.boot:spring-boot-starter-actuator'
compile 'org.springframework.boot:spring-boot-starter-web'
compile 'org.springframework.boot:spring-boot-starter-data-jpa'
//in memory db
compile 'org.hsqldb:hsqldb:2.3.1'
// Apache Tiles
compile 'org.apache.tiles:tiles-core'
compile 'org.apache.tiles:tiles-jsp'
providedRuntime 'org.springframework.boot:spring-boot-starter-tomcat'
providedRuntime 'org.apache.tomcat.embed:tomcat-embed-jasper:8.0.15'
compile 'javax.servlet:jstl'
testCompile group: 'junit', name: 'junit', version: '4.11'
}
task wrapper(type: Wrapper) {
gradleVersion = '2.10'
}
task deploylocal(dependsOn: war) << {
println "Removing $System.env.TOMCAT_HOME/webapps/${archivesBaseName}"
delete "$System.env.TOMCAT_HOME/webapps/${archivesBaseName}", "$System.env.TOMCAT_HOME/webapps/${archivesBaseName}.war"
println "Copy from ${libsDir.getPath()} into $System.env.TOMCAT_HOME/webapps"
copy{
from libsDir
into "$System.env.TOMCAT_HOME/webapps/"
rename "(.*).war", "${archivesBaseName}.war"
}
}