Skip to content

Commit

Permalink
GEODE-5885: Exclude geode-core from geode-[jd]unit dependencies. (apa…
Browse files Browse the repository at this point in the history
…che#2640)

* This exclusion will not be necessary once the java-library plugin is stable with publishing.
* At that future date, we may use the 'implementation' configuration rather than 'compile' in geode-[jd]unit, avoiding leaking geode-core to other modules.

Co-authored-by: Robert Houghton <[email protected]>
Co-authored-by: Patrick Rhomberg <[email protected]>
  • Loading branch information
PurelyApplied and robbadler authored Oct 19, 2018
1 parent 6db1dc8 commit fa34122
Show file tree
Hide file tree
Showing 20 changed files with 125 additions and 39 deletions.
4 changes: 3 additions & 1 deletion extensions/geode-modules-session/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ dependencies {
compile(project(':extensions:geode-modules-session-internal'))
compile(project(':geode-core'))

integrationTestCompile(project(':geode-dunit'))
integrationTestCompile(project(':geode-dunit')) {
exclude module: 'geode-core'
}
integrationTestCompile('org.httpunit:httpunit:' + project.'httpunit.version') {
exclude group: 'javax.servlet'
// this version of httpunit contains very outdated xercesImpl
Expand Down
4 changes: 3 additions & 1 deletion extensions/geode-modules-test/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ dependencies {
// Remove everything related to Tomcat 6.x
exclude group: 'org.apache.tomcat'
}
compile(project(':geode-junit'))
compile(project(':geode-junit')) {
exclude module: 'geode-core'
}
compile('org.httpunit:httpunit:' + project.'httpunit.version') {
// this version of httpunit contains very outdated xercesImpl
exclude group: 'xerces'
Expand Down
4 changes: 3 additions & 1 deletion extensions/geode-modules-tomcat7/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ dependencies {
}
compile('org.apache.tomcat:tomcat-juli:' + project.'tomcat7.version')

integrationTestCompile(project(':geode-dunit'))
integrationTestCompile(project(':geode-dunit')) {
exclude module: 'geode-core'
}
integrationTestCompile(project(':extensions:geode-modules-test'))

integrationTestRuntime('javax.annotation:jsr250-api:' + project.'javax.jsr250-api.version')
Expand Down
4 changes: 3 additions & 1 deletion extensions/geode-modules/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ dependencies {

testCompile('org.apache.bcel:bcel:' + project.'bcel.version')

integrationTestCompile(project(':geode-dunit'))
integrationTestCompile(project(':geode-dunit')) {
exclude module: 'geode-core'
}
integrationTestCompile(project(':extensions:geode-modules-test'))

integrationTestRuntime('org.apache.tomcat:coyote:' + project.'tomcat6.version')
Expand Down
24 changes: 18 additions & 6 deletions geode-assembly/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -132,12 +132,18 @@ dependencies {


testCompile(project(':geode-core'))
testCompile(project(':geode-junit'))
testCompile(project(':geode-junit')) {
exclude module: 'geode-core'
}


integrationTestCompile(project(':geode-core'))
integrationTestCompile(project(':geode-junit'))
integrationTestCompile(project(':geode-dunit'))
integrationTestCompile(project(':geode-junit')) {
exclude module: 'geode-core'
}
integrationTestCompile(project(':geode-dunit')) {
exclude module: 'geode-core'
}
integrationTestCompile(project(':geode-pulse'))
integrationTestCompile(project(':geode-assembly:geode-assembly-test'))
integrationTestCompile('org.apache.httpcomponents:httpclient:' + project.'httpclient.version')
Expand All @@ -156,11 +162,15 @@ dependencies {


acceptanceTestCompile(project(':geode-core'))
acceptanceTestCompile(project(':geode-dunit'))
acceptanceTestCompile(project(':geode-dunit')) {
exclude module: 'geode-core'
}


uiTestCompile(project(':geode-core'))
uiTestCompile(project(':geode-dunit'))
uiTestCompile(project(':geode-dunit')) {
exclude module: 'geode-core'
}
uiTestCompile(project(':geode-pulse'))
uiTestCompile(project(':geode-pulse:geode-pulse-test'))
uiTestCompile(project(':geode-assembly:geode-assembly-test'))
Expand All @@ -173,7 +183,9 @@ dependencies {


upgradeTestCompile(project(':geode-core'))
upgradeTestCompile(project(':geode-dunit'))
upgradeTestCompile(project(':geode-dunit')) {
exclude module: 'geode-core'
}
upgradeTestCompile(project(':geode-assembly:geode-assembly-test'))

upgradeTestRuntime(group: 'org.codehaus.cargo', name: 'cargo-core-uberjar', version: '1.6.3')
Expand Down
4 changes: 3 additions & 1 deletion geode-common/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,7 @@
*/

dependencies {
testCompile(project(':geode-junit'))
testCompile(project(':geode-junit')) {
exclude module: 'geode-core'
}
}
12 changes: 9 additions & 3 deletions geode-connectors/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,15 @@ repositories {
dependencies {
compile(project(':geode-common'))
compile(project(':geode-core'))
testCompile(project(':geode-junit'))
integrationTestCompile(project(':geode-dunit'))
acceptanceTestCompile(project(':geode-dunit'))
testCompile(project(':geode-junit')) {
exclude module: 'geode-core'
}
integrationTestCompile(project(':geode-dunit')) {
exclude module: 'geode-core'
}
acceptanceTestCompile(project(':geode-dunit')) {
exclude module: 'geode-core'
}

compile(group: 'com.zaxxer', name: 'HikariCP', version: project.'HikariCP.version')

Expand Down
8 changes: 6 additions & 2 deletions geode-core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,9 @@ dependencies {
jcaCompile(sourceSets.main.output)


testCompile(project(':geode-junit'))
testCompile(project(':geode-junit')) {
exclude module: 'geode-core'
}
testCompile(project(':geode-concurrency-test'))
testCompile('org.apache.bcel:bcel:' + project.'bcel.version')
testCompile('org.mockito:mockito-core:' + project.'mockito-core.version')
Expand Down Expand Up @@ -311,7 +313,9 @@ dependencies {
}


performanceTestCompile(project(':geode-junit'))
performanceTestCompile(project(':geode-junit')) {
exclude module: 'geode-core'
}

// Distributed Tests
distributedTestCompile(sourceSets.test.output) // To be removed by GEODE-5803
Expand Down
8 changes: 6 additions & 2 deletions geode-cq/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,12 @@
dependencies {
compileOnly(project(':geode-core'))
testCompile(project(':geode-core'))
testCompile(project(':geode-junit'))
integrationTestCompile(project(':geode-dunit'))
testCompile(project(':geode-junit')) {
exclude module: 'geode-core'
}
integrationTestCompile(project(':geode-dunit')) {
exclude module: 'geode-core'
}
upgradeTestCompile(project(':geode-dunit')) {
exclude module: 'geode-core'
}
Expand Down
4 changes: 3 additions & 1 deletion geode-dunit/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ dependencies {
compile(project(':geode-core'))
//compileOnly files("${System.getProperty('java.home')}/../lib/tools.jar")

compile(project(':geode-junit'))
compile(project(':geode-junit')) {
exclude module: 'geode-core'
}
compile(project(':geode-json'))

compile('com.jayway.jsonpath:json-path:' + project.'json-path.version')
Expand Down
6 changes: 6 additions & 0 deletions geode-dunit/src/test/resources/expected-pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,12 @@
<artifactId>geode-junit</artifactId>
<version>1.8.0-SNAPSHOT</version>
<scope>compile</scope>
<exclusions>
<exclusion>
<artifactId>geode-core</artifactId>
<groupId>*</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.geode</groupId>
Expand Down
8 changes: 6 additions & 2 deletions geode-experimental-driver/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,14 @@ dependencies {
compile(project(':geode-common'))
compile(project(':geode-protobuf-messages'))
testCompile(project(':geode-core'))
testCompile(project(':geode-junit'))
testCompile(project(':geode-junit')) {
exclude module: 'geode-core'
}
testCompile(project(':geode-protobuf'))
integrationTestCompile(project(':geode-core'))
integrationTestCompile(project(':geode-dunit'))
integrationTestCompile(project(':geode-dunit')) {
exclude module: 'geode-core'
}
integrationTestCompile(project(':geode-protobuf'))

compile('com.google.protobuf:protobuf-java:' + project.'protobuf-java.version')
Expand Down
12 changes: 9 additions & 3 deletions geode-lucene/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,17 @@ dependencies {

runtimeOnly('org.apache.lucene:lucene-analyzers-phonetic:' + project.'lucene.version')

testCompile(project(':geode-junit'))
testCompile(project(':geode-junit')) {
exclude module: 'geode-core'
}
testCompile(project(':geode-lucene:geode-lucene-test'))
testCompile('org.apache.lucene:lucene-test-framework:' + project.'lucene.version')
testCompile('com.pholser:junit-quickcheck-generators:' + project.'junit-quickcheck.version')


integrationTestCompile(project(':geode-dunit'))
integrationTestCompile(project(':geode-dunit')) {
exclude module: 'geode-core'
}
integrationTestCompile(project(':geode-lucene:geode-lucene-test'))
integrationTestCompile('org.apache.lucene:lucene-analyzers-phonetic:' + project.'lucene.version')
integrationTestCompile('pl.pragmatists:JUnitParams:' + project.'JUnitParams.version')
Expand All @@ -46,7 +50,9 @@ dependencies {
}


performanceTestCompile(project(':geode-junit'))
performanceTestCompile(project(':geode-junit')) {
exclude module: 'geode-core'
}
performanceTestCompile(project(':geode-lucene:geode-lucene-test'))
}

Expand Down
8 changes: 6 additions & 2 deletions geode-protobuf/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,13 @@ dependencies {
compile(project(':geode-protobuf-messages'))
compileOnly(project(':geode-core'))
testCompile(project(':geode-core'))
testCompile(project(':geode-junit'))
testCompile(project(':geode-junit')) {
exclude module: 'geode-core'
}
testCompile(project(':geode-protobuf:geode-protobuf-test'))
integrationTestCompile(project(':geode-dunit'))
integrationTestCompile(project(':geode-dunit')) {
exclude module: 'geode-core'
}
integrationTestCompile(project(':geode-protobuf:geode-protobuf-test'))
distributedTestCompile(project(':geode-protobuf:geode-protobuf-test'))

Expand Down
12 changes: 9 additions & 3 deletions geode-pulse/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -66,18 +66,24 @@ dependencies {
compileOnly('org.mortbay.jetty:servlet-api:' + project.'mortbay-jetty-servlet-api.version')


testCompile(project(':geode-junit'))
testCompile(project(':geode-junit')) {
exclude module: 'geode-core'
}
testCompile(project(':geode-core'))
testCompile('org.springframework:spring-test:' + project.'springframework.version')


integrationTestCompile(project(':geode-junit'))
integrationTestCompile(project(':geode-junit')) {
exclude module: 'geode-core'
}
integrationTestCompile(project(':geode-core'))
integrationTestCompile(project(':geode-pulse:geode-pulse-test'))
integrationTestCompile('org.springframework:spring-test:' + project.'springframework.version')


uiTestCompile(project(':geode-junit'))
uiTestCompile(project(':geode-junit')) {
exclude module: 'geode-core'
}
uiTestCompile(project(':geode-json'))
uiTestCompile(project(':geode-pulse:geode-pulse-test'))
uiTestCompile('org.seleniumhq.selenium:selenium-remote-driver:' + project.'selenium.version')
Expand Down
4 changes: 3 additions & 1 deletion geode-pulse/geode-pulse-test/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@

dependencies {
compileOnly(project(':geode-core'))
compileOnly(project(':geode-junit'))
compileOnly(project(':geode-junit')) {
exclude module: 'geode-core'
}
compileOnly(project(':geode-pulse'))

compile('org.seleniumhq.selenium:selenium-api:' + project.'selenium.version')
Expand Down
6 changes: 5 additions & 1 deletion geode-rebalancer/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,9 @@ dependencies {

testCompile(project(':geode-core'))

integrationTestCompile(project(':geode-junit'))
integrationTestCompile('org.awaitility:awaitility:' + project.'awaitility.version')
// Only needed for category Flaky by Gradle
integrationTestCompile(project(':geode-junit')) {
exclude module: 'geode-core'
}
}
8 changes: 6 additions & 2 deletions geode-wan/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,12 @@
dependencies {
compileOnly(project(':geode-core'))
testCompile(project(':geode-core'))
testCompile(project(':geode-junit'))
integrationTestCompile(project(':geode-junit'))
testCompile(project(':geode-junit')) {
exclude module: 'geode-core'
}
integrationTestCompile(project(':geode-junit')) {
exclude module: 'geode-core'
}
upgradeTestCompile(project(':geode-dunit')) {
exclude module: 'geode-core'
}
Expand Down
12 changes: 9 additions & 3 deletions geode-web-api/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,21 @@ dependencies {
}


testCompile(project(':geode-junit'))
testCompile(project(':geode-junit')) {
exclude module: 'geode-core'
}
testCompile(project(':geode-core'))
testCompile('javax.servlet:javax.servlet-api:' + project.'javax.servlet-api.version')

integrationTestCompile('org.springframework:spring-test:' + project.'springframework.version')
integrationTestCompile('org.springframework.security:spring-security-test:' + project.'spring-security.version')

integrationTestCompile(project(':geode-junit'))
integrationTestCompile(project(':geode-dunit'))
integrationTestCompile(project(':geode-junit')) {
exclude module: 'geode-core'
}
integrationTestCompile(project(':geode-dunit')) {
exclude module: 'geode-core'
}
}

sourceSets {
Expand Down
12 changes: 9 additions & 3 deletions geode-web/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -41,18 +41,24 @@ dependencies {
}

testCompile(project(':geode-core'))
testCompile(project(':geode-junit'))
testCompile(project(':geode-junit')) {
exclude module: 'geode-core'
}
// have to use output since we exclude the dependent classes from jar :(
testCompile(project(path: ':geode-core', configuration: 'classesOutput'))
testCompile(project(':geode-junit'))
testCompile(project(':geode-junit')) {
exclude module: 'geode-core'
}
testCompile('org.springframework:spring-test:' + project.'springframework.version')
testCompile('org.springframework:spring-webmvc:' + project.'springframework.version') {
exclude module: 'aopalliance'
exclude module: 'spring-aop'
}


integrationTestCompile(project(':geode-dunit'))
integrationTestCompile(project(':geode-dunit')) {
exclude module: 'geode-core'
}

integrationTestRuntime(files(war.destinationDir))
integrationTestRuntime('org.springframework:spring-webmvc:' + project.'springframework.version') {
Expand Down

0 comments on commit fa34122

Please sign in to comment.