Skip to content

Commit b445217

Browse files
committed
HBASE-28983 Static resources are not loaded on REST web UI pages in dev mode
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.
1 parent d67d93d commit b445217

File tree

11 files changed

+46
-155
lines changed

11 files changed

+46
-155
lines changed

hbase-rest/pom.xml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,29 @@
289289
<skipAssembly>true</skipAssembly>
290290
</configuration>
291291
</plugin>
292+
<!-- Copy the static web resources (JS, CSS, images, etc.) from hbase-server sources -->
293+
<plugin>
294+
<artifactId>maven-resources-plugin</artifactId>
295+
<executions>
296+
<execution>
297+
<id>copy-static-resources</id>
298+
<goals>
299+
<goal>copy-resources</goal>
300+
</goals>
301+
<phase>generate-resources</phase>
302+
<configuration>
303+
<outputDirectory>${project.build.outputDirectory}/hbase-webapps/static</outputDirectory>
304+
<outputDirectory>${project.build.directory}/hbase-webapps/static</outputDirectory>
305+
<overwrite>true</overwrite>
306+
<resources>
307+
<resource>
308+
<directory>../hbase-server/src/main/resources/hbase-webapps/static</directory>
309+
</resource>
310+
</resources>
311+
</configuration>
312+
</execution>
313+
</executions>
314+
</plugin>
292315
<plugin>
293316
<groupId>org.apache.maven.plugins</groupId>
294317
<artifactId>maven-jar-plugin</artifactId>

hbase-thrift/pom.xml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,29 @@
194194
<skipAssembly>true</skipAssembly>
195195
</configuration>
196196
</plugin>
197+
<!-- Copy the static web resources (JS, CSS, images, etc.) from hbase-server sources -->
198+
<plugin>
199+
<artifactId>maven-resources-plugin</artifactId>
200+
<executions>
201+
<execution>
202+
<id>copy-static-resources</id>
203+
<goals>
204+
<goal>copy-resources</goal>
205+
</goals>
206+
<phase>generate-resources</phase>
207+
<configuration>
208+
<outputDirectory>${project.build.outputDirectory}/hbase-webapps/static</outputDirectory>
209+
<outputDirectory>${project.build.directory}/hbase-webapps/static</outputDirectory>
210+
<overwrite>true</overwrite>
211+
<resources>
212+
<resource>
213+
<directory>../hbase-server/src/main/resources/hbase-webapps/static</directory>
214+
</resource>
215+
</resources>
216+
</configuration>
217+
</execution>
218+
</executions>
219+
</plugin>
197220
<plugin>
198221
<groupId>org.apache.maven.plugins</groupId>
199222
<artifactId>maven-jar-plugin</artifactId>

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

Lines changed: 0 additions & 6 deletions
This file was deleted.

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

Lines changed: 0 additions & 102 deletions
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

Lines changed: 0 additions & 7 deletions
This file was deleted.

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

Lines changed: 0 additions & 2 deletions
This file was deleted.

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

Lines changed: 0 additions & 38 deletions
This file was deleted.

0 commit comments

Comments
 (0)