Changeset 14636 in josm


Ignore:
Timestamp:
2019-01-04T21:41:59+01:00 (6 years ago)
Author:
simon04
Message:

see #17170 - Adapt build.xml to compile+run TagInfoExtract

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/build.xml

    r14604 r14636  
    3838        <property name="mapcss.dir" location="${src.dir}/org/openstreetmap/josm/gui/mappaint/mapcss"/>
    3939        <property name="proj-build.dir" location="${base.dir}/build2"/>
     40        <property name="taginfo-build.dir" location="${base.dir}/build2"/>
    4041        <property name="checkstyle-build.dir" location="${base.dir}/build2"/>
    4142        <property name="epsg.output" location="${base.dir}/data/projection/custom-epsg"/>
     
    826827    </target>
    827828
     829    <target name="taginfo-compile" depends="dist">
     830        <javac sourcepath="" srcdir="${base.dir}/scripts" failonerror="true" includes="TagInfoExtract.java"
     831               destdir="${taginfo-build.dir}" target="${java.lang.version}" source="${java.lang.version}" debug="on"
     832               includeantruntime="false" createMissingPackageInfoClass="false"
     833               encoding="UTF-8" classpath="${build.dir}">
     834        </javac>
     835    </target>
     836
    828837    <macrodef name="_taginfo">
    829838        <attribute name="type"/>
     
    831840        <sequential>
    832841            <echo message="Generating Taginfo for type @{type} to @{output}"/>
    833             <groovy src="${taginfoextract}" classpath="${dist.jar};${toString:groovy.classpath};${spotbugs.dir}/spotbugs-annotations.jar">
    834                 <arg value="-t"/>
     842            <java classname="TagInfoExtract" failonerror="true" fork="false">
     843                <sysproperty key="java.awt.headless" value="true"/>
     844                <classpath>
     845                    <pathelement path="${dist.jar}"/>
     846                    <pathelement path="${taginfo-build.dir}"/>
     847                </classpath>
     848                <arg value="--type"/>
    835849                <arg value="@{type}"/>
    836850                <arg value="--noexit"/>
    837                 <arg value="--svnweb"/>
    838851                <arg value="--imgurlprefix"/>
    839                 <arg value="${imgurlprefix}"/>
    840                 <arg value="-o"/>
     852                <arg value="http://josm.openstreetmap.de/download/taginfo/taginfo-img"/>
     853                <arg value="--output"/>
    841854                <arg value="@{output}"/>
    842             </groovy>
     855            </java>
    843856        </sequential>
    844857    </macrodef>
    845858
    846     <target name="taginfo" depends="dist">
    847         <!-- http://docs.groovy-lang.org/2.5.1/html/documentation/#_the_groovy_ant_task -->
    848         <taskdef name="groovy" classname="org.codehaus.groovy.ant.Groovy" classpathref="groovy.classpath"/>
    849         <property name="taginfoextract" value="scripts/TagInfoExtract.groovy"/>
    850         <property name="imgurlprefix" value="http://josm.openstreetmap.de/download/taginfo/taginfo-img"/>
     859    <target name="taginfo" depends="taginfo-compile">
    851860        <_taginfo type="mappaint" output="taginfo_style.json"/>
    852861        <_taginfo type="presets" output="taginfo_presets.json"/>
Note: See TracChangeset for help on using the changeset viewer.