Skip to content

Commit 4e40bd5

Browse files
authored
HBASE-28983 Static resources are not loaded on REST web UI pages in dev mode (#6491)
This way the `hbase-webapps/static` source directory (which holds JS, CSS, image files) is not duplicated anymore. It is only present under `hbase-server`. This directory is then coped by maven-resources-plugin to the target directory of the REST and Thrift projects. For this deleted the static directory below the Thrift project. Signed-off-by: Nihal Jain <[email protected]> Reviewed-by: Andrew Purtell <[email protected]>
1 parent 08de8ed commit 4e40bd5

File tree

11 files changed

+46
-155
lines changed

11 files changed

+46
-155
lines changed

hbase-rest/pom.xml

+23
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,29 @@
279279
<skipAssembly>true</skipAssembly>
280280
</configuration>
281281
</plugin>
282+
<!-- Copy the static web resources (JS, CSS, images, etc.) from hbase-server sources -->
283+
<plugin>
284+
<artifactId>maven-resources-plugin</artifactId>
285+
<executions>
286+
<execution>
287+
<id>copy-static-resources</id>
288+
<goals>
289+
<goal>copy-resources</goal>
290+
</goals>
291+
<phase>generate-resources</phase>
292+
<configuration>
293+
<outputDirectory>${project.build.outputDirectory}/hbase-webapps/static</outputDirectory>
294+
<outputDirectory>${project.build.directory}/hbase-webapps/static</outputDirectory>
295+
<overwrite>true</overwrite>
296+
<resources>
297+
<resource>
298+
<directory>../hbase-server/src/main/resources/hbase-webapps/static</directory>
299+
</resource>
300+
</resources>
301+
</configuration>
302+
</execution>
303+
</executions>
304+
</plugin>
282305
<plugin>
283306
<groupId>org.apache.maven.plugins</groupId>
284307
<artifactId>maven-jar-plugin</artifactId>

hbase-thrift/pom.xml

+23
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,29 @@
189189
<skipAssembly>true</skipAssembly>
190190
</configuration>
191191
</plugin>
192+
<!-- Copy the static web resources (JS, CSS, images, etc.) from hbase-server sources -->
193+
<plugin>
194+
<artifactId>maven-resources-plugin</artifactId>
195+
<executions>
196+
<execution>
197+
<id>copy-static-resources</id>
198+
<goals>
199+
<goal>copy-resources</goal>
200+
</goals>
201+
<phase>generate-resources</phase>
202+
<configuration>
203+
<outputDirectory>${project.build.outputDirectory}/hbase-webapps/static</outputDirectory>
204+
<outputDirectory>${project.build.directory}/hbase-webapps/static</outputDirectory>
205+
<overwrite>true</overwrite>
206+
<resources>
207+
<resource>
208+
<directory>../hbase-server/src/main/resources/hbase-webapps/static</directory>
209+
</resource>
210+
</resources>
211+
</configuration>
212+
</execution>
213+
</executions>
214+
</plugin>
192215
<plugin>
193216
<groupId>org.apache.maven.plugins</groupId>
194217
<artifactId>maven-jar-plugin</artifactId>

hbase-thrift/src/main/resources/hbase-webapps/static/css/bootstrap.min.css

-6
This file was deleted.

hbase-thrift/src/main/resources/hbase-webapps/static/css/hbase.css

-102
This file was deleted.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

hbase-thrift/src/main/resources/hbase-webapps/static/js/bootstrap.min.js

-7
This file was deleted.

hbase-thrift/src/main/resources/hbase-webapps/static/js/jquery.min.js

-2
This file was deleted.

hbase-thrift/src/main/resources/hbase-webapps/static/js/tab.js

-38
This file was deleted.

0 commit comments

Comments
 (0)