Applied new structure of the gdata-server project.

All source and test-sources are located under the ./src/ folder.
Created GData Object Model (GOM) folder ./src/gom, Core-Folder ./src/core and ./src/hivemind
Sources and Tests now splitted into their "sub" projects.

Fixed compile error in GDataIndexWriter as IndexWriter has not commitTimeout setter anymore.


git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@486622 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Simon Willnauer 2006-12-13 12:32:08 +00:00
parent 59afa74fb1
commit e3e2ed3801
234 changed files with 311 additions and 63 deletions

View File

@ -23,6 +23,7 @@
</description>
<import file="gdata-build/get-dependencies.xml" />
<import file="gdata-build/ioc-container.xml" />
<import file="gdata-build/gom-build.xml" />
<property name="javac.source" value="1.5" />
<property name="javac.target" value="1.5" />
<property name="gdata.war.name" value="gdata-server" />
@ -49,12 +50,27 @@
<include name="${db4o.jar}" if="db4o.jar.present" />
</fileset>
</path>
<condition property="do.download">
<not>
<and>
<available file="${gdata.external.lib.dir}/stax-api-1.0.1.jar" />
<available file="${gdata.external.lib.dir}/stax-1.1.2-dev.jar" />
<available file="${gdata.external.lib.dir}/hivemind-1.1.jar" />
<available file="${gdata.external.lib.dir}/hivemind-lib-1.1.jar" />
<available file="${gdata.external.lib.dir}/hivemind-jmx-1.1.jar" />
<available file="${gdata.external.lib.dir}/hessian-3.0.20.jar" />
<available file="${gdata.external.lib.dir}/easymock-1.2_Java1.5.jar" />
<available file="${gdata.external.lib.dir}/oro-2.0.6.jar" />
</and>
</not>
</condition>
<!-- redefine compile-core and compile-test to exclude 3rd party dependend sources -->
<target name="compile-core" depends="init, build-dependencies">
<target name="compile-core" depends="init, download">
<echo>Use gdata - compile-core task </echo>
<compile srcdir="src/java" destdir="${build.dir}/classes/java">
<compile srcdir="src/core/java" destdir="${build.dir}/classes/java">
<classpath>
<path refid="classpath"/>
<path refid="build.path"/>
@ -62,32 +78,35 @@
<exclude name="org/apache/lucene/gdata/storage/db4o/**" unless="db4o.jar.present" />
</compile>
<antcall target="compile-IoC-container"/>
<antcall target="compile-gom"/>
</target>
<target name="compile-test" depends="compile-core, test-dependencies">
<target name="compile-test" depends="compile-core, download">
<echo>Use gdata - compile-test task </echo>
<compile srcdir="src/test" destdir="${build.dir}/classes/test">
<compile srcdir="src/core/test" destdir="${build.dir}/classes/test">
<classpath>
<path refid="test.build.path"/>
<path refid="test.classpath"/>
</classpath>
<exclude name="org/apache/lucene/gdata/storage/db4o/**" unless="db4o.jar.present" />
</compile>
<copy todir="${build.dir}/classes/test">
<copy todir="${build.dir}/classes/core/test">
<fileset dir="src/test" excludes="**/*.java" />
</copy>
<antcall target="compile-IoC-container-test"/>
<antcall target="compile-gom-test"/>
</target>
<pathconvert property="project.classpath" targetos="unix" refid="additional.dependencies" />
<import file="../contrib-build.xml" />
<target name="prepare-dist" depends="jar-core,jar-IoC-container">
<target name="prepare-dist" depends="jar-core,jar-IoC-container,jar-gom">
<echo>Prepare dist directory</echo>
<delete dir="${dist.dir}" />
<mkdir dir="${dist.dir}" />
</target>
<target name="war-gdata" depends="prepare-dist,run-dependencies">
<target name="war-gdata" depends="prepare-dist,download">
<echo>Distributing GData War </echo>
<war destfile="${dist.dir}/${gdata.war.name}.war" webxml="webroot/WEB-INF/web.xml">
<metainf dir="webroot/meta-inf" />
@ -108,8 +127,10 @@
<include name="${db4o.jar}" if="db4o.jar.present" />
</lib>
<lib refid="ioc-container-jars"/>
<lib refid="gom-jars"/>
<lib dir="${build.dir}" includes="${final.name}.jar" />
<lib dir="${build.dir}" includes="${final.name}${ioc.container.jar.prefix}" />
<lib dir="${build.dir}" includes="${final.name}${ioc.container.jar.suffix}" />
<lib dir="${build.dir}" includes="${final.name}${gom.jar.suffix}" />
<lib file="${lucene.jar}" />
</war>
</target>

View File

