Changeset 13209 in josm


Ignore:
Timestamp:
2017-12-17T15:14:29+01:00 (4 months ago)
Author:
Don-vip
Message:

build file cleanup

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/build.xml

    r13202 r13209  
    2121        <property name="build.dir" location="${base.dir}/build"/>
    2222        <property name="dist.dir" location="${base.dir}/dist"/>
    23         <property name="javacc.home" location="${base.dir}/tools"/>
     23        <property name="tools.dir" location="${base.dir}/tools"/>
     24        <property name="pmd.dir" location="${tools.dir}/pmd"/>
     25        <property name="checkstyle.dir" location="${tools.dir}/checkstyle"/>
     26        <property name="spotbugs.dir" location="${tools.dir}/spotbugs"/>
     27        <property name="javacc.home" location="${tools.dir}"/>
    2428        <property name="mapcss.dir" location="${src.dir}/org/openstreetmap/josm/gui/mappaint/mapcss"/>
    2529        <property name="proj-build.dir" location="${base.dir}/build2"/>
    2630        <property name="checkstyle-build.dir" location="${base.dir}/build2"/>
    2731        <property name="epsg.output" location="${base.dir}/data/projection/custom-epsg"/>
    28         <property name="groovy.jar" location="${base.dir}/tools/groovy-all.jar"/>
    29         <property name="error_prone_ant.jar" location="${base.dir}/tools/error_prone_ant.jar"/>
     32        <property name="groovy.jar" location="${tools.dir}/groovy-all.jar"/>
     33        <property name="error_prone_ant.jar" location="${tools.dir}/error_prone_ant.jar"/>
    3034        <property name="dist.jar" location="${dist.dir}/josm-custom.jar"/>
    3135        <property name="dist-optimized.jar" location="${dist.dir}/josm-custom-optimized.jar"/>
     
    5155            <pathelement path="${dist.jar}"/>
    5256            <pathelement path="${groovy.jar}"/>
    53             <pathelement path="tools/spotbugs/spotbugs-annotations.jar"/>
     57            <pathelement path="${spotbugs.dir}/spotbugs-annotations.jar"/>
    5458        </path>
    5559        <path id="pmd.classpath">
    56             <fileset dir="${base.dir}/tools/pmd/">
     60            <fileset dir="${pmd.dir}">
    5761                <include name="*.jar"/>
    5862            </fileset>
     
    166170    <target name="mac" depends="init-properties">
    167171        <!-- Using https://bitbucket.org/infinitekind/appbundler to create mac application bundle -->
    168         <taskdef name="bundleapp" classname="com.oracle.appbundler.AppBundlerTask" classpath="tools/appbundler-1.0ea.jar"/>
     172        <taskdef name="bundleapp" classname="com.oracle.appbundler.AppBundlerTask" classpath="${tools.dir}/appbundler-1.0ea.jar"/>
    169173        <!-- create MacOS X application bundle -->
    170174        <bundleapp outputdirectory="${bundle.outdir}" name="JOSM" displayname="JOSM" executablename="JOSM" identifier="org.openstreetmap.josm"
     
    196200
    197201        <!-- appbundler lacks the possibility of defining our own keys or using a template, so update the .plist manually -->
    198         <taskdef name="xmltask" classname="com.oopsconsultancy.xmltask.ant.XmlTask" classpath="tools/xmltask.jar"/>
     202        <taskdef name="xmltask" classname="com.oopsconsultancy.xmltask.ant.XmlTask" classpath="${tools.dir}/xmltask.jar"/>
    199203
    200204        <xmltask source="${bundle.outdir}/JOSM.app/Contents/Info.plist" dest="${bundle.outdir}/JOSM.app/Contents/Info.plist" indent="false">
     
    388392        <delete dir="${src.dir}/org/openstreetmap/josm/data/imagery/types"/>
    389393        <delete file="${epsg.output}"/>
     394        <delete file="${pmd.dir}/cache"/>
    390395    </target>
    391396    <macrodef name="init-test-preferences">
     
    406411        <init-test-preferences testfamily="functional"/>
    407412        <init-test-preferences testfamily="performance"/>
    408         <taskdef uri="antlib:org.jacoco.ant" resource="org/jacoco/ant/antlib.xml" classpath="tools/jacocoant.jar" />
     413        <taskdef uri="antlib:org.jacoco.ant" resource="org/jacoco/ant/antlib.xml" classpath="${tools.dir}/jacocoant.jar" />
    409414    </target>
    410415    <target name="test-clean" depends="init-properties">
     
    544549    </target>
    545550    <target name="dist-optimized" depends="dist">
    546         <taskdef resource="proguard/ant/task.properties" classpath="tools/proguard.jar"/>
     551        <taskdef resource="proguard/ant/task.properties" classpath="${tools.dir}/proguard.jar"/>
    547552        <proguard>
    548553        -injars ${dist.jar}
     
    599604        <!-- generate difference report between optimized jar and normal one -->
    600605        <exec executable="perl" dir="${basedir}">
    601             <arg value="tools/japicc/japi-compliance-checker.pl"/>
     606            <arg value="${tools.dir}/japicc/japi-compliance-checker.pl"/>
    602607            <arg value="--lib=JOSM"/>
    603608            <arg value="--keep-internal"/>
     
    614619        <property name="dir" value="plugin-check"/>
    615620        <typedef uri="antlib:org.codehaus.mojo.animal_sniffer">
    616             <classpath path="tools/animal-sniffer-ant-tasks.jar"/>
     621            <classpath path="${tools.dir}/animal-sniffer-ant-tasks.jar"/>
    617622        </typedef>
    618623        <mkdir dir="${dir}"/>
     
    745750        <sequential>
    746751            <echo message="Generating Taginfo for type @{type} to @{output}"/>
    747             <groovy src="${taginfoextract}" classpath="${dist.jar}:tools/spotbugs/spotbugs-annotations.jar">
     752            <groovy src="${taginfoextract}" classpath="${dist.jar}:${spotbugs.dir}/spotbugs-annotations.jar">
    748753                <arg value="-t"/>
    749754                <arg value="@{type}"/>
     
    759764
    760765    <target name="taginfo" depends="dist">
    761         <taskdef name="groovy" classname="org.codehaus.groovy.ant.Groovy" classpath="${groovy.jar};tools/commons-cli-1.3.1.jar"/>
     766        <taskdef name="groovy" classname="org.codehaus.groovy.ant.Groovy" classpath="${groovy.jar};${tools.dir}/commons-cli-1.3.1.jar"/>
    762767        <property name="taginfoextract" value="scripts/TagInfoExtract.groovy"/>
    763768        <property name="imgurlprefix" value="http://josm.openstreetmap.de/download/taginfo/taginfo-img"/>
     
    768773
    769774    <target name="imageryindex" depends="init-properties">
    770         <taskdef name="groovy" classname="org.codehaus.groovy.ant.Groovy" classpath="${groovy.jar};tools/commons-cli-1.3.1.jar"/>
     775        <taskdef name="groovy" classname="org.codehaus.groovy.ant.Groovy" classpath="${groovy.jar};${tools.dir}/commons-cli-1.3.1.jar"/>
    771776        <echo message="Checking editor imagery difference"/>
    772777        <groovy src="scripts/SyncEditorLayerIndex.groovy" classpath="${dist.jar}">
     
    803808    <target name="checkstyle-compile" depends="init-properties">
    804809        <mkdir dir="${checkstyle-build.dir}"/>
    805         <javac sourcepath="" srcdir="${base.dir}/tools/checkstyle/src" failonerror="true"
     810        <javac sourcepath="" srcdir="${checkstyle.dir}/src" failonerror="true"
    806811            destdir="${checkstyle-build.dir}" target="${java.lang.version}" source="${java.lang.version}" debug="on"
    807812            includeantruntime="false" createMissingPackageInfoClass="false"
    808             encoding="UTF-8" classpath="tools/checkstyle/checkstyle-all.jar">
     813            encoding="UTF-8" classpath="${checkstyle.dir}/checkstyle-all.jar">
    809814        </javac>
    810815    </target>
    811816    <target name="checkstyle" depends="checkstyle-compile">
    812817        <taskdef resource="com/puppycrawl/tools/checkstyle/ant/checkstyle-ant-task.properties"
    813              classpath="tools/checkstyle/checkstyle-all.jar:${checkstyle-build.dir}"/>
    814         <checkstyle config="tools/checkstyle/josm_checks.xml">
     818             classpath="${checkstyle.dir}/checkstyle-all.jar:${checkstyle-build.dir}"/>
     819        <checkstyle config="${checkstyle.dir}/josm_checks.xml">
    815820            <fileset dir="${base.dir}/src/org/openstreetmap/josm" includes="**/*.java"
    816821                excludes="gui/mappaint/mapcss/parsergen/*.java"/>
     
    822827
    823828    <target name="spotbugs" depends="dist">
    824         <taskdef name="spotbugs" classname="edu.umd.cs.findbugs.anttask.FindBugsTask" classpath="tools/spotbugs/spotbugs-ant.jar"/>
     829        <taskdef name="spotbugs" classname="edu.umd.cs.findbugs.anttask.FindBugsTask" classpath="${spotbugs.dir}/spotbugs-ant.jar"/>
    825830        <path id="spotbugs-classpath">
    826             <fileset dir="${base.dir}/tools/spotbugs/">
     831            <fileset dir="${spotbugs.dir}">
    827832                <include name="*.jar"/>
    828833            </fileset>
     
    833838                classpath="${spotbugs-classpath}"
    834839                pluginList=""
    835                 excludeFilter="tools/spotbugs/josm-filter.xml"
     840                excludeFilter="${spotbugs.dir}/josm-filter.xml"
    836841                effort="max"
    837842                reportLevel="low"
     
    844849    <target name="pmd" depends="init-properties">
    845850        <taskdef name="pmd" classname="net.sourceforge.pmd.ant.PMDTask" classpath="${toString:pmd.classpath}"/>
    846         <pmd shortFilenames="true" cacheLocation="tools/pmd/cache" encoding="UTF-8">
     851        <pmd shortFilenames="true" cacheLocation="${pmd.dir}/cache" encoding="UTF-8">
    847852            <sourceLanguage name="java" version="${java.lang.version}" />
    848             <ruleset>${base.dir}/tools/pmd/josm-ruleset.xml</ruleset>
     853            <ruleset>${pmd.dir}/josm-ruleset.xml</ruleset>
    849854            <formatter type="text" toConsole="true" />
    850855            <formatter type="xml" toFile="pmd-josm.xml">
Note: See TracChangeset for help on using the changeset viewer.