File: build.xml

package info (click to toggle)
icb-utils 2.0.1%2Bgit20161002.afee1d9-4
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 864 kB
  • sloc: java: 5,611; xml: 286; makefile: 5
file content (101 lines) | stat: -rw-r--r-- 4,587 bytes parent folder | download | duplicates (2)
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
<project name="icb-utils" default="test" basedir=".">
    <import file="buildsupport/build.xml"/>

    <property name="jarfile" value="icb-utils.jar"/>

    <!-- compiler and javadoc settings -->
    <property name="debug" value="on"/>
    <property name="optimize" value="on"/>
    <property name="deprecation" value="on"/>
    <property name="ant.build.javac.source" value="1.5"/>
    <property name="ant.build.javac.target" value="1.5"/>

    <!-- the label gets overridden by CruiseControl and/or during a release -->
    <property name="label" value="development"/>

    <path id="compile.classpath">
        <fileset dir="${lib}">
            <include name="*.jar"/>
        </fileset>
    </path>

    <path id="classpath">
        <pathelement location="${classes}"/>
        <pathelement location="${config}"/>
        <path refid="compile.classpath"/>
    </path>

    <import file="testsupport/build.xml"/>

    <!-- override fileset for checkstyle so it does not include classes not developed here -->
    <fileset dir="${src}" id="checkstyle-fileset">
        <include name="**/*.java"/>
        <exclude name="**/package-info.java"/>        
        <exclude name="org/apache/unicode/UnicodeCharUtil.java"/>
    </fileset>

    <!-- =================================================================== -->
    <!-- Initialization target                                               -->
    <!-- =================================================================== -->
    <target name="init" depends="buildsupport.init, testsupport.init"/>

    <target name="compile" depends="init" description="compiles the source code">
        <javac srcdir="${src}" destdir="${classes}" debug="${debug}"
               optimize="${optimize}" deprecation="${deprecation}">
            <classpath refid="compile.classpath"/>
        </javac>
    </target>

    <target name="jar" depends="compile" description="Create a jar file for clustering tools">
        <jar jarfile="${jarfile}">
            <manifest>
                <attribute name="Specification-Title" value="icb-utils"/>
                <attribute name="Specification-Vendor"
                           value="Institute for Computational Biomedicine (ICB), Weill Medical College of Cornell University"/>
                <attribute name="Implementation-Version" value="${label} (${buildstamp})"/>
                <attribute name="Implementation-Vendor"
                           value="Institute for Computational Biomedicine (ICB), Weill Medical College of Cornell University"/>
            </manifest>
            <fileset dir="${classes}"/>
        </jar>
    </target>

    <!-- =================================================================== -->
    <!-- Creates the API documentation                                       -->
    <!-- =================================================================== -->
    <target name="javadocs" depends="init" description="generates the API documentation">
        <mkdir dir="${javadocs}"/>
        <javadoc packagenames="edu.cornell.med.*"
                 sourcepath="${src}" destdir="${javadocs}" encoding="UTF-8"
                 author="true" version="true" windowtitle="icb-utils API ${label} (${buildstamp})"
                 header="icb-utils API ${label} (${buildstamp})">
            <link href="http://java.sun.com/j2se/1.5/docs/api/"/>
            <link href="http://fastutil.dsi.unimi.it/docs/"/>
            <classpath>
                <path refid="compile.classpath"/>
                <pathelement location="${classes}"/>
            </classpath>
            <bottom>
                <![CDATA[<i>Copyright &#169; 2005-${year} Institute for Computational Biomedicine, All Rights Reserved.</i>]]>
            </bottom>
        </javadoc>
    </target>

    <target name="clean" depends="buildsupport.clean, testsupport.clean" description="Cleans up the directory">
        <delete file="${jarfile}"/>
    </target>

    <target name="distclean" depends="clean">
        <delete includeemptydirs="true">
            <fileset dir="${basedir}">
                <include name="release*/**"/>
                <include name="tmp*/**"/>
                <exclude name="release.xml"/>
            </fileset>
        </delete>
    </target>

    <target name="cruisecontrol" depends="clean, cobertura-setup, findbugs,
                  test, jar, javadocs, pmd, cpd, checkstyle, cobertura-report"
            description="Run CruiseControl Build and Tests"/>
</project>