-
Notifications
You must be signed in to change notification settings - Fork 48
/
build.gradle
125 lines (95 loc) · 3.38 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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
apply plugin: 'war'
apply plugin: 'com.bmuschko.tomcat'
apply plugin: 'java'
apply plugin: 'propdeps'
apply plugin: 'propdeps-maven'
apply plugin: 'propdeps-idea'
apply plugin: 'propdeps-eclipse'
apply plugin: 'eclipse-wtp'
apply plugin: 'idea'
apply plugin: 'rebel'
println "PROJECT=" + project.name
buildscript {
repositories {
mavenLocal()
mavenCentral()
maven { url 'http://repo.spring.io/plugins-release' }
}
dependencies {
classpath 'com.bmuschko:gradle-tomcat-plugin:2.0'
classpath 'org.springframework.build.gradle:propdeps-plugin:0.0.5'
classpath 'org.zeroturnaround:gradle-jrebel-plugin:1.1.2'
}
}
repositories {
mavenLocal()
mavenCentral()
maven { url 'http://repo.spring.io/plugins-release' }
}
ext {
springVersion = "4.0.5.RELEASE"
springSecurityVersion = "3.2.5.RELEASE"
thymeleafVersion = "2.1.3.RELEASE"
tomcatVersion = "7.0.54"
}
dependencies {
compile "org.springframework:spring-core:$springVersion"
compile "org.springframework:spring-webmvc:$springVersion"
compile "org.springframework:spring-orm:$springVersion"
compile "org.springframework:spring-context-support:$springVersion"
compile "org.springframework.security:spring-security-web:$springSecurityVersion"
compile "org.springframework.security:spring-security-config:$springSecurityVersion"
compile "org.springframework.security:spring-security-taglibs:$springSecurityVersion"
compile "org.thymeleaf:thymeleaf:$thymeleafVersion"
compile "org.thymeleaf:thymeleaf-spring4:$thymeleafVersion"
compile "org.thymeleaf.extras:thymeleaf-extras-springsecurity3:2.1.1.RELEASE"
compile "nz.net.ultraq.thymeleaf:thymeleaf-layout-dialect:1.2.7"
compile "org.hibernate:hibernate-entitymanager:4.3.5.Final"
compile "org.hibernate:hibernate-validator:4.3.1.Final"
compile "mysql:mysql-connector-java:5.1.30"
compile "c3p0:c3p0:0.9.1.2"
compile "joda-time:joda-time:2.4"
compile "org.slf4j:slf4j-api:1.7.5"
runtime "org.slf4j:slf4j-log4j12:1.7.5"
testCompile "org.springframework:spring-test:$springVersion"
testCompile "junit:junit:4.11"
testCompile "org.mockito:mockito-core:1.9.5"
testCompile "org.hamcrest:hamcrest-library:1.3"
providedCompile "javax.servlet:javax.servlet-api:3.0.1"
tomcat "org.apache.tomcat.embed:tomcat-embed-core:$tomcatVersion",
"org.apache.tomcat.embed:tomcat-embed-logging-juli:$tomcatVersion"
tomcat("org.apache.tomcat.embed:tomcat-embed-jasper:$tomcatVersion") {
exclude group: 'org.eclipse.jdt.core.compiler', module: 'ecj'
}
}
test {
testLogging {
// Show that tests are run in the command-line output
events 'started', 'passed'
}
}
def appName = 'webapp'
def appWarName = appName + '.war'
def tomcatWebAppsHome = '/usr/local/tomcat7/webapps'
war {
archiveName appWarName
}
task deployWar() {
doLast {
delete tomcatWebAppsHome + "/" + appName
logger.lifecycle("Gonna deploy ${appWarName} into ${tomcatWebAppsHome} from ${libsDir.getPath()}")
copy {
from libsDir
into "${tomcatWebAppsHome}"
include "${appWarName}"
}
}
}
rebel {
alwaysGenerate = true
showGenerated = true
}
war.dependsOn(generateRebel)
deployWar.dependsOn(war)
task wrapper(type: Wrapper) { gradleVersion = '2.1' }
tomcatRunWar.contextPath = ''