环境:
Ubuntu 10.10
Tomcat 6.x
1. 首先修改build.xml文件, 修改前后的diff:
xxx@ubuntu:~/workspace/lucene$ diff build.xml build.old.xml
45,50d44
< <path>
< <path refid="classpath" />
< <pathelement location="${build.dir}/classes/wbia" />
< <pathelement location="lib/IKAnalyzer3.2.5Stable.jar" />
< </path>
<
148,159d141
< <target depends="compile-wbia">
< <sequential>
< <build-manifest title="Lucene Search Engine: demos" />
< <jar destfile="${build.dir}/${demo.name}.jar" basedir="${build.dir}/classes/wbia" excludes="**/*.java" manifest="${manifest.file}">
< <metainf dir="${common.dir}">
< <include />
< <include />
< </metainf>
< </jar>
< </sequential>
< </target>
<
187,201d168
< <target depends="jar-core,jar-wbia">
< <sequential>
< <build-manifest title="Lucene Search Engine: demos" />
< <war destfile="${build.dir}/${demo.war.name}.war" webxml="src/jsp/WEB-INF/web.xml" manifest="${manifest.file}">
< <fileset dir="src/jsp.wbia" excludes="WEB-INF/web.xml" />
< <lib dir="${build.dir}" includes="${final.name}.jar" />
< <lib dir="lib" includes="IKAnalyzer3.2.5Stable.jar" />
< <metainf dir="${common.dir}">
< <include />
< <include />
< </metainf>
< </war>
< </sequential>
< </target>
<
213,220d179
< </compile>
< </target>
<
< <target depends="compile-core">
< <mkdir dir="${build.dir}/classes/wbia" />
<
< <compile srcdir="contrib/wbia" destdir="${build.dir}/classes/wbia">
< <classpath refid="wbia.classpath" />
2. 再将src/jsp复制一份命名为src/jsp.wbia, 修改src/jsp.wbia/results.jsp, 【Linux公社 】主要是添加页面编码, IKQueryParser和搜索结果总数.