Author: nspiegelberg Date: Tue Sep 27 02:41:27 2011 New Revision: 1176174 URL: http://svn.apache.org/viewvc?rev=1176174&view=rev Log: import fix for HBASE-2703: web ui broken
Summary: Importing patch for https://issues.apache.org/jira/browse/HBASE-2703 into internal branch. Test Plan: Deployed on cluster, and verified master and region server web ui is working as expected. DiffCamp Revision: 122572 Reviewed By: kranganathan CC: kranganathan, hbase@lists Revert Plan: OK Added: hbase/branches/0.89/src/main/resources/hbase-webapps/static/hbase_logo_med.gif Removed: hbase/branches/0.89/src/assembly/bin.xml.orig Modified: hbase/branches/0.89/bin/hbase hbase/branches/0.89/pom.xml hbase/branches/0.89/src/assembly/bin.xml Modified: hbase/branches/0.89/bin/hbase URL: http://svn.apache.org/viewvc/hbase/branches/0.89/bin/hbase?rev=1176174&r1=1176173&r2=1176174&view=diff ============================================================================== --- hbase/branches/0.89/bin/hbase (original) +++ hbase/branches/0.89/bin/hbase Tue Sep 27 02:41:27 2011 @@ -136,19 +136,6 @@ add_maven_test_classes_to_classpath() { fi } -add_maven_target_dir_to_classpath() { - # I never seem to *have* such a dir. -tlipcon - HBASE_VER=`grep '<version>' $HBASE_HOME/pom.xml | head -1 | sed 's/.*<version>\(.*\)<\/version>/\1/'` - MAVEN_TARGET_DIR=$HBASE_HOME/target/hbase-$HBASE_VER-bin/hbase-$HBASE_VER - if [ -d "$MAVEN_TARGET_DIR" ]; then - for f in $MAVEN_TARGET_DIR/*.jar $MAVEN_TARGET_DIR/lib/*.jar; do - if [ -f $f ]; then - CLASSPATH=${CLASSPATH}:$f; - fi - done - fi -} - # Add maven target directory if $in_sources_dir; then add_maven_deps_to_classpath @@ -158,11 +145,18 @@ fi # For releases, add hbase & webapps to CLASSPATH # Webapps must come first else it messes up Jetty -if [ -d "$HBASE_HOME/webapps" ]; then +if [ -d "$HBASE_HOME/hbase-webapps" ]; then CLASSPATH=${CLASSPATH}:$HBASE_HOME fi +if [ -d "$HBASE_HOME/target/hbase-webapps" ]; then + CLASSPATH="${CLASSPATH}:${HBASE_HOME}/target" +fi for f in $HBASE_HOME/hbase*.jar; do - if [ -f $f ]; then + if [[ $f = *sources.jar ]] + then + : # Skip sources.jar + elif [ -f $f ] + then CLASSPATH=${CLASSPATH}:$f; fi done Modified: hbase/branches/0.89/pom.xml URL: http://svn.apache.org/viewvc/hbase/branches/0.89/pom.xml?rev=1176174&r1=1176173&r2=1176174&view=diff ============================================================================== --- hbase/branches/0.89/pom.xml (original) +++ hbase/branches/0.89/pom.xml Tue Sep 27 02:41:27 2011 @@ -7,13 +7,11 @@ <packaging>jar</packaging> <version>0.21.0-SNAPSHOT</version> <name>HBase</name> - <!-- START SNIPPET: description --> <description> HBase is the &lt;a href="http://hadoop.apache.org"&rt;Hadoop</a&rt; database. Use it when you need random, realtime read/write access to your Big Data. This project's goal is the hosting of very large tables -- billions of rows X millions of columns -- atop clusters of commodity hardware. </description> - <!-- END SNIPPET: description --> <url>http://hbase.apache.org</url> <licenses> @@ -310,15 +308,15 @@ <resources> <resource> - <directory>src/main/resources</directory> + <directory>src/main/resources/</directory> + <includes> + <include>hbase-default.xml</include> + </includes> </resource> <resource> - <directory>src/main/hbase-webapps</directory> + <directory>${project.build.directory}</directory> <includes> - <include>*/.gif</include> - <include>*/.css</include> - <include>*/.html</include> - <include>*/.xml</include> + <include>hbase-webapps/**</include> </includes> </resource> </resources> @@ -397,32 +395,43 @@ <artifactId>maven-antrun-plugin</artifactId> <executions> <execution> - <id>JSPC</id> + <id>generate</id> <phase>generate-sources</phase> <configuration> <tasks> + <property name="build.webapps" + location="${project.build.directory}/hbase-webapps" /> + <property name="src.webapps" + location="${basedir}/src/main/resources/hbase-webapps" /> + <property name="generated.sources" + location="${project.build.directory}/generated-sources" /> + + <mkdir dir="${build.webapps}"/> + <copy todir="${build.webapps}"> + <fileset dir="${src.webapps}"> + <exclude name="**/*.jsp" /> + <exclude name="**/.*" /> + <exclude name="**/*~" /> + </fileset> + </copy> + + <!--The compile.classpath is passed in by maven--> <taskdef classname="org.apache.jasper.JspC" name="jspcompiler" classpathref="maven.compile.classpath"/> - <jspcompiler uriroot="${basedir}/src/main/resources/hbase-webapps/master" - outputdir="${project.build.directory}/jspc" - package="org.apache.hadoop.hbase.generated.master" - webxml="${basedir}/src/main/resources/hbase-webapps/master/WEB-INF/web.xml"/> - <jspcompiler uriroot="${basedir}/src/main/resources/hbase-webapps/regionserver" - outputdir="${project.build.directory}/jspc" - package="org.apache.hadoop.hbase.generated.regionserver" - webxml="${basedir}/src/main/resources/hbase-webapps/regionserver/WEB-INF/web.xml"/> - </tasks> - </configuration> - <goals> - <goal>run</goal> - </goals> - </execution> - <execution> - <id>package-info</id> - <phase>generate-sources</phase> - <configuration> - <tasks> + + <mkdir dir="${build.webapps}/master/WEB-INF"/> + <jspcompiler uriroot="${src.webapps}/master" + outputdir="${generated.sources}" + package="org.apache.hadoop.hbase.generated.master" + webxml="${build.webapps}/master/WEB-INF/web.xml"/> + + <mkdir dir="${build.webapps}/regionserver/WEB-INF"/> + <jspcompiler uriroot="${src.webapps}/regionserver" + outputdir="${generated.sources}" + package="org.apache.hadoop.hbase.generated.regionserver" + webxml="${build.webapps}/regionserver/WEB-INF/web.xml"/> + <exec executable="sh"> - <arg line="${basedir}/src/saveVersion.sh ${project.version} ${project.build.directory}/generated-sources"/> + <arg line="${basedir}/src/saveVersion.sh ${project.version} ${generated.sources}"/> </exec> </tasks> </configuration> Modified: hbase/branches/0.89/src/assembly/bin.xml URL: http://svn.apache.org/viewvc/hbase/branches/0.89/src/assembly/bin.xml?rev=1176174&r1=1176173&r2=1176174&view=diff ============================================================================== --- hbase/branches/0.89/src/assembly/bin.xml (original) +++ hbase/branches/0.89/src/assembly/bin.xml Tue Sep 27 02:41:27 2011 @@ -34,11 +34,8 @@ </includes> </fileSet> <fileSet> - <directory>target/classes/hbase-webapps</directory> + <directory>target/hbase-webapps</directory> <outputDirectory>hbase-webapps</outputDirectory> - <excludes> - <exclude>**/*.jsp</exclude> - </excludes> </fileSet> <fileSet> <directory>target/site</directory> Added: hbase/branches/0.89/src/main/resources/hbase-webapps/static/hbase_logo_med.gif URL: http://svn.apache.org/viewvc/hbase/branches/0.89/src/main/resources/hbase-webapps/static/hbase_logo_med.gif?rev=1176174&view=auto ============================================================================== Files hbase/branches/0.89/src/main/resources/hbase-webapps/static/hbase_logo_med.gif (added) and hbase/branches/0.89/src/main/resources/hbase-webapps/static/hbase_logo_med.gif Tue Sep 27 02:41:27 2011 differ
