<!-- | |
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="couchdb" default="compile"> | |
<property name="version" value="1.1.1" /> | |
<property name="adapter.jar" value="abdera.adapter.${ant.project.name}.${version}.jar" /> | |
<property name="retro.adapter.jar" value="abdera.adapter.${ant.project.name}.${version}.retro.jar" /> | |
<property name="debug" value="on" /> | |
<property name="abdera" value="../../dist" /> | |
<path id="abdera"> | |
<fileset dir="${abdera}" includes="**/*.jar" excludes="**/*retro.jar"/> | |
</path> | |
<path id="retro"> | |
<fileset dir="../../build/tools/retroweaver-2.0" includes="**/*.jar" /> | |
</path> | |
<target name="dependencies"> | |
<mkdir dir="${basedir}/lib" /> | |
<parallel> | |
<get src="http://internap.dl.sourceforge.net/sourceforge/json-lib/json-lib-2.2.1-jdk15.jar" dest="${basedir}/lib/json-lib-2.2.1-jdk15.jar" usetimestamp="true" /> | |
<get src="http://internap.dl.sourceforge.net/sourceforge/ezmorph/ezmorph-1.0.4.jar" dest="${basedir}/lib/ezmorph-1.0.4.jar" usetimestamp="true" /> | |
<get src="http://people.apache.org/repo/m1-ibiblio-rsync-repository/commons-beanutils/jars/commons-beanutils-1.7.0.jar" dest="${basedir}/lib/commons-beanutils-1.7.0.jar" usetimestamp="true" /> | |
<get src="http://people.apache.org/repo/m1-ibiblio-rsync-repository/commons-beanutils/jars/commons-beanutils-bean-collections-1.7.0.jar" dest="${basedir}/lib/commons-beanutils-bean-collections-1.7.0.jar" usetimestamp="true" /> | |
<get src="http://people.apache.org/repo/m1-ibiblio-rsync-repository/commons-collections/jars/commons-collections-3.2.jar" dest="${basedir}/lib/commons-collections-3.2.jar" usetimestamp="true" /> | |
<get src="http://people.apache.org/repo/m1-ibiblio-rsync-repository/commons-lang/jars/commons-lang-2.3.jar" dest="${basedir}/lib/commons-lang-2.3.jar" usetimestamp="true" /> | |
<get src="http://couchdb4j.googlecode.com/files/couchdb4j-0.1.2.jar" dest="${basedir}/lib/couchdb4j-0.1.2.jar" usetimestamp="true" /> | |
</parallel> | |
<path id="dependencies"> | |
<fileset dir="${basedir}/lib" includes="**/*.jar" /> | |
<path refid="abdera" /> | |
</path> | |
</target> | |
<target name="compile" depends="dependencies"> | |
<mkdir dir="${basedir}/build" /> | |
<javac srcdir="src/main/java" classpathref="dependencies" destdir="${basedir}/build" debug="${debug}" /> | |
<javac srcdir="src/test/java" classpathref="dependencies" destdir="${basedir}/build" debug="${debug}" /> | |
<copy todir="${basedir}/build"> | |
<fileset dir="src/test/resources" includes="**/*" /> | |
</copy> | |
<jar destfile="${basedir}/${adapter.jar}" basedir="${basedir}/build" includes="org/apache/abdera/protocol/server/adapters/**/*" /> | |
<java classpathref="retro" classname="net.sourceforge.retroweaver.Weaver" fork="yes"> | |
<arg line="-jar "${basedir}/${adapter.jar}" "${basedir}/${retro.adapter.jar}"" /> | |
</java> | |
</target> | |
<target name="test"> | |
<!-- requires that couch db is running --> | |
<java classname="org.apache.abdera.protocol.server.test.couchdb.TestSuite" | |
classpath="${basedir}/build" | |
classpathref="dependencies" | |
fork="true" /> | |
</target> | |
<target name="clean"> | |
<delete dir="${basedir}/build" /> | |
<delete file="${basedir}/${adapter.jar}" /> | |
<delete file="${basedir}/${retro.adapter.jar}" /> | |
</target> | |
<target name="dist" depends="clean,compile"> | |
<copy todir="../../dist/adapters" file="${basedir}/${adapter.jar}" /> | |
<copy todir="../../dist/adapters" file="${basedir}/${retro.adapter.jar}" /> | |
</target> | |
</project> |