Ignore:
Timestamp:
12/13/18 21:06:12 (2 years ago)
Author:
ak19
Message:

Another jar file for assertj swing

Location:
gs3-extensions/testing/trunk/src
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • gs3-extensions/testing/trunk/src/build.xml

    r26113 r32680  
    11<?xml version="1.0"?>
    22<project name="Greenstone3 Testing Extension" default="build-util-jar" basedir=".">
    3     <target name="build-util-jar">
    4         <mkdir dir="${basedir}/build"/>
    5         <javac srcdir="${basedir}/src" destdir="${basedir}/build">
    6             <classpath>
    7                 <fileset dir="${basedir}/lib/java">
    8                     <include name="*.jar"/>
    9                 </fileset>
    10             </classpath>
    11             <include name="org/greenstone/gsdl3/testing/*.java"/>
    12         </javac>
    13         <jar destfile="${basedir}/lib/java/GSTestingUtil.jar">
    14             <fileset dir="${basedir}/build">
    15                 <include name="org/greenstone/gsdl3/testing/**"/>
    16             </fileset>
    17             <manifest>
    18                 <attribute name="Built-By" value="Greenstone" />
    19             </manifest>
    20         </jar>
    21     </target>
     3  <!-- get properties from the environment -->
     4  <property environment="env"/>
     5  <property name="compile.includeantruntime" value="false"/> <!-- to get rid of annoying 'ant' warning -->
     6
     7  <property name="gli.home" value="${env.GSDL3SRCHOME}/gli"/>
     8 
     9  <target name="build-util-jar">
     10    <mkdir dir="${basedir}/build"/>
     11    <javac srcdir="${basedir}/src" destdir="${basedir}/build">
     12      <classpath>
     13    <fileset dir="${basedir}/lib/java">
     14      <include name="*.jar"/>
     15    </fileset>
     16      </classpath>
     17      <include name="org/greenstone/gsdl3/testing/*.java"/>         
     18    </javac>
     19    <jar destfile="${basedir}/lib/java/GSTestingUtil.jar">
     20      <fileset dir="${basedir}/build">
     21    <include name="org/greenstone/gsdl3/testing/**"/>             
     22      </fileset>
     23      <manifest>
     24    <attribute name="Built-By" value="Greenstone" />
     25      </manifest>
     26    </jar>
     27  </target>
     28 
     29<!-- +++++++++++++ TUTORIAL TESTING TARGETS ++++++++++++++ -->
     30<target name="needs-make-gli-jar"> 
     31  <condition property="gli-jar-missing">
     32    <not>
     33      <available file="${gli.home}/GLI.jar"/>
     34    </not>
     35    </condition>
     36   
     37    <fail if="gli-jar-missing" message="Run the makegli followed by makejar scripts in the gli folder before starting the Greenstone server."/>
     38</target>
     39
     40<target name="needs-gs3-setup">
     41    <!-- has the gs3-setup script been run?? -->
     42    <condition property="gs3-setup-not-done">
     43      <not>
     44    <isset property="env.GSDL3HOME"/>
     45      </not>
     46    </condition>
     47
     48    <fail if="gs3-setup-not-done" message="Please run 'gs3-setup' (Windows) or 'source gs3-setup.sh' (Linux/Mac) before starting the Greenstone server."/>
     49
     50    <echo>GLI HOME: ${gli.home}</echo>
     51  </target>
     52
     53<target name="compile-tutorials-tests" depends="needs-gs3-setup, needs-make-gli-jar">
     54
     55  <mkdir dir="${basedir}/build"/>
     56  <javac
     57      srcdir="${basedir}/src"
     58      destdir="${basedir}/build"
     59      includeantruntime="${compile.includeantruntime}">
     60    <classpath>
     61      <fileset dir="${basedir}/lib/java">
     62    <include name="*.jar"/>
     63      </fileset>
     64      <fileset dir="${gli.home}">
     65    <include name="GLI.jar"/>
     66      </fileset>
     67    </classpath>           
     68    <include name="gstests/tutorials/*.java"/>
     69  </javac>
     70  <jar destfile="${basedir}/tutorial-tests.jar">
     71    <fileset dir="${basedir}/build">
     72      <include name="gstests/tutorials/**"/>
     73    </fileset>
     74    <manifest>
     75      <attribute name="Built-By" value="greenstone" />
     76    </manifest>
     77  </jar>
     78</target>
     79
     80<!-- https://stackoverflow.com/questions/10704324/how-to-add-to-classpath-all-classes-from-set-of-directories-in-ant -->
     81<path id="tutorials.path"> 
     82  <fileset dir="${basedir}/lib/java">
     83    <include name="*.jar"/>
     84  </fileset>
     85  <!--<fileset dir="${basedir}/build">     
     86    <include name="gstests/tutorials/**/*.class"/>
     87  </fileset>-->
     88  <files includes="${basedir}/tutorial-tests.jar"/>
     89
     90  <!-- To run GLI, need GLI.jar and its help jars and folder: classes folder, apache.jar, jna.jar, jna-platform.jar, qfslib.jar, rsyntaxtextarea.jar -->
     91  <fileset dir="${gli.home}">
     92    <include name="GLI.jar"/>
     93  </fileset>
     94  <pathelement path="${gli.home}/classes"/>
     95  <fileset dir="${gli.home}/lib">
     96    <include name="*.jar"/>
     97  </fileset> 
     98</path>
     99
     100<!-- TODO: for darwin, need to set custom_vm_args, see gli.sh
     101TODO: Launching GLI for GS2 is also different -->
     102
     103<!-- http://ant.1045680.n5.nabble.com/How-to-increase-memory-used-by-JVM-in-Ant-td1355370.html -->
     104<target name="run-tutorials-tests" depends="needs-gs3-setup, needs-make-gli-jar">
     105  <echo>Tutorial tests</echo>
     106  <echo>GSDLHOME: ${env.GSDLHOME}</echo> 
     107  <java classname="org.junit.runner.JUnitCore" dir="${gli.home}" fork="true" maxmemory="256m" classpathref="tutorials.path">
     108    <arg value="gstests.tutorials.RunGLITest"/>
     109   
     110  </java>
     111 
     112 
     113</target>
     114
    22115</project>
     116
Note: See TracChangeset for help on using the changeset viewer.