Skip to content

HBASE-28921 Avoid bundling hbase-webapps folder in default jars #6432

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions hbase-rest/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,15 @@
<skipAssembly>true</skipAssembly>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<excludes>
<exclude>**/hbase-webapps/**</exclude>
</excludes>
</configuration>
</plugin>
<!-- General ant tasks, bound to different build phases -->
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
Expand Down
90 changes: 75 additions & 15 deletions hbase-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
<license.bundles.bootstrap>true</license.bundles.bootstrap>
<license.bundles.jquery>true</license.bundles.jquery>
<license.bundles.vega>true</license.bundles.vega>
<hbase.webapps.dir>hbase-webapps</hbase.webapps.dir>
</properties>
<dependencies>
<dependency>
Expand Down Expand Up @@ -444,24 +445,83 @@
<skipAssembly>true</skipAssembly>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>add-test-source</id>
<goals>
<goal>add-test-resource</goal>
</goals>
<phase>generate-test-sources</phase>
<configuration>
<!-- Add the hbase-webapps directory to the test resources -->
<resources>
<resource>
<!-- Directory containing hbase-webapps -->
<directory>target/${hbase.webapps.dir}</directory>
<!-- Target directory under test-classes -->
<targetPath>${hbase.webapps.dir}</targetPath>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<!-- Exclude these 2 packages, because their dependency _binary_ files
include the sources, and Maven 2.2 appears to add them to the sources to compile,
weird -->
<excludes>
<exclude>org/apache/jute/**</exclude>
<exclude>org/apache/zookeeper/**</exclude>
<exclude>**/*.jsp</exclude>
<exclude>hbase-site.xml</exclude>
<exclude>hdfs-site.xml</exclude>
<exclude>log4j.properties</exclude>
<exclude>mapred-queues.xml</exclude>
<exclude>mapred-site.xml</exclude>
</excludes>
</configuration>
<executions>
<!-- Exclude specified file(s) from the default JAR -->
<execution>
<id>default-jar</id>
<goals>
<goal>jar</goal>
</goals>
<phase>package</phase>
<configuration>
<excludes>
<!-- Exclude these 2 packages, because their dependency _binary_ files
include the sources, and Maven 2.2 appears to add them to the sources to compile,
weird -->
<exclude>org/apache/jute/**</exclude>
<exclude>org/apache/zookeeper/**</exclude>
<exclude>**/*.jsp</exclude>
<exclude>hbase-site.xml</exclude>
<exclude>hdfs-site.xml</exclude>
<exclude>log4j.properties</exclude>
<exclude>mapred-queues.xml</exclude>
<exclude>mapred-site.xml</exclude>
<!-- NOTE: We have the below exclude only for the default JAR -->
<exclude>**/hbase-webapps/**</exclude>
</excludes>
</configuration>
</execution>
<!-- Copy of default jar exclusions, minus not removing hbase-webapps-->
<execution>
<id>test-jar</id>
<goals>
<goal>test-jar</goal>
</goals>
<phase>package</phase>
<configuration>
<classifier>tests</classifier>
<excludes>
<exclude>org/apache/jute/**</exclude>
<exclude>org/apache/zookeeper/**</exclude>
<exclude>**/*.jsp</exclude>
<exclude>hbase-site.xml</exclude>
<exclude>hdfs-site.xml</exclude>
<exclude>log4j.properties</exclude>
<exclude>mapred-queues.xml</exclude>
<exclude>mapred-site.xml</exclude>
<!-- We do not want to exclude hbase-webapps from tests. We actually intentionally
add this directory to out test resources. See HBASE-28921 for details! -->
</excludes>
</configuration>
</execution>
</executions>
</plugin>
<!-- General ant tasks, bound to different build phases -->
<plugin>
Expand Down
9 changes: 9 additions & 0 deletions hbase-thrift/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,15 @@
<skipAssembly>true</skipAssembly>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<excludes>
<exclude>**/hbase-webapps/**</exclude>
</excludes>
</configuration>
</plugin>
<!-- General ant tasks, bound to different build phases -->
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
Expand Down