Skip to content

Commit 164bf17

Browse files
stefanbirknermminella
authored andcommitted
Don't use hamcrest-all.
The library is considered to be used by people who download their dependencies manually. If you use a dependency-manager then you should use hamcrest-library. It has a dependency on hamcrest-core and does not need exclusion of hamcrest-core for other dependencies.
1 parent 256e212 commit 164bf17

File tree

1 file changed

+20
-43
lines changed

1 file changed

+20
-43
lines changed

build.gradle

Lines changed: 20 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -249,18 +249,14 @@ project('spring-batch-core') {
249249
compile "org.springframework:spring-tx:$springVersion"
250250

251251
testCompile "org.springframework:spring-test:$springVersion"
252-
testCompile("org.mockito:mockito-core:$mockitoVersion") {
253-
exclude group:'org.hamcrest', module:'hamcrest-core'
254-
}
252+
testCompile "org.mockito:mockito-core:$mockitoVersion"
255253
testCompile "javax.inject:javax.inject:$javaxInjectVersion"
256254
testCompile "org.hsqldb:hsqldb:$hsqldbVersion"
257255
testCompile "com.h2database:h2:$h2databaseVersion"
258256
testCompile "commons-io:commons-io:$commonsIoVersion"
259257
testCompile "commons-dbcp:commons-dbcp:$commonsDdbcpVersion"
260-
testCompile("junit:junit:${junitVersion}") {
261-
exclude group:'org.hamcrest', module:'hamcrest-core'
262-
}
263-
testCompile("org.hamcrest:hamcrest-all:$hamcrestVersion")
258+
testCompile "junit:junit:${junitVersion}"
259+
testCompile "org.hamcrest:hamcrest-library:$hamcrestVersion"
264260
optional "org.aspectj:aspectjrt:$aspectjVersion"
265261
optional "org.aspectj:aspectjweaver:$aspectjVersion"
266262
optional "org.springframework:spring-jdbc:$springVersion"
@@ -295,15 +291,11 @@ project('spring-batch-infrastructure') {
295291
testCompile "com.h2database:h2:$h2databaseVersion"
296292
testCompile "org.apache.derby:derby:$derbyVersion"
297293
testCompile "org.springframework:spring-test:$springVersion"
298-
testCompile("junit:junit:${junitVersion}") {
299-
exclude group:'org.hamcrest', module:'hamcrest-core'
300-
}
301-
testCompile("org.hamcrest:hamcrest-all:$hamcrestVersion")
294+
testCompile "junit:junit:${junitVersion}"
295+
testCompile "org.hamcrest:hamcrest-library:$hamcrestVersion"
302296
testCompile "org.aspectj:aspectjrt:$aspectjVersion"
303297
testCompile "org.aspectj:aspectjweaver:$aspectjVersion"
304-
testCompile("org.mockito:mockito-core:$mockitoVersion") {
305-
exclude group:'org.hamcrest', module:'hamcrest-core'
306-
}
298+
testCompile "org.mockito:mockito-core:$mockitoVersion"
307299
testCompile "org.xerial:sqlite-jdbc:$sqliteVersion"
308300

309301
testRuntime "com.sun.mail:javax.mail:$javaMailVersion"
@@ -372,10 +364,8 @@ project('spring-batch-core-tests') {
372364
testCompile "org.hsqldb:hsqldb:$hsqldbVersion"
373365
testCompile "commons-io:commons-io:$commonsIoVersion"
374366
testCompile "org.apache.derby:derby:$derbyVersion"
375-
testCompile("junit:junit:${junitVersion}") {
376-
exclude group:'org.hamcrest', module:'hamcrest-core'
377-
}
378-
testCompile("org.hamcrest:hamcrest-all:$hamcrestVersion")
367+
testCompile "junit:junit:${junitVersion}"
368+
testCompile "org.hamcrest:hamcrest-library:$hamcrestVersion"
379369
testCompile "log4j:log4j:$log4jVersion"
380370
testCompile "org.springframework:spring-test:$springVersion"
381371
testCompile "org.springframework:spring-jdbc:$springVersion"
@@ -409,10 +399,8 @@ project('spring-batch-infrastructure-tests') {
409399
testCompile "org.apache.derby:derby:$derbyVersion"
410400
testCompile "org.apache.activemq:activemq-broker:$activemqVersion"
411401
testCompile "org.apache.activemq:activemq-kahadb-store:$activemqVersion"
412-
testCompile("junit:junit:${junitVersion}") {
413-
exclude group:'org.hamcrest', module:'hamcrest-core'
414-
}
415-
testCompile("org.hamcrest:hamcrest-all:$hamcrestVersion")
402+
testCompile "junit:junit:${junitVersion}"
403+
testCompile "org.hamcrest:hamcrest-library:$hamcrestVersion"
416404
testCompile "org.apache.geronimo.specs:geronimo-j2ee-management_1.1_spec:1.0.1"
417405
testCompile "xmlunit:xmlunit:$xmlunitVersion"
418406
testCompile ("org.codehaus.castor:castor-xml:$castorVersion") {
@@ -431,9 +419,7 @@ project('spring-batch-infrastructure-tests') {
431419
}
432420
testCompile "org.springframework:spring-jdbc:$springVersion"
433421
testCompile "org.springframework:spring-test:$springVersion"
434-
testCompile("org.mockito:mockito-core:$mockitoVersion") {
435-
exclude group:'org.hamcrest', module:'hamcrest-core'
436-
}
422+
testCompile "org.mockito:mockito-core:$mockitoVersion"
437423

438424
optional "org.slf4j:slf4j-log4j12:$slf4jVersion"
439425
optional "org.apache.ibatis:ibatis-sqlmap:$ibatisVersion"
@@ -464,10 +450,8 @@ project('spring-batch-test') {
464450
dependencies {
465451
compile project(":spring-batch-core")
466452

467-
compile("junit:junit:${junitVersion}") {
468-
exclude group:'org.hamcrest', module:'hamcrest-core'
469-
}
470-
compile("org.hamcrest:hamcrest-all:$hamcrestVersion")
453+
compile "junit:junit:${junitVersion}"
454+
compile "org.hamcrest:hamcrest-library:$hamcrestVersion"
471455
compile "org.springframework:spring-test:$springVersion"
472456
compile "org.springframework:spring-jdbc:$springVersion"
473457
compile "commons-io:commons-io:$commonsIoVersion"
@@ -498,10 +482,8 @@ project('spring-batch-integration') {
498482

499483
testCompile "org.apache.activemq:activemq-broker:$activemqVersion"
500484
testCompile "org.apache.activemq:activemq-kahadb-store:$activemqVersion"
501-
testCompile("junit:junit:${junitVersion}") {
502-
exclude group:'org.hamcrest', module:'hamcrest-core'
503-
}
504-
testCompile("org.hamcrest:hamcrest-all:$hamcrestVersion")
485+
testCompile "junit:junit:${junitVersion}"
486+
testCompile "org.hamcrest:hamcrest-library:$hamcrestVersion"
505487
testCompile "org.aspectj:aspectjrt:$aspectjVersion"
506488
testCompile "org.aspectj:aspectjweaver:$aspectjVersion"
507489
testCompile "commons-dbcp:commons-dbcp:$commonsDdbcpVersion"
@@ -510,11 +492,10 @@ project('spring-batch-integration') {
510492
testCompile "org.apache.derby:derby:$derbyVersion"
511493
testCompile "org.hsqldb:hsqldb:$hsqldbVersion"
512494
testCompile "org.springframework:spring-test:$springVersion"
513-
testCompile("org.mockito:mockito-core:$mockitoVersion") {
514-
exclude group:'org.hamcrest', module:'hamcrest-core'
515-
}
495+
testCompile "org.mockito:mockito-core:$mockitoVersion"
516496
testCompile("org.springframework.integration:spring-integration-test:$springIntegrationVersion") {
517497
exclude group: 'junit', module: 'junit-dep'
498+
exclude group:'org.hamcrest', module:'hamcrest-all'
518499
}
519500
testCompile "org.springframework.integration:spring-integration-jdbc:$springIntegrationVersion"
520501

@@ -566,18 +547,14 @@ project('spring-batch-samples') {
566547

567548
testCompile "xmlunit:xmlunit:$xmlunitVersion"
568549
testCompile project(":spring-batch-test")
569-
testCompile("junit:junit:${junitVersion}") {
570-
exclude group:'org.hamcrest', module:'hamcrest-core'
571-
}
572-
testCompile("org.hamcrest:hamcrest-all:$hamcrestVersion")
550+
testCompile "junit:junit:${junitVersion}"
551+
testCompile "org.hamcrest:hamcrest-library:$hamcrestVersion"
573552
testCompile "org.hsqldb:hsqldb:$hsqldbVersion"
574553
testCompile "log4j:log4j:$log4jVersion"
575554
testCompile "org.codehaus.groovy:groovy:$groovyVersion"
576555
testCompile "org.codehaus.groovy:groovy-ant:$groovyVersion"
577556
testCompile "org.springframework:spring-test:$springVersion"
578-
testCompile("org.mockito:mockito-core:$mockitoVersion") {
579-
exclude group:'org.hamcrest', module:'hamcrest-core'
580-
}
557+
testCompile "org.mockito:mockito-core:$mockitoVersion"
581558

582559
testRuntime "com.sun.mail:javax.mail:$javaMailVersion"
583560

0 commit comments

Comments
 (0)