-
Notifications
You must be signed in to change notification settings - Fork 63
/
Copy pathbuild.gradle
154 lines (118 loc) · 4.69 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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
apply plugin: 'base'
ext.springVersion = '3.2.3.RELEASE'
ext.tilesVersion = '2.2.2'
ext.springSecurityVersion = '3.1.4.RELEASE'
ext.springSwfVersion = '2.3.2.RELEASE'
ext.hibernateVersion = '4.2.3.Final'
ext.hibernateValidatorVersion = '5.0.1.Final'
ext.ehCacheVersion = '2.7.2'
ext.aspectJVersion = '1.7.3'
ext.tomcatVersion = '7.0.42'
ext.cargoVersion = '1.3.3'
ext.webProjects = subprojects.findAll { project -> project.name.endsWith('bookstore') }
buildscript {
repositories {
maven { url 'http://jcenter.bintray.com/' }
}
dependencies {
classpath 'org.gradle.api.plugins:gradle-tomcat-plugin:1.2.4'
classpath 'org.gradle.api.plugins:gradle-cargo-plugin:1.5'
}
}
allprojects {
description = 'Bookstore Sample Application'
group = 'com.apress.prospringmvc'
version = '1.0.0'
repositories {
mavenRepo url: 'http://maven.springframework.org/release'
mavenRepo url: 'http://maven.springframework.org/snapshot'
mavenCentral()
mavenRepo url: 'http://maven.springframework.org/milestone'
mavenRepo url: 'https://repository.jboss.org/nexus/content/repositories/releases/'
mavenRepo url: 'http://download.java.net/maven/glassfish/org/glassfish/'
}
tasks.withType(Compile) {
options.compilerArgs << "-g"
}
}
configure(webProjects) {
apply plugin: 'war'
apply plugin: 'jetty'
apply plugin: 'tomcat'
apply plugin: 'cargo'
dependencies() {
compile project(':bookstore-shared'), project(':bookstore-web-resources')
compile "org.apache.tiles:tiles-servlet:$tilesVersion"
compile "org.apache.tiles:tiles-jsp:$tilesVersion"
compile "org.apache.tiles:tiles-api:$tilesVersion"
compile "org.apache.tiles:tiles-core:$tilesVersion"
runtime "jstl:jstl:1.2"
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'
cargo "org.codehaus.cargo:cargo-core-uberjar:${cargoVersion}",
"org.codehaus.cargo:cargo-ant:${cargoVersion}"
}
}
cargo {
containerId = 'tomcat7x'
port = 8080
local {
homeDir = file('container/apache-tomcat-7.0.42')
output = file('container/apache-tomcat-7.0.42/output.log')
}
}
war {
version = '' //We do this to make the wars versionless, when they are deployed with cargo, the context
//root of the app is equal to the file name, which is equal to the sample directory name.
}
task systemTest(type: Test) {
include '**/*FrontendTest.*'
dependsOn(war)
doFirst {
cargoStartLocal.execute()
}
}
test {
exclude '**/*FrontendTest.*'
}
}
subprojects() {
apply plugin: 'java'
apply plugin: 'eclipse-wtp'
apply plugin: 'idea'
sourceCompatibility = 1.7
targetCompatibility = 1.7
dependencies() {
compile "org.springframework:spring-orm:$springVersion"
compile "org.springframework:spring-aop:$springVersion"
compile "org.springframework:spring-webmvc:$springVersion"
compile "org.springframework:spring-oxm:$springVersion"
compile 'org.slf4j:jcl-over-slf4j:1.7.2'
compile 'ch.qos.logback:logback-classic:1.0.9'
compile 'org.apache.commons:commons-lang3:3.0.1'
compile 'com.thoughtworks.xstream:xstream:1.4.2'
compile 'com.h2database:h2:1.3.168'
compile 'cglib:cglib-nodep:2.2.2'
compile "org.aspectj:aspectjrt:$aspectJVersion"
compile "org.aspectj:aspectjweaver:$aspectJVersion"
compile "org.hibernate:hibernate-entitymanager:$hibernateVersion"
compile "org.hibernate:hibernate-core:$hibernateVersion"
compile "org.hibernate:hibernate-ehcache:$hibernateVersion"
compile "org.hibernate:hibernate-validator:$hibernateValidatorVersion"
compile "net.sf.ehcache:ehcache:$ehCacheVersion"
compile 'com.lowagie:itext:2.1.7'
compile 'net.sourceforge.jexcelapi:jxl:2.6.12'
compile 'org.codehaus.jackson:jackson-mapper-asl:1.9.11'
compile 'commons-codec:commons-codec:1.6'
compile 'joda-time:joda-time:2.1'
testCompile 'junit:junit:4.11'
testCompile "org.springframework:spring-test:$springVersion"
}
eclipse {
project.natures "org.springframework.ide.eclipse.core.springnature"
}
}
task wrapper(type: Wrapper) { gradleVersion = '1.6' }