Changeset 30276 for gs2-extensions/tdb


Ignore:
Timestamp:
09/28/15 11:12:29 (5 years ago)
Author:
jmt12
Message:

Lots of work to get this working properly in GS3. Includes generating java classes, manifest, and jar for TDBJava and then placing it in a different folder (web/WEB-INF/lib) than gdbmjava.jar (lib/jni). Broke a bunch of larger targets into several steps - especially where one step is expensive

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gs2-extensions/tdb/trunk/build.xml

    r30259 r30276  
    44  <!-- Eventually install.lib needs to be OS aware -->
    55  <property name="gsdl3home" value="${env.GSDL3SRCHOME}" />
     6  <property name="classdir" value="${basedir}/build/classes"/>
    67  <property name="installdir" value="${basedir}/linux"/>
    78  <property name="install.lib" value="${basedir}/linux/lib"/>
    8   <property name="lib.jni" value="${gsdl3home}/lib/jni"/>
     9  <property name="jni.lib" value="${gsdl3home}/lib/jni"/>
     10  <property name="web.lib" value="${gsdl3home}/web/WEB-INF/lib"/>
    911
     12  <path id="gsdl3jars">
     13    <fileset dir="${web.lib}" includes="**/*.jar" />
     14  </path>
     15 
    1016  <target name="help">
    1117    <echo>Targets:</echo>
     
    1521    <echo>             drivers</echo>
    1622    <echo> install   - add TDB support to Greenstone2/Greenstone3</echo>
     23    <echo> install-tdbjava - install just the TBDJava support into Greenstone3</echo>
    1724    <echo> uninstall - remove TDB support from Greenstone2/Greenstone3</echo>
    1825    <echo> clean     - uninstall and remove compiled libraries, binaries,</echo>
     
    2734      <arg value="source setup.bash ; ./CASCADE-MAKE.sh"/>
    2835    </exec>
     36    <!-- Compile TDBJava within Ant -->
     37    <mkdir dir="${classdir}" />
     38    <javac srcdir="src/java" destdir="${classdir}" classpathref="gsdl3jars"
     39       includeantruntime="false" />
     40    <jar destfile="${install.lib}/TDBJava.jar" basedir="${classdir}">
     41      <manifest>
     42    <attribute name="Class-Path" value="gsdl3.jar log4j-1.2.8.jar" />
     43      </manifest>
     44    </jar>
    2945  </target>
    3046
     
    3753  </target>
    3854
    39   <target name="install" depends="compile">
     55  <target name="install-tdbjava">
     56    <echo>Install the TDBJava files into ${jni.lib}</echo>
     57    <copy file="${install.lib}/TDBJava.jar" todir="${web.lib}"/>
     58    <copy file="${install.lib}/libTDBJava.so" todir="${jni.lib}"/>
     59    <copy file="${install.lib}/libtdb.so" todir="${jni.lib}"/>
     60  </target>
     61
     62  <target name="install" depends="compile,install-tdbjava">
    4063    <echo>Enable TDB support in Greenstone2 build library</echo>
    4164    <exec executable="/bin/bash">
     
    4972      <target name="compile-common-src" />
    5073    </subant>
    51     <echo>Install the TDBJava files into Greenstone3/lib/jni</echo>
    52     <copy file="${install.lib}/TDBJava.jar" todir="${lib.jni}"/>
    53     <copy file="${install.lib}/libTDBJava.so" todir="${lib.jni}"/>
    54     <copy file="${install.lib}/libtdb.so" todir="${lib.jni}"/>
    5574  </target>
    5675
Note: See TracChangeset for help on using the changeset viewer.