Changeset 8687 in josm for trunk/build.xml


Ignore:
Timestamp:
2015-08-24T14:41:08+02:00 (4 years ago)
Author:
Don-vip
Message:

see #11795 - add taginfo target to Ant build

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

    • Property svn:ignore
      •  

        old new  
        77javadoc
        88checkstyle-josm.xml
         9taginfo_*.json
         10taginfo-img
  • trunk/build.xml

    r8664 r8687  
    1515    <property name="javacc.home" location="tools"/>
    1616    <property name="mapcss.dir" location="${src.dir}/org/openstreetmap/josm/gui/mappaint/mapcss"/>
     17    <property name="groovy.jar" location="tools/groovy-all-2.4.3.jar"/>
    1718    <!-- build parameter: compression level (ant -Dclevel=N)
    1819             N ranges from 0 (no compression) to 9 (maximum compression)
     
    296297        </fileset>
    297298        <pathelement path="dist/josm-custom.jar"/>
    298         <pathelement path="tools/groovy-all-2.4.3.jar"/>
     299        <pathelement path="${groovy.jar}"/>
    299300    </path>
    300301    <macrodef name="init-test-preferences">
     
    343344    </macrodef>
    344345    <target name="test-compile" depends="test-init,dist">
    345         <taskdef name="groovyc" classname="org.codehaus.groovy.ant.Groovyc" classpath="tools/groovy-all-2.4.3.jar"/>
     346        <taskdef name="groovyc" classname="org.codehaus.groovy.ant.Groovyc" classpath="${groovy.jar}"/>
    346347        <call-groovyc testfamily="unit">
    347348            <cp-elements>
     
    573574    </target>
    574575
     576    <macrodef name="_taginfo">
     577        <attribute name="type"/>
     578        <attribute name="output"/>
     579        <sequential>
     580            <echo message="Generating Taginfo for type @{type} to @{output}"/>
     581            <groovy src="${taginfoextract}" classpath="dist/josm-custom.jar">
     582                <arg value="-t"/>
     583                <arg value="@{type}"/>
     584                <arg value="--noexit"/>
     585                <arg value="--svnweb"/>
     586                <arg value="--imgurlprefix"/>
     587                <arg value="${imgurlprefix}"/>
     588                <arg value="-o"/>
     589                <arg value="@{output}"/>
     590            </groovy>
     591        </sequential>
     592    </macrodef>
     593
     594    <target name="taginfo" depends="dist">
     595        <taskdef name="groovy" classname="org.codehaus.groovy.ant.Groovy" classpath="${groovy.jar};tools/commons-cli-1.3.1.jar"/>
     596        <property name="taginfoextract" value="scripts/taginfoextract.groovy"/>
     597        <property name="imgurlprefix" value="http://josm.openstreetmap.de/download/taginfo/taginfo-img"/>
     598        <_taginfo type="mappaint" output="taginfo_style.json"/>
     599        <_taginfo type="presets" output="taginfo_presets.json"/>
     600        <_taginfo type="external_presets" output="taginfo_external_presets.json"/>
     601    </target>
     602
    575603    <target name="checkstyle">
    576604        <taskdef resource="com/puppycrawl/tools/checkstyle/ant/checkstyle-ant-task.properties"
Note: See TracChangeset for help on using the changeset viewer.