79 lines
3.2 KiB
XML
79 lines
3.2 KiB
XML
<?xml version="1.0"?>
|
|
|
|
<!--
|
|
Licensed to the Apache Software Foundation (ASF) under one or more
|
|
contributor license agreements. See the NOTICE file distributed with
|
|
this work for additional information regarding copyright ownership.
|
|
The ASF licenses this file to You under the Apache License, Version 2.0
|
|
(the "License"); you may not use this file except in compliance with
|
|
the License. You may obtain a copy of the License at
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
See the License for the specific language governing permissions and
|
|
limitations under the License.
|
|
-->
|
|
|
|
<!--
|
|
This is a script to compile the jsp for the hbase webapps. Currently,
|
|
generation of java classes from jsp is done manually and the produced
|
|
java classes are then checked in. We do it this way keeping all to do
|
|
with jsp in a separate build file because trying to build jsp inline
|
|
we trip over the 'famous' commons-logging classloader problem:
|
|
|
|
org.apache.commons.logging.LogConfigurationException: Invalid
|
|
class loader hierarchy. You have more than one version of
|
|
'org.apache.commons.logging.Log' visible, which is not allowed.
|
|
|
|
See http://www.qos.ch/logging/classloader.jsp. Its addressed
|
|
with later versions of jasper apparently (Using later versions of
|
|
jasper in this hbase subproject is not sufficent), so when hadoop
|
|
goes to jetty6 (HADOOP-1650), we should be able to integrate jsp compiling into
|
|
general compile (See http://issues.apache.org/bugzilla/show_bug.cgi?id=36968)
|
|
|
|
Meantime, if changes in jsps, just checkin the product of this script:
|
|
the generated java classes and the web.xml. To run, do following:
|
|
|
|
$ ant -f build-webapps.xml
|
|
-->
|
|
<project name="build.hbase.jsp" default="jspc">
|
|
<property name="lib.dir" value="${basedir}/lib" />
|
|
<property name="hadoop.root" location="${basedir}/../../../"/>
|
|
<property name="src.webapps" value="${basedir}/src/webapps" />
|
|
<property name="generated.webapps.src"
|
|
value="${basedir}/src/java"/>
|
|
|
|
<target name="jspc" >
|
|
<path id="jspc.classpath">
|
|
<fileset dir="${lib.dir}">
|
|
<include name="commons-el*jar" />
|
|
</fileset>
|
|
<fileset dir="${hadoop.root}/lib/jetty-ext/">
|
|
<include name="*jar" />
|
|
</fileset>
|
|
<fileset dir="${hadoop.root}/lib/">
|
|
<include name="servlet-api*jar" />
|
|
<include name="commons-logging*jar" />
|
|
</fileset>
|
|
</path>
|
|
<taskdef classname="org.apache.jasper.JspC" name="jspcompiler" >
|
|
<classpath refid="jspc.classpath"/>
|
|
</taskdef>
|
|
<jspcompiler
|
|
uriroot="${src.webapps}/master"
|
|
outputdir="${generated.webapps.src}"
|
|
package="org.apache.hadoop.hbase.generated.master"
|
|
webxml="${src.webapps}/master/WEB-INF/web.xml">
|
|
</jspcompiler>
|
|
<jspcompiler
|
|
uriroot="${src.webapps}/regionserver"
|
|
outputdir="${generated.webapps.src}"
|
|
package="org.apache.hadoop.hbase.generated.regionserver"
|
|
webxml="${src.webapps}/regionserver/WEB-INF/web.xml">
|
|
</jspcompiler>
|
|
</target>
|
|
</project>
|