From 4ef27a596fd1d7be5e437ab444b12fe450e79e79 Mon Sep 17 00:00:00 2001 From: Viraj Jasani Date: Fri, 11 Jun 2021 08:45:52 +0530 Subject: [PATCH] HADOOP-17753. Keep restrict-imports-enforcer-rule for Guava Lists in top level hadoop-main pom (#3087) --- .../hadoop-cloud-storage/pom.xml | 37 ------------------- .../hadoop-cos/pom.xml | 32 ---------------- .../hadoop-huaweicloud/pom.xml | 32 ---------------- hadoop-common-project/hadoop-common/pom.xml | 32 ---------------- hadoop-common-project/hadoop-registry/pom.xml | 32 ---------------- .../hadoop-hdfs-client/pom.xml | 32 ---------------- .../hadoop-hdfs-httpfs/pom.xml | 32 ---------------- hadoop-hdfs-project/hadoop-hdfs-nfs/pom.xml | 37 ------------------- hadoop-hdfs-project/hadoop-hdfs-rbf/pom.xml | 32 ---------------- hadoop-hdfs-project/hadoop-hdfs/pom.xml | 32 ---------------- .../hadoop-mapreduce-client/pom.xml | 32 ---------------- .../hadoop-mapreduce-examples/pom.xml | 32 ---------------- .../plugin/resourcegz/ResourceGzMojo.java | 4 +- hadoop-tools/hadoop-aws/pom.xml | 32 ---------------- hadoop-tools/hadoop-azure/pom.xml | 37 +------------------ hadoop-tools/hadoop-distcp/pom.xml | 32 ---------------- .../hadoop-dynamometer-infra/pom.xml | 32 ---------------- .../hadoop-dynamometer-workload/pom.xml | 32 ---------------- hadoop-tools/hadoop-kafka/pom.xml | 32 ---------------- hadoop-yarn-project/hadoop-yarn/pom.xml | 32 ---------------- pom.xml | 8 ++++ 21 files changed, 12 insertions(+), 623 deletions(-) diff --git a/hadoop-cloud-storage-project/hadoop-cloud-storage/pom.xml b/hadoop-cloud-storage-project/hadoop-cloud-storage/pom.xml index 699ce1abfc..a8f45a7f3a 100644 --- a/hadoop-cloud-storage-project/hadoop-cloud-storage/pom.xml +++ b/hadoop-cloud-storage-project/hadoop-cloud-storage/pom.xml @@ -32,43 +32,6 @@ cloud-storage - - - - org.apache.maven.plugins - maven-enforcer-plugin - - - de.skuzzle.enforcer - restrict-imports-enforcer-rule - ${restrict-imports.enforcer.version} - - - - - banned-illegal-imports - process-sources - - enforce - - - - - true - Use hadoop-common provided Lists rather than Guava provided Lists - - org.apache.hadoop.thirdparty.com.google.common.collect.Lists - com.google.common.collect.Lists - - - - - - - - - - org.apache.hadoop diff --git a/hadoop-cloud-storage-project/hadoop-cos/pom.xml b/hadoop-cloud-storage-project/hadoop-cos/pom.xml index b1f9ccb6e3..fa47e354c7 100644 --- a/hadoop-cloud-storage-project/hadoop-cos/pom.xml +++ b/hadoop-cloud-storage-project/hadoop-cos/pom.xml @@ -96,38 +96,6 @@ - - org.apache.maven.plugins - maven-enforcer-plugin - - - de.skuzzle.enforcer - restrict-imports-enforcer-rule - ${restrict-imports.enforcer.version} - - - - - banned-illegal-imports - process-sources - - enforce - - - - - true - Use hadoop-common provided Lists rather than Guava provided Lists - - org.apache.hadoop.thirdparty.com.google.common.collect.Lists - com.google.common.collect.Lists - - - - - - - diff --git a/hadoop-cloud-storage-project/hadoop-huaweicloud/pom.xml b/hadoop-cloud-storage-project/hadoop-huaweicloud/pom.xml index 9386152c5d..43360c11cd 100755 --- a/hadoop-cloud-storage-project/hadoop-huaweicloud/pom.xml +++ b/hadoop-cloud-storage-project/hadoop-huaweicloud/pom.xml @@ -92,38 +92,6 @@ - - org.apache.maven.plugins - maven-enforcer-plugin - - - de.skuzzle.enforcer - restrict-imports-enforcer-rule - ${restrict-imports.enforcer.version} - - - - - banned-illegal-imports - process-sources - - enforce - - - - - true - Use hadoop-common provided Lists rather than Guava provided Lists - - org.apache.hadoop.thirdparty.com.google.common.collect.Lists - com.google.common.collect.Lists - - - - - - - diff --git a/hadoop-common-project/hadoop-common/pom.xml b/hadoop-common-project/hadoop-common/pom.xml index f322345c13..f49a18398f 100644 --- a/hadoop-common-project/hadoop-common/pom.xml +++ b/hadoop-common-project/hadoop-common/pom.xml @@ -647,38 +647,6 @@ - - org.apache.maven.plugins - maven-enforcer-plugin - - - de.skuzzle.enforcer - restrict-imports-enforcer-rule - ${restrict-imports.enforcer.version} - - - - - banned-illegal-imports - process-sources - - enforce - - - - - true - Use hadoop-common provided Lists rather than Guava provided Lists - - org.apache.hadoop.thirdparty.com.google.common.collect.Lists - com.google.common.collect.Lists - - - - - - - diff --git a/hadoop-common-project/hadoop-registry/pom.xml b/hadoop-common-project/hadoop-registry/pom.xml index 8e8b1e064e..d9102d1d9d 100644 --- a/hadoop-common-project/hadoop-registry/pom.xml +++ b/hadoop-common-project/hadoop-registry/pom.xml @@ -260,38 +260,6 @@ - - org.apache.maven.plugins - maven-enforcer-plugin - - - de.skuzzle.enforcer - restrict-imports-enforcer-rule - ${restrict-imports.enforcer.version} - - - - - banned-illegal-imports - process-sources - - enforce - - - - - true - Use hadoop-common provided Lists rather than Guava provided Lists - - org.apache.hadoop.thirdparty.com.google.common.collect.Lists - com.google.common.collect.Lists - - - - - - - diff --git a/hadoop-hdfs-project/hadoop-hdfs-client/pom.xml b/hadoop-hdfs-project/hadoop-hdfs-client/pom.xml index 87e5b23c40..d65e603036 100644 --- a/hadoop-hdfs-project/hadoop-hdfs-client/pom.xml +++ b/hadoop-hdfs-project/hadoop-hdfs-client/pom.xml @@ -178,38 +178,6 @@ https://maven.apache.org/xsd/maven-4.0.0.xsd"> org.apache.hadoop.hdfs.protocol.proto - - org.apache.maven.plugins - maven-enforcer-plugin - - - de.skuzzle.enforcer - restrict-imports-enforcer-rule - ${restrict-imports.enforcer.version} - - - - - banned-illegal-imports - process-sources - - enforce - - - - - true - Use hadoop-common provided Lists rather than Guava provided Lists - - org.apache.hadoop.thirdparty.com.google.common.collect.Lists - com.google.common.collect.Lists - - - - - - - diff --git a/hadoop-hdfs-project/hadoop-hdfs-httpfs/pom.xml b/hadoop-hdfs-project/hadoop-hdfs-httpfs/pom.xml index b58a6517dd..1916ef0e3b 100644 --- a/hadoop-hdfs-project/hadoop-hdfs-httpfs/pom.xml +++ b/hadoop-hdfs-project/hadoop-hdfs-httpfs/pom.xml @@ -343,38 +343,6 @@ ${basedir}/dev-support/findbugsExcludeFile.xml - - org.apache.maven.plugins - maven-enforcer-plugin - - - de.skuzzle.enforcer - restrict-imports-enforcer-rule - ${restrict-imports.enforcer.version} - - - - - banned-illegal-imports - process-sources - - enforce - - - - - true - Use hadoop-common provided Lists rather than Guava provided Lists - - org.apache.hadoop.thirdparty.com.google.common.collect.Lists - com.google.common.collect.Lists - - - - - - - diff --git a/hadoop-hdfs-project/hadoop-hdfs-nfs/pom.xml b/hadoop-hdfs-project/hadoop-hdfs-nfs/pom.xml index 8c02df5c7c..ab21583964 100644 --- a/hadoop-hdfs-project/hadoop-hdfs-nfs/pom.xml +++ b/hadoop-hdfs-project/hadoop-hdfs-nfs/pom.xml @@ -170,43 +170,6 @@ https://maven.apache.org/xsd/maven-4.0.0.xsd"> - - - - org.apache.maven.plugins - maven-enforcer-plugin - - - de.skuzzle.enforcer - restrict-imports-enforcer-rule - ${restrict-imports.enforcer.version} - - - - - banned-illegal-imports - process-sources - - enforce - - - - - true - Use hadoop-common provided Lists rather than Guava provided Lists - - org.apache.hadoop.thirdparty.com.google.common.collect.Lists - com.google.common.collect.Lists - - - - - - - - - - dist diff --git a/hadoop-hdfs-project/hadoop-hdfs-rbf/pom.xml b/hadoop-hdfs-project/hadoop-hdfs-rbf/pom.xml index f91288cd95..e17602d1f6 100644 --- a/hadoop-hdfs-project/hadoop-hdfs-rbf/pom.xml +++ b/hadoop-hdfs-project/hadoop-hdfs-rbf/pom.xml @@ -305,38 +305,6 @@ https://maven.apache.org/xsd/maven-4.0.0.xsd"> - - org.apache.maven.plugins - maven-enforcer-plugin - - - de.skuzzle.enforcer - restrict-imports-enforcer-rule - ${restrict-imports.enforcer.version} - - - - - banned-illegal-imports - process-sources - - enforce - - - - - true - Use hadoop-common provided Lists rather than Guava provided Lists - - org.apache.hadoop.thirdparty.com.google.common.collect.Lists - com.google.common.collect.Lists - - - - - - - diff --git a/hadoop-hdfs-project/hadoop-hdfs/pom.xml b/hadoop-hdfs-project/hadoop-hdfs/pom.xml index a6af11b6db..95ac71bae2 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/pom.xml +++ b/hadoop-hdfs-project/hadoop-hdfs/pom.xml @@ -437,38 +437,6 @@ https://maven.apache.org/xsd/maven-4.0.0.xsd"> - - org.apache.maven.plugins - maven-enforcer-plugin - - - de.skuzzle.enforcer - restrict-imports-enforcer-rule - ${restrict-imports.enforcer.version} - - - - - banned-illegal-imports - process-sources - - enforce - - - - - true - Use hadoop-common provided Lists rather than Guava provided Lists - - org.apache.hadoop.thirdparty.com.google.common.collect.Lists - com.google.common.collect.Lists - - - - - - - diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/pom.xml b/hadoop-mapreduce-project/hadoop-mapreduce-client/pom.xml index 112a2c73e8..55940ae4ff 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/pom.xml +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/pom.xml @@ -177,38 +177,6 @@ - - org.apache.maven.plugins - maven-enforcer-plugin - - - de.skuzzle.enforcer - restrict-imports-enforcer-rule - ${restrict-imports.enforcer.version} - - - - - banned-illegal-imports - process-sources - - enforce - - - - - true - Use hadoop-common provided Lists rather than Guava provided Lists - - org.apache.hadoop.thirdparty.com.google.common.collect.Lists - com.google.common.collect.Lists - - - - - - - diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-examples/pom.xml b/hadoop-mapreduce-project/hadoop-mapreduce-examples/pom.xml index c4f89acb41..48cf27efe4 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-examples/pom.xml +++ b/hadoop-mapreduce-project/hadoop-mapreduce-examples/pom.xml @@ -155,38 +155,6 @@ - - org.apache.maven.plugins - maven-enforcer-plugin - - - de.skuzzle.enforcer - restrict-imports-enforcer-rule - ${restrict-imports.enforcer.version} - - - - - banned-illegal-imports - process-sources - - enforce - - - - - true - Use hadoop-common provided Lists rather than Guava provided Lists - - org.apache.hadoop.thirdparty.com.google.common.collect.Lists - com.google.common.collect.Lists - - - - - - - diff --git a/hadoop-maven-plugins/src/main/java/org/apache/hadoop/maven/plugin/resourcegz/ResourceGzMojo.java b/hadoop-maven-plugins/src/main/java/org/apache/hadoop/maven/plugin/resourcegz/ResourceGzMojo.java index 5d99d28aa8..0b0139eebe 100644 --- a/hadoop-maven-plugins/src/main/java/org/apache/hadoop/maven/plugin/resourcegz/ResourceGzMojo.java +++ b/hadoop-maven-plugins/src/main/java/org/apache/hadoop/maven/plugin/resourcegz/ResourceGzMojo.java @@ -13,7 +13,6 @@ */ package org.apache.hadoop.maven.plugin.resourcegz; -import org.apache.hadoop.thirdparty.com.google.common.collect.Lists; import org.apache.commons.io.IOUtils; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; @@ -27,6 +26,7 @@ import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; +import java.util.Arrays; import java.util.List; import java.util.function.Consumer; import java.util.regex.Matcher; @@ -65,7 +65,7 @@ public void execute() throws MojoExecutionException, MojoFailureException { try { Path inputDir = new File(inputDirectory).toPath(); File outputDir = new File(outputDirectory); - List exts = Lists.newArrayList(extensions.split(",")); + List exts = Arrays.asList(extensions.split(",")); exts.replaceAll(String::trim); GZConsumer cons = new GZConsumer(inputDir.toFile(), outputDir); Files.walk(inputDir).filter(path -> { diff --git a/hadoop-tools/hadoop-aws/pom.xml b/hadoop-tools/hadoop-aws/pom.xml index 414e69780e..0cab5ada21 100644 --- a/hadoop-tools/hadoop-aws/pom.xml +++ b/hadoop-tools/hadoop-aws/pom.xml @@ -467,38 +467,6 @@ - - org.apache.maven.plugins - maven-enforcer-plugin - - - de.skuzzle.enforcer - restrict-imports-enforcer-rule - ${restrict-imports.enforcer.version} - - - - - banned-illegal-imports - process-sources - - enforce - - - - - true - Use hadoop-common provided Lists rather than Guava provided Lists - - org.apache.hadoop.thirdparty.com.google.common.collect.Lists - com.google.common.collect.Lists - - - - - - - diff --git a/hadoop-tools/hadoop-azure/pom.xml b/hadoop-tools/hadoop-azure/pom.xml index 59aae51e60..cc773ab777 100644 --- a/hadoop-tools/hadoop-azure/pom.xml +++ b/hadoop-tools/hadoop-azure/pom.xml @@ -99,44 +99,11 @@ - - - - org.apache.maven.plugins - maven-enforcer-plugin - - - de.skuzzle.enforcer - restrict-imports-enforcer-rule - ${restrict-imports.enforcer.version} - - - - - banned-illegal-imports - process-sources - - enforce - - - - - true - Use hadoop-common provided Lists rather than Guava provided Lists - - org.apache.hadoop.thirdparty.com.google.common.collect.Lists - com.google.common.collect.Lists - - - - - - - + - +