@ -18,54 +18,41 @@
-->
<project name="get-dependencies">
<property name="repository.url.maven" value="http://www.ibiblio.org/maven"/>
<import file="dependency.xml"/>
<target name="run-dependencies" unless="run.dependencies.fetched" depends="common-dependencies">
<echo>Resolving dependencies for distribution / war build</echo>
<ibiblio-dependency artifact="oro" version="2.0.6" group="oro" reposurl="${repository.url.maven}"/>
<ibiblio-dependency artifact="javassist" version="3.0" group="javassist" reposurl="${repository.url.maven}"/>
<property name="run.dependencies.fetched" value="true"/>
<property name="repository.url.maven" value="http://www.ibiblio.org/maven" />
<import file="dependency.xml" />
<target name="extBuildPath">
<echo>Preparing build path for external dependencies</echo>
<path id="common.build.path">
<fileset dir="${gdata.external.lib.dir}">
<include name="hivemind-1.1.jar" />
<include name="hivemind-lib-1.1.jar" />
<include name="hivemind-jmx-1.1.jar" />
<include name="hessian-3.0.20.jar" />
</fileset>
</path>
<path id="build.path">
<path refid="common.build.path" />
</path>
<path id="test.build.path">
<fileset dir="${gdata.external.lib.dir}">
<include name="easymock-1.2_Java1.5.jar" />
</fileset>
<path refid="common.build.path" />
</path>
</target>
<target name="common-dependencies" unless="common.dependencies.fetched">
<echo>Resolving common dependencies </echo>
<ibiblio-dependency artifact="hivemind" version="1.1" group="hivemind" reposurl="${repository.url.maven}"/>
<ibiblio-dependency artifact="hivemind-lib" version="1.1" group="hivemind" reposurl="${repository.url.maven}"/>
<ibiblio-dependency artifact="hivemind-jmx" version="1.1" group="hivemind" reposurl="${repository.url.maven}"/>
<ibiblio-dependency artifact="hessian" version="3.0.20" group="hessian" folder="download" reposurl="http://www.caucho.com"/>
<path id="common.build.path">
<fileset dir="${gdata.external.lib.dir}">
<include name="hivemind-1.1.jar"/>
<include name="hivemind-lib-1.1.jar"/>
<include name="hivemind-jmx-1.1.jar"/>
<include name="hessian-3.0.20.jar"/>
</fileset>
</path>
<property name="common.dependencies.fetched" value="true"/>
</target>
<target name="build-dependencies" unless="build.dependencies.fetched" depends="common-dependencies">
<echo>Resolving dependencies for build process</echo>
<path id="build.path">
<path refid="common.build.path"/>
</path>
<property name="build.dependencies.fetched" value="true"/>
<target name="download" if="do.download" depends="extBuildPath">
<ibiblio-dependency artifact="hivemind" version="1.1" group="hivemind" reposurl="${repository.url.maven}" />
<ibiblio-dependency artifact="hivemind-lib" version="1.1" group="hivemind" reposurl="${repository.url.maven}" />
<ibiblio-dependency artifact="hivemind-jmx" version="1.1" group="hivemind" reposurl="${repository.url.maven}" />
<ibiblio-dependency artifact="hessian" version="3.0.20" group="hessian" folder="download" reposurl="http://www.caucho.com" />
<ibiblio-dependency artifact="oro" version="2.0.6" group="oro" reposurl="${repository.url.maven}" />
<ibiblio-dependency artifact="javassist" version="3.0" group="javassist" reposurl="${repository.url.maven}" />
<ibiblio-dependency artifact="easymock" version="1.2_Java1.5" group="easymock" folder="easymock/1.2_Java1.5" />
<ibiblio-dependency artifact="stax" version="1.1.2-dev" group="stax" folder="jars" reposurl="http://dist.codehaus.org" />
<ibiblio-dependency artifact="stax-api" version="1.0.1" group="stax" folder="jars" reposurl="http://dist.codehaus.org" />
</target>
<target name="test-dependencies" unless="test.dependencies.fetched">
<echo>Resolving dependencies for test cases</echo>
<ibiblio-dependency artifact="easymock" version="1.2_Java1.5" group="easymock" folder="easymock/1.2_Java1.5" />
<path id="test.build.path">
<fileset dir="${gdata.external.lib.dir}">
<include name="easymock-1.2_Java1.5.jar"/>
</fileset>
</path>
<property name="test.dependencies.fetched" value="true"/>
</target>
</project>

View File

