HADOOP-17676. Restrict imports from org.apache.curator.shaded (#2969)

Signed-off-by: Akira Ajisaka <aajisaka@apache.org>
(cherry picked from commit 62bcc79a2c)
This commit is contained in:
Viraj Jasani 2021-05-03 21:40:26 +05:30 committed by Akira Ajisaka
parent 25244c4eec
commit 658bb49e66
No known key found for this signature in database
GPG Key ID: C1EDBB9CA400FD50
1 changed files with 28 additions and 0 deletions

28
pom.xml
View File

@ -101,6 +101,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/x
<maven-assembly-plugin.version>2.4</maven-assembly-plugin.version> <maven-assembly-plugin.version>2.4</maven-assembly-plugin.version>
<maven-dependency-plugin.version>3.0.2</maven-dependency-plugin.version> <maven-dependency-plugin.version>3.0.2</maven-dependency-plugin.version>
<maven-enforcer-plugin.version>3.0.0-M1</maven-enforcer-plugin.version> <maven-enforcer-plugin.version>3.0.0-M1</maven-enforcer-plugin.version>
<restrict-imports.enforcer.version>1.1.0</restrict-imports.enforcer.version>
<maven-javadoc-plugin.version>3.0.1</maven-javadoc-plugin.version> <maven-javadoc-plugin.version>3.0.1</maven-javadoc-plugin.version>
<maven-gpg-plugin.version>1.5</maven-gpg-plugin.version> <maven-gpg-plugin.version>1.5</maven-gpg-plugin.version>
<maven-remote-resources-plugin.version>1.5</maven-remote-resources-plugin.version> <maven-remote-resources-plugin.version>1.5</maven-remote-resources-plugin.version>
@ -160,6 +161,33 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/x
</requireJavaVersion> </requireJavaVersion>
</rules> </rules>
</configuration> </configuration>
<dependencies>
<dependency>
<groupId>de.skuzzle.enforcer</groupId>
<artifactId>restrict-imports-enforcer-rule</artifactId>
<version>${restrict-imports.enforcer.version}</version>
</dependency>
</dependencies>
<executions>
<execution>
<id>banned-illegal-imports</id>
<phase>process-sources</phase>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<restrictImports implementation="de.skuzzle.enforcer.restrictimports.rule.RestrictImports">
<includeTestCode>true</includeTestCode>
<reason>Use hadoop-thirdparty shaded instead of curator shaded</reason>
<bannedImports>
<bannedImport>org.apache.curator.shaded.**</bannedImport>
</bannedImports>
</restrictImports>
</rules>
</configuration>
</execution>
</executions>
</plugin> </plugin>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>