-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathbuild.gradle
219 lines (158 loc) · 8.89 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
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
/** RELEASE PLUGIN */
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'net.researchgate:gradle-release:2.1.2'
}
}
apply plugin: 'net.researchgate.release'
allprojects {
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'eclipse-wtp' /** without this wtp does not upload dependant projects, http://stackoverflow.com/questions/23697438/gradle-groovy-project-dependent-on-java-project*/
apply plugin: 'groovy'
apply plugin: 'maven' /** to generate poms - they will be uploaded to the maven repository along with jars/wars */
apply plugin: 'idea'
group = 'pl.edu.icm.saos'
sourceCompatibility = 1.8
}
subprojects {
repositories {
mavenCentral()
maven { url "http://repo.spring.io/libs-milestone" }
maven { url "http://maven.icm.edu.pl/artifactory/repo"}
}
ext.springVersion = "4.0.7.RELEASE"
ext.lib = [
'junit:junit' : 'junit:junit:4.11',
'org.apache.commons:commons-lang3' :'org.apache.commons:commons-lang3:3.3.2',
'commons-collections:commons-collections' :'commons-collections:commons-collections:3.2.1',
'commons-codec:commons-codec' :'commons-codec:commons-codec:1.9',
'commons-io:commons-io':'commons-io:commons-io:2.4',
'org.apache.commons:commons-compress':'org.apache.commons:commons-compress:1.8.1',
'commons-fileupload:commons-fileupload':'commons-fileupload:commons-fileupload:1.3.1',
'joda-time:joda-time' :'joda-time:joda-time:2.3',
'joda-time:joda-time-jsptags' :'joda-time:joda-time-jsptags:1.1.1',
'org.springframework.data:spring-data-jpa' :'org.springframework.data:spring-data-jpa:1.7.1.RELEASE',
'org.springframework.security:spring-security-taglibs' :'org.springframework.security:spring-security-taglibs:3.2.4.RELEASE',
'org.springframework.security:spring-security-web' :'org.springframework.security:spring-security-web:3.2.4.RELEASE',
'org.springframework.security:spring-security-config' :'org.springframework.security:spring-security-config:3.2.4.RELEASE',
'org.springframework.batch:spring-batch-core' :'org.springframework.batch:spring-batch-core:3.0.0.RELEASE',
'org.springframework.batch:spring-batch-admin-manager':'org.springframework.batch:spring-batch-admin-manager:1.3.0.RELEASE',
'org.springframework.batch:spring-batch-admin-resources':'org.springframework.batch:spring-batch-admin-resources:1.3.0.RELEASE',
'org.apache.tiles:tiles-jsp' :'org.apache.tiles:tiles-jsp:3.0.4',
'javax.servlet:javax.servlet-api' :'javax.servlet:javax.servlet-api:3.1.0',
'javax.servlet:jsp-api' :'javax.servlet:jsp-api:2.0',
'javax.servlet:jstl' :'javax.servlet:jstl:1.2',
'org.hibernate:hibernate-core' :'org.hibernate:hibernate-core:4.3.5.Final',
'org.hibernate:hibernate-ehcache' :'org.hibernate:hibernate-ehcache:4.3.5.Final',
'org.hibernate:hibernate-entitymanager' :'org.hibernate:hibernate-entitymanager:4.3.5.Final',
'org.hibernate:hibernate-validator':'org.hibernate:hibernate-validator:5.1.2.Final',
'javax.el:javax.el-api':'javax.el:javax.el-api:3.0.0',
'org.apache.commons:commons-dbcp2' :'org.apache.commons:commons-dbcp2:2.0.1',
'org.postgresql:postgresql' :'org.postgresql:postgresql:9.3-1101-jdbc41',
'org.jadira.usertype:usertype.core' :'org.jadira.usertype:usertype.core:3.2.0.GA',
'net.sf.ehcache:ehcache' :'net.sf.ehcache:ehcache:2.8.2',
'org.apache.solr:solr-core' :'org.apache.solr:solr-core:4.9.0',
'org.apache.solr:solr-solrj' :'org.apache.solr:solr-solrj:4.9.0',
'org.apache.lucene:lucene-analyzers-morfologik' :'org.apache.lucene:lucene-analyzers-morfologik:4.9.0',
'org.springframework:spring-context' :'org.springframework:spring-context:'+springVersion,
'org.springframework:spring-webmvc' :'org.springframework:spring-webmvc:'+springVersion,
'org.springframework:spring-orm' :'org.springframework:spring-orm:'+springVersion,
'org.springframework:spring-test' :'org.springframework:spring-test:'+springVersion,
'org.springframework:spring-oxm' :'org.springframework:spring-oxm:'+springVersion,
'org.springframework:spring-web' :'org.springframework:spring-web:'+springVersion,
'org.springframework:spring-context-support':'org.springframework:spring-context-support:'+springVersion,
'org.slf4j:slf4j-api' :'org.slf4j:slf4j-api:1.7.7',
'org.slf4j:slf4j-simple' :'org.slf4j:slf4j-simple:1.7.7',
'ch.qos.logback:logback-classic' :'ch.qos.logback:logback-classic:1.0.13',
'org.mockito:mockito-core' :'org.mockito:mockito-core:1.9.5',
'com.google.guava:guava' :'com.google.guava:guava:17.0',
'org.powermock:powermock-api-mockito' :'org.powermock:powermock-api-mockito:1.5.5',
'org.powermock:powermock-module-junit4' :'org.powermock:powermock-module-junit4:1.5.5',
'com.googlecode.catch-exception:catch-exception':'com.googlecode.catch-exception:catch-exception:1.2.0',
'org.assertj:assertj-core':'org.assertj:assertj-core:1.6.1',
'com.tngtech.java:junit-dataprovider':'com.tngtech.java:junit-dataprovider:1.9.2',
'org.springframework.hateoas' : 'org.springframework.hateoas:spring-hateoas:0.15.0.RELEASE',
'com.fasterxml.jackson.core:jackson-core' : 'com.fasterxml.jackson.core:jackson-core:2.4.1',
'com.fasterxml.jackson.core:jackson-annotations' : 'com.fasterxml.jackson.core:jackson-annotations:2.4.1',
'com.fasterxml.jackson.core:jackson-databind' : 'com.fasterxml.jackson.core:jackson-databind:2.4.1',
'com.jayway.jsonpath:json-path' : 'com.jayway.jsonpath:json-path:0.9.1',
'com.jayway.jsonpath:json-path-assert' : 'com.jayway.jsonpath:json-path-assert:0.9.1',
'org.hamcrest:hamcrest-library' : 'org.hamcrest:hamcrest-library:1.3',
'org.codehaus.groovy:groovy-all' : 'org.codehaus.groovy:groovy-all:2.3.7',
'org.spockframework:spock-core' : 'org.spockframework:spock-core:0.7-groovy-2.0',
'au.com.bytecode:opencsv':'au.com.bytecode:opencsv:2.4',
'com.sun.mail:javax.mail':'com.sun.mail:javax.mail:1.4.5',
'net.bull.javamelody:javamelody-core':'net.bull.javamelody:javamelody-core:1.56.0'
]
dependencies {
compile lib.'org.apache.commons:commons-lang3'
testCompile (lib.'junit:junit') {
exclude module: 'hamcrest-core'
}
testCompile lib.'org.springframework:spring-test'
testCompile (lib.'org.mockito:mockito-core') {
exclude module: 'hamcrest-core'
}
testCompile lib.'org.hamcrest:hamcrest-library'
testCompile lib.'com.googlecode.catch-exception:catch-exception'
testCompile lib.'org.assertj:assertj-core'
testCompile lib.'com.tngtech.java:junit-dataprovider'
testCompile lib.'org.codehaus.groovy:groovy-all'
testCompile (lib.'org.spockframework:spock-core') {
exclude module: 'junit-dep'
}
testCompile lib.'org.powermock:powermock-api-mockito'
testCompile lib.'org.powermock:powermock-module-junit4'
compile lib.'com.google.guava:guava'
compile lib.'commons-collections:commons-collections'
compile lib.'org.apache.commons:commons-lang3'
compile lib.'org.slf4j:slf4j-api'
compile lib.'ch.qos.logback:logback-classic'
compile lib.'org.codehaus.groovy:groovy-all'
}
jar {
manifest.attributes provider: 'University of Warsaw, ICM'
}
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
task wrapper(type: Wrapper) {
gradleVersion = '4.2.1'
}
task testJar(type: Jar, dependsOn: testClasses) {
classifier = 'tests'
from sourceSets.test.output
}
configurations {
testArtifacts
}
artifacts {
testArtifacts testJar
}
test {
useJUnit {
excludeCategories "pl.edu.icm.saos.common.testcommon.category.SlowTest"
}
}
task slowTest(type: Test) {
useJUnit {
includeCategories "pl.edu.icm.saos.common.testcommon.category.SlowTest"
}
}
check.dependsOn slowTest
slowTest.mustRunAfter test
tasks.withType(Test) {
testLogging {
events 'passed'
exceptionFormat = 'full'
}
}
/* this below just to correct a bug of gradleEclipseWtp, without this the plugin copies also the test classes to the server */
eclipse.classpath.file.whenMerged { cp ->
cp.entries.findAll { it instanceof org.gradle.plugins.ide.eclipse.model.SourceFolder && it.path.startsWith("src/test/") }*.output = "test-bin"
}
}