|
| 1 | +<?xml version="1.0" encoding="UTF-8" standalone="no"?> |
| 2 | +<project default="jar" name="Create Runnable Jar for Project TFPredict"> |
| 3 | + <target name="help"> |
| 4 | + <echo> |
| 5 | + This is an ANT build script to build a stand-alone JAR for |
| 6 | + TFpredict. |
| 7 | + |
| 8 | + To make this script work, you only need to set the paths in |
| 9 | + the init method. |
| 10 | + </echo> |
| 11 | + </target> |
| 12 | + |
| 13 | + <!-- define some properties that are used throughout the tasks --> |
| 14 | + <target name="init"> |
| 15 | + <property name="base" location=".." /> |
| 16 | + |
| 17 | + <!-- the main class --> |
| 18 | + <property name="main" value="main.TFpredictMain" /> |
| 19 | + |
| 20 | + <!-- the path to the sources --> |
| 21 | + <property name="src" location="${base}/src" /> |
| 22 | + |
| 23 | + <!-- the path to the binaries --> |
| 24 | + <property name="classes" location="build/classes" /> |
| 25 | + |
| 26 | + <!-- the application jar file --> |
| 27 | + <property name="appJar" value="TFpredict.jar" /> |
| 28 | + </target> |
| 29 | + |
| 30 | + <target name="clean" depends="init"> |
| 31 | + <delete dir="build" /> |
| 32 | + <delete file="${appJar}" /> |
| 33 | + </target> |
| 34 | + |
| 35 | + <target name="compile" depends="clean"> |
| 36 | + <mkdir dir="${classes}"/> |
| 37 | + <path id="class.path"> |
| 38 | + <fileset dir="${base}/lib"> |
| 39 | + <include name="**/*.jar" /> |
| 40 | + </fileset> |
| 41 | + </path> |
| 42 | + <javac debug="on" srcdir="${src}" destdir="${classes}"> |
| 43 | + <classpath refid="class.path" /> |
| 44 | + </javac> |
| 45 | + </target> |
| 46 | + |
| 47 | + <!-- puts the application specific classes into application.jar. --> |
| 48 | + <target name="jar" depends="compile"> |
| 49 | + <jar jarfile="${appJar}"> |
| 50 | + <manifest> |
| 51 | + <attribute name="Main-Class" value="${main}" /> |
| 52 | + <attribute name="Built-By" value="Center for Bioinformatics Tuebingen (ZBIT)" /> |
| 53 | + </manifest> |
| 54 | + <!-- INCLUDE/ EXCLUDE DEMO--> |
| 55 | + <!--<fileset dir="${src}">--> |
| 56 | + <!-- <include name="demo/view/**/*.properties"/>--> |
| 57 | + <!-- <exclude name="demo/view/**/resource/**"/>--> |
| 58 | + <!--</fileset>--> |
| 59 | + <fileset dir="${classes}"> |
| 60 | + </fileset> |
| 61 | + |
| 62 | + <zipfileset dir="${src}/resources" excludes="**/*.java" prefix="resources/"/> |
| 63 | + <fileset file="${base}/readme.txt" /> |
| 64 | + <fileset file="${base}/license.txt" /> |
| 65 | + <zipgroupfileset dir="${base}/lib" includes="**/*.jar"/> |
| 66 | + </jar> |
| 67 | + </target> |
| 68 | + |
| 69 | +</project> |
0 commit comments