| ### Eclipse Workspace Patch 1.0
|
| #P writeable-trunk
|
| Index: contrib/db/bdb/build.xml
|
| ===================================================================
|
| --- contrib/db/bdb/build.xml (revision 806993)
|
| +++ contrib/db/bdb/build.xml (working copy)
|
| @@ -32,11 +32,23 @@
|
| |
| <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" /> |
| + <get src="http://downloads.osafoundation.org/db/db-${db.version}.jar" |
| + dest="lib/db-${db.version}.jar" ignoreerrors="true"/> |
| </target> |
| |
| - <target name="sanity-load-lib" depends="compile-test"> |
| + <target name="compile-core" depends="check-and-get-db-jar, warn-no-lib" if="db-jar-check-success"> |
| + <antcall target="common.compile-core"/> |
| + </target> |
| + |
| + <target name="jar-core" depends="check-and-get-db-jar, warn-no-lib" if="db-jar-check-success"> |
| + <antcall target="common.jar-core"/> |
| + </target> |
| + |
| + <target name="compile-test" depends="check-and-get-db-jar, warn-no-lib" if="db-jar-check-success"> |
| + <antcall target="contrib-build.compile-test"/> |
| + </target> |
| + |
| + <target name="sanity-load-lib" depends="compile-test" > |
| <java classname="org.apache.lucene.store.db.SanityLoadLibrary" |
| classpathref="junit.classpath" |
| fork="true" |
| @@ -44,7 +56,7 @@
|
| logError="false" |
| outputproperty="sanity-load-lib-error" |
| /> |
| - <condition property="no-bdb-lib" value="true"> |
| + <condition property="sanity-check-failed" value="true"> |
| <and> |
| <isset property="sanity-load-lib-error"/> |
| <not> |
| @@ -54,15 +66,32 @@
|
| </condition> |
| </target> |
| |
| - <target name="warn-no-lib" if="no-bdb-lib"> |
| + <target name="warn-sanity-failed" if="sanity-check-failed"> |
| <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"> |
| + |
| + <target name="warn-no-lib" unless="db-jar-check-success"> |
| + <echo>Build Skipped: Could not download db-${db.version}.jar</echo> |
| + </target> |
| + |
| + <target name="test" depends="sanity-load-lib, warn-sanity-failed" |
| + unless="sanity-check-failed"> |
| <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" /> |
| - |
| + |
| + <!-- Note: this has been introduced as the download from downloads.osafoundation.org |
| + fails frequently as the host is not available. To prevent general build failure |
| + this check prevents the bdb module from being build or test to be run --> |
| + <target name="check-and-get-db-jar" depends="get-db-jar" > |
| + <condition property="db-jar-check-success"> |
| + <or> |
| + <available classname="com.sleepycat.db.internal.Db"> |
| + <classpath refid="db.jar" /> |
| + </available> |
| + <isset property="db.jar.exists"/> |
| + </or> |
| + </condition> |
| + </target> |
| + |
| + <target name="init" depends="contrib-build.init, check-and-get-db-jar" /> |
| </project> |