build.xml 2.25 KB
Newer Older
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
<!--
 * Copyright (c) 2018 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
 -->

<project name="zxing" default="all" basedir="../..">
    <description>Dacapo zxing benchmark</description>
    <property file="dacapo.properties"/>

    <property name="bm-name" value="zxing"/>
    <property name="bm-version" value="3.3.3"/>
    <property name="bm-src" value="${bm-name}-${bm-name}-${bm-version}.tar.gz"/>
    <property name="bm-git-url" value="${github.url}/${bm-name}/${bm-name}"/>
    <property name="bm-git-commit" value="463d1ea7ed44f2fd6f46e234af1dba9616512e66"/>

    <import file="../common.xml"/>

    <property name="mvn-home" location="${toolsdir}/apache-maven-${mvn.version}/bin"/>
    <property name="mvn-exe" value="${mvn-home}/mvn"/>
    <condition property="mvn-exe" value="${mvn-home}/mvn.bat">
        <os family="windows"/>
    </condition>

    <target name="unpack" depends="untar"/>
29 30 31

    <target name="bm-build" depends="unpack">
        <exec executable="${mvn-exe}" dir="${bm-files}/build">
32
            <arg value="clean"/>
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
            <arg value="install"/>
        </exec>

        <exec executable="${mvn-exe}" dir="${bm-files}/build/javase">
            <arg value="-DskipTests"/>
            <arg value="package"/>
            <arg value="assembly:single"/>
        </exec>
    </target>

    <target name="jar">
        <copy file="${bm-build-dir}/javase/target/javase-${bm-version}-jar-with-dependencies.jar"
              todir="${bm-jars}"/>
    </target>

    <target name="data">
        <property name="resources-base" value="${bm-build-dir}/core/src/test"/>
        <property name="resources" value="${resources-base}/resources"/>
51
        <property name="data" value="${resources-base}/dat"/>
52

53
        <mkdir dir="${data}"/>
54
        <copy todir="${data}">
55 56 57
            <fileset dir="${resources}" includes="**/*.png **/*.jpg"/>
        </copy>

58
        <!--totally 1225 barcode, all from zxing-->
59
        <zip basedir="${resources-base}" includes="dat/**" destfile="${bm-dat}/${bm-name}.zip"/>
60

61
        <delete dir="${data}"/>
62 63
    </target>

64
</project>