created internal "subproject" structure to reuse the common-build.xml ant tasks

git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@486798 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Simon Willnauer 2006-12-13 19:04:23 +00:00
parent 5aabf7a0b9
commit 4374e2e88a
326 changed files with 192 additions and 266 deletions

View File

@ -17,40 +17,51 @@
-->
<project name="gdata-server" default="default">
<project name="gdata-server" default="compile-core">
<description>
Serverside Google Data API implementation
</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" />
<property name="gdata.lib.dir" value="lib" />
<property name="gdata.external.lib.dir" value="./ext-libs" />
<property name="db4o.jar" value="db4o-5.2-java5.jar" />
<property name="db4o.jar" value="db4o-5.5-java5.jar" />
<!-- properties for war task -->
<property name="ioc.descriptors.dir" value="./src/hivemind/descriptor" />
<property name="ioc.descriptors.excludes" value="" />
<property name="ioc.descriptors.includes" value="**/*.xml" />
<property name="gdata.war.name" value="gdata-server" />
<property name="jar.name.core" value="lucene-core-${version}" />
<property name="jar.name.gom" value="lucene-gom-${version}" />
<property name="jar.name.hivemind" value="lucene-hivemind-${version}" />
<fileset id="hivemind.jars" dir="${gdata.external.lib.dir}">
<include name="hivemind-1.1.jar" />
<include name="hivemind-jmx-1.1.jar" />
<include name="hivemind-lib-1.1.jar" />
<include name="javassist-3.0.jar" />
<include name="oro-2.0.6.jar" />
<include name="hessian-3.0.20.jar" />
</fileset>
<fileset id="gom.jars" dir="${gdata.external.lib.dir}">
<include name="stax-1.1.2-dev.jar" />
<include name="stax-api-1.0.1.jar" />
</fileset>
<!-- set property for third party jars -->
<available property="db4o.jar.present" type="file" file="${gdata.lib.dir}/${db4o.jar}" value="test" />
<available property="db4o.jar.present" type="file" file="${gdata.external.lib.dir}/${db4o.jar}" value="test" />
<condition property="junit.excludes" value="**/db4o/**/*.java">
<not>
<isset property="db4o.jar.present" />
</not>
</condition>
<path id="additional.dependencies">
<fileset dir="${gdata.lib.dir}">
<include name="servlet-api.jar" />
<include name="commons-logging-1.1.jar" />
<include name="gdata-client-1.0.jar" />
<include name="commons-digester-1.7.jar" />
<include name="commons-beanutils.jar" />
<include name="commons-collections-3.2.jar" />
<include name="nekohtml.jar" />
<include name="xercesImpl.jar" />
<include name="${db4o.jar}" if="db4o.jar.present" />
</fileset>
</path>
<condition property="do.download">
<not>
<and>
@ -65,74 +76,40 @@
</and>
</not>
</condition>
<target name="jar-core" description="Packages the JAR file">
<ant dir="src/core" target="jar-core" inheritRefs="true" />
<ant dir="src/hivemind" target="jar-core" inheritRefs="true" />
<ant dir="src/gom" target="jar-core" inheritRefs="true" />
</target>
<!-- redefine compile-core and compile-test to exclude 3rd party dependend sources -->
<target name="compile-core" depends="init, download">
<echo>Use gdata - compile-core task </echo>
<compile srcdir="src/core/java" destdir="${build.dir}/classes/java">
<classpath>
<path refid="classpath"/>
<path refid="build.path"/>
</classpath>
<exclude name="org/apache/lucene/gdata/storage/db4o/**" unless="db4o.jar.present" />
</compile>
<antcall target="compile-IoC-container"/>
<antcall target="compile-gom"/>
<target name="test">
<ant dir="src/core" target="test" inheritRefs="true" />
<ant dir="src/gom" target="test" inheritRefs="true" />
<ant dir="src/hivemind" target="test" inheritRefs="true" />
</target>
<target name="compile-core" depends="download">
<ant dir="src/core" target="compile-core" inheritRefs="true" />
<ant dir="src/hivemind" target="compile-core" inheritRefs="true" />
<ant dir="src/gom" target="compile-core" inheritRefs="true" />
</target>
<target name="compile-test" depends="compile-core, download">
<echo>Use gdata - compile-test task </echo>
<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/core/test">
<fileset dir="src/test" excludes="**/*.java" />
</copy>
<antcall target="compile-IoC-container-test"/>
<antcall target="compile-gom-test"/>
<ant dir="src/core" target="compile-test" inheritRefs="true" />
<ant dir="src/hivemind" target="compile-test" inheritRefs="true" />
<ant dir="src/gom" target="compile-test" inheritRefs="true" />
</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,jar-gom">
<echo>Prepare dist directory</echo>
<delete dir="${dist.dir}" />
<mkdir dir="${dist.dir}" />
<target name="clean">
<ant dir="src/core" target="clean" inheritRefs="true" />
<ant dir="src/hivemind" target="clean" inheritRefs="true" />
<ant dir="src/gom" target="clean" inheritRefs="true" />
</target>
<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" />
<fileset dir="webroot" defaultexcludes="true">
<exclude name="meta-inf/context.xml" />
<exclude name="meta-inf/" />
<exclude name="WEB-INF/web.xml" />
</fileset>
<fileset dir="${ioc.descriptors.dir}" excludes="${ioc.descriptors.excludes}" includes="${ioc.descriptors.includes}"/>
<lib dir="${gdata.lib.dir}">
<include name="commons-logging-1.1.jar" />
<include name="gdata-client-1.0.jar" />
<include name="commons-digester-1.7.jar" />
<include name="commons-beanutils.jar" />
<include name="commons-collections-3.2.jar" />
<include name="nekohtml.jar" />
<include name="xercesImpl.jar" />
<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.suffix}" />
<lib dir="${build.dir}" includes="${final.name}${gom.jar.suffix}" />
<lib file="${lucene.jar}" />
</war>
<target name="war-gdata" depends="clean,jar-core">
<ant dir="src/core" target="war-gdata" inheritRefs="true" />
</target>
</project>