@ -0,0 +1,86 @@
<?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.
-->
<project name="gdata-server-gom" >
<property name="gom.jar.suffix" value="-gom.jar"/>
<description>
Compiles and Jars the gom dependencies for gdata-server
</description>
<target name="prepare-gom">
<available file="${build.dir}/${final.name}.jar" property="gdata.core.jar.present"/>
<fail if="${gdata.core.jar.present}" message="Must gdata core jar first. run build.xml - 'jar-core' task"/>
<path id="gom.build.path">
<fileset id="gom-jars" dir="${gdata.lib.dir}">
<include name="stax-1.1.2-dev.jar"/>
<include name="stax-api-1.0.1.jar"/>
</fileset>
</path>
<path id="gom.test.path">
<pathelement location="${build.dir}/classes/gom/java"/>
</path>
</target>
<target name="compile-gom" depends="prepare-gom">
<echo>Compile GData object model classes</echo>
<compile srcdir="src/gom/java" destdir="${build.dir}/classes/gom/java">
<classpath>
<path refid="gom.build.path"/>
</classpath>
</compile>
</target>
<target name="compile-gom-test" depends="compile-gom">
<echo>Compile GData object model test classes </echo>
<compile srcdir="src/gom/test" destdir="${build.dir}/classes/test">
<classpath>
<path refid="test.build.path"/>
<path refid="gom.test.path"/>
<path refid="gom.build.path"/>
</classpath>
</compile>
<copy todir="${build.dir}/classes/test">
<fileset dir="src/gom/test" excludes="**/*.java" />
</copy>
</target>
<target name="jar-gom" depends="compile-gom">
<echo>Jar GOM classes and metadata</echo>
<jar
destfile="${build.dir}/${final.name}${gom.jar.suffix}"
basedir="${build.dir}/classes/gom/java">
<manifest>
<attribute name="Created-By" value="Apache Jakarta"/>
<section name="org/apache/lucene/">
<attribute name="Specification-Title" value="Lucene GData Object Model"/>
<attribute name="Specification-Version" value="${version}"/>
<attribute name="Specification-Vendor" value="Lucene GData Server"/>
<attribute name="Implementation-Title" value="org.apache.lucene.gdata"/>
<attribute name="Implementation-Version" value="build ${DSTAMP}"/>
<attribute name="Implementation-Vendor" value="Lucene"/>
</section>
</manifest>
</jar>
</target>
</project>

View File

@ -17,7 +17,7 @@
-->
<project name="gdata-server-hivemind" >
<property name="ioc.container.jar.prefix" value="-hivemind.jar"/>
<property name="ioc.container.jar.suffix" value="-hivemind.jar"/>
<property name="ioc.descriptors.dir" value="./src/hivemind/descriptor"/>
<property name="ioc.descriptors.excludes" value=""/>
<property name="ioc.descriptors.includes" value="**/*.xml"/>
@ -32,6 +32,9 @@
<include name="${final.name}.jar"/>
</fileset>
</path>
<path id="IoC.container.test.path">
<pathelement location="${build.dir}/classes/hivemind/java"/>
</path>
<fileset id="ioc-container-jars" dir="${gdata.external.lib.dir}">
<include name="hivemind-1.1.jar" />
<include name="hivemind-jmx-1.1.jar" />
@ -44,7 +47,7 @@
<!-- redefine compile-core and compile-test to exclude 3rd party dependend sources -->
<target name="compile-IoC-container" depends="prepare-IoC-container">
<echo>Compile IoC Container classes</echo>
<compile srcdir="src/hivemind" destdir="${build.dir}/classes/hivemind">
<compile srcdir="src/hivemind/java" destdir="${build.dir}/classes/hivemind/java">
<classpath>
<path refid="classpath"/>
<path refid="build.path"/>
@ -52,19 +55,34 @@
</classpath>
</compile>
</target>
<target name="compile-IoC-container-test" depends="compile-IoC-container">
<echo>Compile IoC Container test classes </echo>
<compile srcdir="src/hivemind/test" destdir="${build.dir}/classes/test">
<classpath>
<path refid="test.build.path"/>
<path refid="test.classpath"/>
<path refid="IoC.container.test.path"/>
</classpath>
</compile>
<copy todir="${build.dir}/classes/test">
<fileset dir="src/hivemind/test" excludes="**/*.java" />
</copy>
</target>
<target name="jar-IoC-container" depends="compile-IoC-container">
<echo>Jar IoC Container classes and metadata</echo>
<jar
destfile="${build.dir}/${final.name}${ioc.container.jar.prefix}"
basedir="${build.dir}/classes/hivemind">
destfile="${build.dir}/${final.name}${ioc.container.jar.suffix}"
basedir="${build.dir}/classes/hivemind/java">
<manifest>
<attribute name="Created-By" value="Apache Jakarta"/>
<section name="org/apache/lucene/">
<attribute name="Specification-Title" value="Lucene Search Engine"/>
<attribute name="Specification-Title" value="Lucene GData IoC Container"/>
<attribute name="Specification-Version" value="${version}"/>
<attribute name="Specification-Vendor" value="Lucene"/>
<attribute name="Implementation-Title" value="org.apache.lucene"/>
<attribute name="Specification-Vendor" value="Lucene GData Server"/>
<attribute name="Implementation-Title" value="org.apache.lucene.gdata"/>
<attribute name="Implementation-Version" value="build ${DSTAMP}"/>
<attribute name="Implementation-Vendor" value="Lucene"/>
</section>

View File

@ -50,8 +50,10 @@ public class GDataIndexWriter extends IndexWriter {
setMaxFieldLength(config.getMaxFieldLength());
if (config.getWriteLockTimeout() != IndexSchema.NOT_SET_VALUE)
setWriteLockTimeout(config.getWriteLockTimeout());
if (config.getCommitLockTimeout() != IndexSchema.NOT_SET_VALUE)
setCommitLockTimeout(config.getCommitLockTimeout());
//no commit lock anymore
//TODO fix this
// if (config.getCommitLockTimeout() != IndexSchema.NOT_SET_VALUE)
// setCommitLockTimeout(config.getCommitLockTimeout());
}
/**

Some files were not shown because too many files have changed in this diff Show More