build.xml 3.56 KB
Newer Older
1
2
3
4
5
6
7
8
<!--
 * Copyright (c) 2009 The Australian National University.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Apache License v2.0.
 * You may obtain the license at
 * 
 *    http://www.opensource.org/licenses/apache2.0.php
 -->
rgarner's avatar
rgarner committed
9
<project name="tomcat" default="all" basedir="../..">
john's avatar
john committed
10
11
    <description>DaCapo Tomcat benchmark</description>
    <property file="dacapo.properties"/>
12

john's avatar
john committed
13
    <property name="bm-name" value="tomcat"/>
14
15
16
    <property name="bm-major-version" value="9"/>
    <property name="bm-version" value="${bm-major-version}.0.2"/>
    <property name="bm-url" value="${apache.dl.url}/${bm-name}/${bm-name}-9/v${bm-version}/src"/>
john's avatar
john committed
17
18
    <property name="bm-src-basename" value="apache-${bm-name}-${bm-version}-src"/>
    <property name="bm-src" value="${bm-src-basename}.tar.gz"/>
19

john's avatar
john committed
20
21
22
    <target name="build-properties">
        <property name="bm-build-top" value="${bm-build-dir}/${bm-src-basename}"/>
    </target>
23

john's avatar
john committed
24
    <import file="../common.xml"/>
25

john's avatar
john committed
26
    <target name="unpack" depends="untar,patch"/>
27

john's avatar
john committed
28
    <target name="bm-build" depends="build-properties,commons-httpclient,dacapo-digest">
29
30
31
32
33
34
35
36
37
38
        <exec executable="${ant.home}/bin/ant" dir="${bm-build-top}" failonerror="yes">
            <env key="JAVA_HOME" value="${jdk16home}"/>
            <arg line="download"/>
            <arg line="-Dbase.path=${bm-downloads}"/>
        </exec>
        <exec executable="${ant.home}/bin/ant" dir="${bm-build-top}" failonerror="yes">
            <env key="JAVA_HOME" value="${jdk16home}"/>
            <arg line="deploy"/>
            <arg line="-Dbase.path=${bm-downloads}"/>
        </exec>
john's avatar
john committed
39
40
41
42
        <ant antfile="dist.xml" inheritall="false" dir="${bm-build-top}">
            <property name="base.path" value="${bm-downloads}"/>
            <target name="dist-static"/>
        </ant>
43
        <mkdir dir="${bm-build-dir}/benchmark"/>
44
45
46
47
        <javac srcdir="${bm-src-dir}" destdir="${bm-build-dir}/benchmark"
               source="1.8" target="1.8"
               includes="org/dacapo/tomcat/*"
               debug="true" debuglevel="lines,vars,source">
john's avatar
john committed
48
49
50
51
52
53
54
55
56
57
58
59
            <classpath>
                <pathelement path="${commons-httpclient-jar}"/>
                <pathelement path="${dacapo-digest-jar}"/>
                <fileset dir="${bm-build-top}/output/dist/lib">
                    <include name="**/*.jar"/>
                </fileset>
                <fileset dir="${bm-build-top}/output/dist/bin">
                    <include name="**/*.jar"/>
                </fileset>
            </classpath>
        </javac>
    </target>
60

john's avatar
john committed
61
    <target name="bm-data" depends="bm-build,build-properties">
62
63
64
        <copy todir="${bm-build-top}/output/dist/conf"
              file="${bm-files}/server.xml"
              overwrite="true">
john's avatar
john committed
65
66
67
68
69
70
71
72
            <fileset file="${bm-files}/server.xml"/>
            <fileset file="${bm-files}/tomcat-users.xml"/>
        </copy>
        <zip destfile="${bm-dat}/tomcat.zip">
            <fileset dir="${bm-build-top}/output/dist"/>
            <fileset file="${bm-files}/catalina.properties"/>
        </zip>
    </target>
73

john's avatar
john committed
74
75
76
77
78
79
80
    <target name="jar" depends="bm-data,build-properties">
        <copy todir="${bm-jars}">
            <fileset dir="${bm-build-top}/output/dist/bin" includes="*.jar"/>
            <fileset file="${commons-httpclient-jar}"/>
            <fileset file="${commons-logging-jar}"/>
            <fileset file="${commons-codec-jar}"/>
        </copy>
81

john's avatar
john committed
82
        <jar destfile="${bm-jars}/dacapo-tomcat.jar">
83
            <fileset dir="${bm-build-dir}/benchmark" includes="**/*.class"/>
john's avatar
john committed
84
85
        </jar>
    </target>
rgarner's avatar
rgarner committed
86

87
</project>