View File

@ -1,86 +0,0 @@
<?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.external.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

@ -1,97 +0,0 @@
<?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-hivemind" >
<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"/>
<description>
Compiles and Jars the hivemind dependencies for gdata-server
</description>
<target name="prepare-IoC-container">
<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="IoC.container.build.path">
<fileset dir="${build.dir}">
<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" />
<include name="hivemind-lib-1.1.jar" />
<include name="javassist-3.0.jar"/>
<include name="oro-2.0.6.jar"/>
<include name="hessian-3.0.20.jar"/>
</fileset>
</target>
<!-- 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/java" destdir="${build.dir}/classes/hivemind/java">
<classpath>
<path refid="classpath"/>
<path refid="build.path"/>
<path refid="IoC.container.build.path"/>
</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.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 GData IoC Container"/>
<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

@ -0,0 +1,78 @@
<?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-core" default="default">
<description>
Lucene gdata server core build file
</description>
<path id="additional.dependencies">
<fileset dir="../../${gdata.lib.dir}">
<include name="servlet-api.jar" />
<include name="commons-logging-1.1.jar" />
<include name="gdata-client-1.0.jar" />
<include name="commons-digester-1.7.jar" />
<include name="commons-beanutils.jar" />
<include name="commons-collections-3.2.jar" />
<include name="nekohtml.jar" />
<include name="xercesImpl.jar" />
</fileset>
<fileset dir="../../${gdata.external.lib.dir}">
<include name="easymock-1.2_Java1.5.jar" />
<include name="${db4o.jar}" if="db4o.jar.present" />
</fileset>
</path>
<property name="build.dir" location="../../../build/contrib/gdata-server/core" />
<property name="dist.dir" location="../../../dist/contrib/gdata-server/core" />
<pathconvert property="project.classpath" targetos="unix" refid="additional.dependencies" />
<import file="../../../contrib-build.xml" />
<target name="war-gdata" depends="jar-core">
<echo>Distributing GData War </echo>
<war destfile="${build.dir}/${gdata.war.name}.war" webxml="../../webroot/WEB-INF/web.xml">
<metainf dir="../../webroot/meta-inf" />
<fileset dir="../../webroot" defaultexcludes="true">
<exclude name="meta-inf/context.xml" />
<exclude name="meta-inf/" />
<exclude name="WEB-INF/web.xml" />
</fileset>
<fileset dir="../../${ioc.descriptors.dir}" excludes="${ioc.descriptors.excludes}" includes="${ioc.descriptors.includes}" />
<lib dir="../../${gdata.lib.dir}">
<include name="commons-logging-1.1.jar" />
<include name="gdata-client-1.0.jar" />
<include name="commons-digester-1.7.jar" />
<include name="commons-beanutils.jar" />
<include name="commons-collections-3.2.jar" />
<include name="nekohtml.jar" />
<include name="xercesImpl.jar" />
<include name="${db4o.jar}" if="db4o.jar.present" />
</lib>
<lib refid="hivemind.jars" />
<lib refid="gom.jars" />
<lib dir="${build.dir}" includes="${jar.name.core}.jar" />
<lib dir="${build.dir}/../gom" includes="${jar.name.gom}.jar" />
<lib dir="${build.dir}/../hivemind" includes="${jar.name.hivemind}.jar" />
<lib file="${lucene.jar}" />
</war>
</target>
</project>

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