forked from cloudfoundry-samples/spring-music
-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.gradle
156 lines (125 loc) · 3.82 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
155
156
buildscript {
repositories {
jcenter()
mavenCentral()
maven { url "https://repo.spring.io/plugins-release" }
}
dependencies {
classpath 'org.gradle.api.plugins:gradle-tomcat-plugin:1.2.5'
classpath 'org.cloudfoundry:cf-gradle-plugin:1.1.3'
classpath("io.spring.gradle:dependency-management-plugin:0.5.3.RELEASE")
classpath("org.springframework.build.gradle:propdeps-plugin:0.0.7")
}
}
apply plugin: 'java'
apply plugin: 'eclipse-wtp'
apply plugin: 'idea'
apply plugin: 'tomcat'
apply plugin: 'war'
apply plugin: 'cloudfoundry'
apply plugin: 'io.spring.dependency-management'
apply plugin: 'propdeps'
apply plugin: "propdeps-idea"
version = '1.0'
sourceSets {
main {
java {
srcDir 'src/main/java'
}
resources {
srcDir 'src/main/resources'
srcDir 'src/main/java'
}
}
}
sourceCompatibility = 1.7
targetCompatibility = 1.7
archivesBaseName = "spring-music"
jar {
manifest {
attributes 'Implementation-Title': 'Spring Sample Application', 'Implementation-Version': version
}
}
repositories {
mavenCentral()
maven { url "http://repo.spring.io/milestone" }
}
dependencyManagement {
imports {
mavenBom 'io.spring.platform:platform-bom:2.0.0.RC1'
}
}
dependencies {
// Spring and dependencies
compile "org.springframework:spring-context"
compile "org.springframework:spring-webmvc"
// Spring Cloud
compile "org.springframework.cloud:spring-cloud-spring-service-connector"
compile "org.springframework.cloud:spring-cloud-cloudfoundry-connector"
// Spring Data
compile "org.springframework.data:spring-data-jpa"
compile "org.springframework.data:spring-data-redis"
compile "org.springframework.data:spring-data-mongodb"
// JPA Persistence
compile "commons-dbcp:commons-dbcp"
compile "org.hibernate:hibernate-entitymanager"
runtime "com.h2database:h2"
runtime "mysql:mysql-connector-java"
runtime "postgresql:postgresql:9.1-901-1.jdbc4"
// Redis Persistence
compile "redis.clients:jedis"
// JSR-303 validation
compile "javax.validation:validation-api"
compile "org.hibernate:hibernate-validator"
// Webjars
compile "org.webjars:bootstrap:3.1.1"
compile "org.webjars:angularjs:1.2.16"
compile "org.webjars:angular-ui:0.4.0-2"
compile "org.webjars:angular-ui-bootstrap:0.10.0-1"
compile "org.webjars:jquery:2.1.0-2"
// Jackson
compile "org.codehaus.jackson:jackson-core-asl:1.9.13"
compile "org.codehaus.jackson:jackson-mapper-asl:1.9.13"
compile "com.fasterxml.jackson.core:jackson-core"
compile "com.fasterxml.jackson.core:jackson-databind"
// Logging
compile "org.slf4j:slf4j-api"
compile "org.slf4j:slf4j-log4j12"
// Servlet
compile "javax.servlet:jstl:1.2"
providedCompile 'javax.servlet:javax.servlet-api'
// Testing
testCompile "junit:junit"
// Spring Testing
testCompile "org.springframework:spring-test"
// Tomcat
tomcat "org.apache.tomcat.embed:tomcat-embed-core:${tomcatVersion}"
tomcat "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'
}
}
task wrapper(type: Wrapper) {
gradleVersion = '2.3'
}
war {
// omit the version from the war file name
version = ""
}
tomcatRun {
outputFile = file('tomcat.log')
}
cloudfoundry {
target = "https://api.run.pivotal.io"
space = "development"
file = file("${war.archivePath}")
uri = "spring-music-${randomWord}.cfapps.io"
memory = 512
instances = 1
services {
"music-mongodb" {
label = "mongolab"
plan = "sandbox"
}
}
}