David Knupp has posted comments on this change. ( http://gerrit.cloudera.org:8080/15829 )
Change subject: IMPALA-9648: Exclude/ban netty-all from mvn download ...................................................................... Patch Set 3: (1 comment) > Patch Set 3: > > (1 comment) http://gerrit.cloudera.org:8080/#/c/15829/3/fe/pom.xml File fe/pom.xml: http://gerrit.cloudera.org:8080/#/c/15829/3/fe/pom.xml@1386 PS3, Line 1386: <!-- IMPALA-9648: Avoid pulling in netty --> : <dependency> : <groupId>org.apache.hadoop</groupId> : <artifactId>hadoop-hdfs</artifactId> : <exclusions> : <exclusion> : <groupId>io.netty</groupId> : <artifactId>*</artifactId> : </exclusion> : </exclusions> : </dependency> : <dependency> : <groupId>org.apache.hadoop</groupId> : <artifactId>hadoop-distcp</artifactId> : <exclusions> : <exclusion> : <groupId>io.netty</groupId> : <artifactId>*</artifactId> : </exclusion> : </exclusions> : </dependency> : <dependency> : <groupId>org.apache.hadoop</groupId> : <artifactId>hadoop-common</artifactId> : <exclusions> : <exclusion> : <groupId>io.netty</groupId> : <artifactId>*</artifactId> : </exclusion> : </exclusions> : </dependency> : <!-- end IMPALA-9648 --> > I think that this code block doesn't exclude anything. If we were excluding If I remove this code block, and build locally, I get this failure: 19:16:43 [WARNING] Rule 0: org.apache.maven.plugins.enforcer.BannedDependencies failed with message: Found Banned Dependency: io.netty:netty-all:jar:4.1.42.Final 19:16:43 [INFO] BUILD FAILURE 19:16:43 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:3.0.0-M1:enforce (enforce-banned-dependencies) on project impala-frontend: Some Enforcer rules have failed. Look above for specific messages explaining why the rule failed. -> [Help 1] 19:16:43 [ERROR] 19:16:43 [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. 19:16:43 [ERROR] Re-run Maven using the -X switch to enable full debug logging. 19:16:43 [ERROR] 19:16:43 [ERROR] For more information about the errors and possible solutions, please read the following articles: 19:16:43 [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException For the explanation on why I chose to do the exclusions here, I actually left a fairly detailed message on https://gerrit.cloudera.org/c/15796/, but I'll copy the relevant bits here. --- "So, with this being my first foray into doing anything with maven, I'll confess that some of this results from me just googling and hacking, trying to figure out what works and what doesn't. So I will explain how I wound up arriving at this solution, but it's quite possible that this is not the best/approved way to do this. [...] In my first attempt at excluding netty-all, I added an exclusion in the dependency for hadoop-hdfs, thinking that was all I'd need to do. But after building with that change, I found that new instances of netty/netty-all were popping up in the dependency tree -- namely, under zookeeper and hadoop-distcp, which were themselves nested under hadoop-hdfs. When I went to add exclusions for netty-all in those spots as well (per a suggeston from Tim Armstrong that I'd probably need multiple netty-all exclusions), it turned out zookeeper and hadoop-distcp weren't even explicitly listed in our fe/pom.xml. I tried adding them as explicit dependencies under hadoop-hdfs, just so I could then exclude netty-all from them, but I was having trouble simply getting the build to succeed. This is explained in the comments in https://issues.apache.org/jira/browse/IMPALA-9648. I don't recall exactly where I saw the reference to dependencyManagement, but it was immediately helpful. I just kept rerunning the build and seeing where netty-all would pop up each time, then I'd add then that specific exclusion to dependencyManagement. After a couple iterations, netty-all was gone, and the plugin for banning dependencies allowed the build to pass." -- To view, visit http://gerrit.cloudera.org:8080/15829 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ie7d61af3c10ee439ca9eef3840403229e6235c97 Gerrit-Change-Number: 15829 Gerrit-PatchSet: 3 Gerrit-Owner: David Knupp <[email protected]> Gerrit-Reviewer: David Knupp <[email protected]> Gerrit-Reviewer: Impala Public Jenkins <[email protected]> Gerrit-Reviewer: Joe McDonnell <[email protected]> Gerrit-Comment-Date: Wed, 29 Apr 2020 02:22:06 +0000 Gerrit-HasComments: Yes
