mirror of https://github.com/apache/lucene.git
85 lines
2.9 KiB
XML
85 lines
2.9 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.
|
|
-->
|
|
<project name="bdb" default="default">
|
|
|
|
<description>
|
|
Lucene Berkeley DB integration
|
|
</description>
|
|
|
|
<property name="db.version" value="4.7.25" />
|
|
|
|
<path id="db.jar">
|
|
<pathelement location="lib/db-${db.version}.jar" />
|
|
</path>
|
|
|
|
<available classname="com.sleepycat.db.internal.Db" property="db.jar.exists">
|
|
<classpath refid="db.jar" />
|
|
</available>
|
|
|
|
<pathconvert property="project.classpath" targetos="unix" refid="db.jar" />
|
|
|
|
<property name="build.dir" location="../../../build/contrib/db/bdb" />
|
|
<property name="dist.dir" location="../../../dist/contrib/db/bdb" />
|
|
<property name="maven.dist.dir" location="../../../dist/maven" />
|
|
|
|
<import file="../../contrib-build.xml" />
|
|
|
|
<path id="test.classpath">
|
|
<path refid="classpath"/>
|
|
<pathelement location="../../../build/classes/test/"/>
|
|
<path refid="junit-path"/>
|
|
<pathelement location="${build.dir}/classes/java"/>
|
|
</path>
|
|
|
|
<target name="get-db-jar" unless="db.jar.exists">
|
|
<mkdir dir="lib" />
|
|
<get src="http://downloads.osafoundation.org/db/db-${db.version}.jar"
|
|
dest="lib/db-${db.version}.jar" />
|
|
</target>
|
|
|
|
<target name="sanity-load-lib" depends="compile-test">
|
|
<java classname="org.apache.lucene.store.db.SanityLoadLibrary"
|
|
classpathref="junit.classpath"
|
|
fork="true"
|
|
failonerror="false"
|
|
logError="false"
|
|
outputproperty="sanity-load-lib-error"
|
|
/>
|
|
<condition property="no-bdb-lib" value="true">
|
|
<and>
|
|
<isset property="sanity-load-lib-error"/>
|
|
<not>
|
|
<equals arg1="${sanity-load-lib-error}" arg2="" trim="true" />
|
|
</not>
|
|
</and>
|
|
</condition>
|
|
</target>
|
|
|
|
<target name="warn-no-lib" if="no-bdb-lib">
|
|
<echo>Unit Tests Skipped: Could not sanity check Native Library</echo>
|
|
</target>
|
|
<target name="test" depends="sanity-load-lib,warn-no-lib"
|
|
unless="no-bdb-lib">
|
|
<antcall target="common.test" inheritAll="true" inheritRefs="true" />
|
|
</target>
|
|
|
|
<target name="check-and-get-db-jar" depends="get-db-jar" />
|
|
<target name="init" depends="contrib-build.init,check-and-get-db-jar" />
|
|
|
|
</project>
|