HBASE-18176 Enforce no scala outside hbase-spark

Signed-off-by: Sean Busbey <busbey@apache.org>
This commit is contained in:
Mike Drob 2017-06-07 13:55:47 -05:00 committed by Sean Busbey
parent 79607fda85
commit 4aa7ce399e
3 changed files with 59 additions and 1 deletions

View File

@ -37,6 +37,22 @@
</properties> </properties>
<build> <build>
<plugins> <plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<executions>
<!-- hbase-spark is ok in the assembly -->
<execution>
<id>banned-hbase-spark</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<skip>true</skip>
</configuration>
</execution>
</executions>
</plugin>
<!-- licensing info from our dependencies --> <!-- licensing info from our dependencies -->
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>

View File

@ -626,11 +626,11 @@
</execution> </execution>
</executions> </executions>
</plugin> </plugin>
<!-- purposefully have jsr 305 exclusion only warn in this module -->
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId> <artifactId>maven-enforcer-plugin</artifactId>
<executions> <executions>
<!-- purposefully have jsr 305 exclusion only warn in this module -->
<execution> <execution>
<id>banned-jsr305</id> <id>banned-jsr305</id>
<goals> <goals>
@ -640,6 +640,16 @@
<fail>false</fail> <fail>false</fail>
</configuration> </configuration>
</execution> </execution>
<!-- scala is ok in the spark modules -->
<execution>
<id>banned-scala</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<skip>true</skip>
</configuration>
</execution>
</executions> </executions>
</plugin> </plugin>
</plugins> </plugins>

32
pom.xml
View File

@ -958,6 +958,38 @@
</rules> </rules>
</configuration> </configuration>
</execution> </execution>
<execution>
<id>banned-scala</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<bannedDependencies>
<excludes>
<exclude>org.scala-lang:scala-library</exclude>
</excludes>
<message>We don't allow Scala outside of the hbase-spark module, see HBASE-13992.</message>
</bannedDependencies>
</rules>
</configuration>
</execution>
<execution>
<id>banned-hbase-spark</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<bannedDependencies>
<excludes>
<exclude>org.apache.hbase:hbase-spark</exclude>
</excludes>
<message>We don't allow other modules to depend on hbase-spark, see HBASE-13992.</message>
</bannedDependencies>
</rules>
</configuration>
</execution>
</executions> </executions>
</plugin> </plugin>
<!-- parent-module only plugins --> <!-- parent-module only plugins -->