This is an automated email from the ASF dual-hosted git repository. stoty pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/phoenix.git
The following commit(s) were added to refs/heads/master by this push: new 6d43aa2 PHOENIX-6309 : Use maven enforcer plugin to ban imports from illegal packages (as per project guidelines) 6d43aa2 is described below commit 6d43aa23e7c1b83778db26313a96fcd4fdf523eb Author: Viraj Jasani <vjas...@apache.org> AuthorDate: Sun Jan 10 20:34:49 2021 +0530 PHOENIX-6309 : Use maven enforcer plugin to ban imports from illegal packages (as per project guidelines) --- pom.xml | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/pom.xml b/pom.xml index 4256c36..85ec281 100644 --- a/pom.xml +++ b/pom.xml @@ -133,6 +133,7 @@ <maven-eclipse-plugin.version>2.9</maven-eclipse-plugin.version> <maven-build-helper-plugin.version>1.9.1</maven-build-helper-plugin.version> <maven-enforcer-plugin.version>3.0.0-M3</maven-enforcer-plugin.version> + <restrict-imports.enforcer.version>1.1.0</restrict-imports.enforcer.version> <maven-shade-plugin.version>3.2.4</maven-shade-plugin.version> <maven-antlr-eclipse-plugin.version>${antlr.version}</maven-antlr-eclipse-plugin.version> <maven-project-info-reports-plugin.version>3.1.1</maven-project-info-reports-plugin.version> @@ -453,6 +454,53 @@ <artifactId>protobuf-maven-plugin</artifactId> <version>${protobuf.plugin.version}</version> </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-enforcer-plugin</artifactId> + <version>${maven-enforcer-plugin.version}</version> + <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 SLF4j for logging</reason> + <bannedImports> + <bannedImport>org.apache.commons.logging.Log</bannedImport> + <bannedImport>org.apache.commons.logging.LogFactory</bannedImport> + </bannedImports> + </restrictImports> + <restrictImports implementation="de.skuzzle.enforcer.restrictimports.rule.RestrictImports"> + <includeTestCode>true</includeTestCode> + <reason>Use shaded version in phoenix-thirdparty</reason> + <bannedImports> + <bannedImport>com.google.common.**</bannedImport> + </bannedImports> + </restrictImports> + <restrictImports implementation="de.skuzzle.enforcer.restrictimports.rule.RestrictImports"> + <includeTestCode>true</includeTestCode> + <reason>Use commons lang 3</reason> + <bannedImports> + <bannedImport>org.apache.commons.lang.**</bannedImport> + </bannedImports> + </restrictImports> + </rules> + </configuration> + </execution> + </executions> + </plugin> </plugins> </pluginManagement>