Remove duplicate Netty classes from Node. (#3142)

* Remove duplicate Netty classes from Node.
* Force all Netty modules to our given version.
This commit is contained in:
Chris Rankin 2018-05-15 12:35:00 +01:00 committed by GitHub
parent 24fa695ca0
commit d0d07287e7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 10 deletions

View File

@ -220,12 +220,23 @@ allprojects {
force "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" force "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
force "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" force "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
force "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" force "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
// Demand that everything uses our given version of Netty.
eachDependency { details ->
if (details.requested.group == 'io.netty' && details.requested.name.startsWith('netty-')) {
details.useVersion netty_version
}
}
} }
} }
compile { compile {
// We want to use SLF4J's version of these bindings: jcl-over-slf4j // We want to use SLF4J's version of these bindings: jcl-over-slf4j
// Remove any transitive dependency on Apache's version. // Remove any transitive dependency on Apache's version.
exclude group: 'commons-logging', module: 'commons-logging' exclude group: 'commons-logging', module: 'commons-logging'
// Netty-All is an uber-jar which contains every Netty module.
// Exclude it to force us to use the individual Netty modules instead.
exclude group: 'io.netty', module: 'netty-all'
} }
runtime { runtime {
// We never want isolated.jar on classPath, since we want to test jar being dynamically loaded as an attachment // We never want isolated.jar on classPath, since we want to test jar being dynamically loaded as an attachment

View File

@ -18,9 +18,6 @@ dependencies {
compile "org.apache.activemq:artemis-core-client:${artemis_version}" compile "org.apache.activemq:artemis-core-client:${artemis_version}"
compile "org.apache.activemq:artemis-commons:${artemis_version}" compile "org.apache.activemq:artemis-commons:${artemis_version}"
// Netty: All of it.
compile "io.netty:netty-all:$netty_version"
// For adding serialisation of file upload streams to RPC // For adding serialisation of file upload streams to RPC
// TODO: Remove this dependency and the code that requires it // TODO: Remove this dependency and the code that requires it
compile "commons-fileupload:commons-fileupload:$fileupload_version" compile "commons-fileupload:commons-fileupload:$fileupload_version"
@ -54,7 +51,7 @@ dependencies {
} }
configurations { configurations {
testArtifacts.extendsFrom testRuntime testArtifacts.extendsFrom testRuntime
} }
task testJar(type: Jar) { task testJar(type: Jar) {

View File

@ -19,12 +19,6 @@ buildscript {
//noinspection GroovyAssignabilityCheck //noinspection GroovyAssignabilityCheck
configurations { configurations {
compile {
// We don't need these because we already include netty-all.
exclude group: 'io.netty', module: 'netty-transport'
exclude group: 'io.netty', module: 'netty-handler'
}
integrationTestCompile.extendsFrom testCompile integrationTestCompile.extendsFrom testCompile
integrationTestRuntime.extendsFrom testRuntime integrationTestRuntime.extendsFrom testRuntime
} }