-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
134 lines (107 loc) · 4.17 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
apply plugin: 'java'
apply plugin: 'groovy'
apply plugin: 'war'
apply plugin: 'idea'
apply plugin: 'eclipse'
apply plugin: 'tomcat'
apply plugin: 'gretty'
apply plugin: 'project-report'
ext {
springVersion = '4.0.4.RELEASE'
springSecurity = '3.2.3.RELEASE'
jacksonVersion = '2.3.3'
jerseyVersion = '2.8'
h2Version = '1.3.154'
slf4jVersion = '1.7.7'
logbackVersion = '1.1.2'
groovyVersion = '2.2.2'
tomcatVersion = '7.0.25'
spockVersion='0.7-groovy-2.0'
swaggerVersion='1.3.5'
jodatimeVersion='2.1'
//mockitoVersion = '1.9.5'
//environmentBase = 'src/main/config/'
//env = "ci"
version = '1.0'
artifactName='jersey-spring-no-xml'
tomcatContainerId='tomcat7x'
tomcatPort='8080'
tomcatHostname='localhost'
tomcatUsername='admin'
tomcatPassword='admin'
tomcatContext=artifactName
}
buildscript {
repositories {
jcenter()
mavenCentral()
}
dependencies {
classpath 'org.gradle.api.plugins:gradle-tomcat-plugin:1.2.2'
classpath 'org.akhikhl.gretty:gretty-plugin:0.0.17'
}
}
repositories {
mavenCentral()
}
dependencies {
// ------------------------------ compile---------------------
compile "org.springframework.security:spring-security-core:$springSecurity"
compile "org.glassfish.jersey.ext:jersey-spring3:$jerseyVersion"
compile "org.glassfish.jersey.ext:jersey-declarative-linking:$jerseyVersion"
compile "org.glassfish.jersey.core:jersey-client:$jerseyVersion"
compile "org.glassfish.jersey.core:jersey-server:$jerseyVersion"
compile "org.glassfish.jersey.core:jersey-common:$jerseyVersion"
compile "org.glassfish.jersey.containers:jersey-container-servlet:$jerseyVersion"
compile "com.fasterxml.jackson.core:jackson-databind:$jacksonVersion"
compile "com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:$jacksonVersion"
compile "org.springframework:spring-core:$springVersion"
compile "org.springframework:spring-beans:$springVersion"
compile "org.springframework:spring-context:$springVersion"
compile "org.springframework:spring-aop:$springVersion"
compile "org.springframework:spring-webmvc:$springVersion"
//compile "javax.validation:validation-api:1.1.0.Final"
compile "org.slf4j:slf4j-api:$slf4jVersion"
compile "ch.qos.logback:logback-classic:$logbackVersion"
compile "ch.qos.logback:logback-core:$logbackVersion"
compile "joda-time:joda-time:$jodatimeVersion"
// ------------------------------ testCompile---------------------
testCompile "junit:junit:4.8.2"
//testCompile "org.mockito:mockito-core:$mockitoVersion"
//testCompile "org.glassfish.jersey.test-framework.providers:jersey-test-framework-provider-inmemory:$jerseyVersion"
testCompile "org.glassfish.jersey.test-framework.providers:jersey-test-framework-provider-grizzly2:$jerseyVersion"
//testCompile "org.mockito:mockito-all:1.8.5"
testCompile "org.springframework:spring-test:$springVersion"
testCompile "org.codehaus.groovy:groovy-all:$groovyVersion"
testCompile "org.spockframework:spock-core:$spockVersion"
//testCompile "org.spockframework:spock-spring:0.7-groovy-2.0"
// ------------------------------ providedCompile---------------------
providedCompile 'javax.servlet:javax.servlet-api:3.1.0'
providedCompile "com.wordnik:swagger-jaxrs_2.10:$swaggerVersion"
// ------------------------------ specail tomcat---------------------
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"
}
}
war {
baseName = artifactName
}
gretty {
scanInterval = 1
fastReload = true
contextPath = "/$artifactName"
fileLogEnabled = false
}
test {
testLogging.showStandardStreams = true
}
/*
sourceCompatibility = 1.5
def properties = new Properties()
file(environmentBase + env + '/gradle.properties').withReader {
properties.load(it)
project.ext.props=properties
//properties.each { String name, value -> project.ext.set(name, value) }
}
*/