File: build.xml

package info (click to toggle)
jebl2 0.1+20140614-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 1,780 kB
  • ctags: 3,723
  • sloc: java: 21,236; xml: 89; sh: 16; makefile: 10
file content (102 lines) | stat: -rw-r--r-- 3,560 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
<!--              ANT build file for JAM              -->

<project name="JEBL" default="dist" basedir=".">
    <description>
        Build file for JEBL
    </description>
    <!-- set global properties for this build -->
    <property name="src" location="src"/>
    <property name="build" location="build"/>

    <property name="lib" location="lib"/>
    <property name="dist" location="dist"/>

    <property environment="env"/>

    <target name="init">
        <!-- Create the time stamp -->
        <tstamp/>
        <!-- Create the build directory structure used by compile -->
        <mkdir dir="${build}"/>
        <mkdir dir="${dist}"/>
    </target>

    <target name="clean">
        <mkdir dir="${build}"/>
        <delete includeEmptyDirs="true">
            <fileset dir="${build}" includes="**/*"/>
        </delete>

    </target>

    <target name="compile-jebl" depends="init">
        <!-- Compile the java code from ${src} into ${build} -->
        <javac source="1.5" srcdir="${src}" destdir="${build}" debug="true" target="1.5">
            <include name="jebl/**/*"/>
        </javac>
        <copy todir="${build}">
            <fileset dir="${src}" includes="jebl/**/*.png"/>
        </copy>
    </target>

    <target name="dist-jebl" depends="compile-jebl" description="generate the JEBL distribution">
        <!-- Create the distribution directory -->
        <mkdir dir="${dist}"/>

        <!-- Put everything in ${build} into the jebl-${DSTAMP}.jar file -->
        <jar jarfile="${dist}/jebl.jar">
            <fileset dir="${build}" includes="jebl/**/*.class,jebl/**/*.properties,jebl/**/*.png"/>
            <zipgroupfileset dir="${lib}" includes="**/*.jar"/>
        </jar>
    </target>

    <target name="dist" depends="dist-jebl" description="generate the distribution">
        <!-- Create the distribution directory -->
        <mkdir dir="${dist}"/>

        <!-- Put everything in ${build} into the jebl-${DSTAMP}.jar file -->
        <jar jarfile="${dist}/jebl.jar">
            <fileset dir="${build}" includes="**/*.class,**/*.properties,**/*.png"/>
            <zipgroupfileset dir="${lib}" includes="**/*.jar"/>
        </jar>
    </target>

    <target name="dist-clean" depends="clean,compile-jebl" description="generate the distribution">
        <!-- For some reason I don't fully understand, running the standard distribute
         script doesn't always work if you have done a previous build on a previous version
         of the source code. For some reason, it just doesn't compile some files. This
         script seems to work better.-->
        <mkdir dir="${dist}"/>

        <!-- Put everything in ${build} into the jebl-${DSTAMP}.jar file -->
        <jar jarfile="${dist}/jebl.jar">
            <fileset dir="${build}" includes="**/*.class,**/*.properties,**/*.png"/>
            <zipgroupfileset dir="${lib}" includes="**/*.jar"/>
        </jar>
    </target>


   <property name="api" location="doc/api"/>

   <target name="document" depends="clean-api,prepare-api">
      <javadoc destdir="${api}"
               version="false"
               use="true"
               author="true"
               windowtitle="Java Evolutionary Biology Library"
               doctitle="Java Evolutionary Biology Library">
         <fileset dir="src"/>
         <link href="http://java.sun.com/j2se/1.5.0/docs/api"/>
      </javadoc>
   </target>


   <target name="prepare-api">
      <mkdir dir="${api}"/>
   </target>


   <target name="clean-api">
      <delete dir="${api}"/>
   </target>
</project>