Ignore:
Timestamp:
2011-06-25T19:02:31+02:00 (13 years ago)
Author:
stoecker
Message:

i18n update, split plugin and core translation

Location:
applications/editors/josm/plugins
Files:
2118 added
4 deleted
99 edited
2 moved

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/00_plugin_dir_template/build.xml

    r23263 r26174  
    1 <?xml version="1.0" encoding="UTF-8"?>
     1<?xml version="1.0" encoding="utf-8"?>
    22<!--
    33** This is a template build file for a JOSM  plugin.
     
    2929-->
    3030<project name="myPluginName" default="dist" basedir=".">
    31 
    3231    <!-- enter the SVN commit message -->
    33     <property name="commit.message" value="Commit message" />
     32    <property name="commit.message" value="Commit message"/>
    3433    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    35     <property name="plugin.main.version" value="" />
    36 
    37 
    38     <!--
    39       ************************************************
    40       ** should not be necessary to change the following properties
    41      -->
    42     <property name="josm"                   location="../../core/dist/josm-custom.jar"/>
    43     <property name="plugin.build.dir"       value="build"/>
    44     <property name="plugin.src.dir"         value="src"/>
     34    <property name="plugin.main.version" value=""/>
     35    <!-- should not be necessary to change the following properties -->
     36    <property name="josm" location="../../core/dist/josm-custom.jar"/>
     37    <property name="plugin.build.dir" value="build"/>
     38    <property name="plugin.src.dir" value="src"/>
    4539    <!-- this is the directory where the plugin jar is copied to -->
    46     <property name="plugin.dist.dir"        value="../../dist"/>
     40    <property name="plugin.dist.dir" value="../../dist"/>
    4741    <property name="ant.build.javac.target" value="1.5"/>
    48     <property name="plugin.dist.dir"        value="../../dist"/>
    49     <property name="plugin.jar"             value="${plugin.dist.dir}/${ant.project.name}.jar"/>
    50 
     42    <property name="plugin.dist.dir" value="../../dist"/>
     43    <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/>
    5144    <!--
    5245    **********************************************************
     
    5750        <mkdir dir="${plugin.build.dir}"/>
    5851    </target>
    59 
    6052    <!--
    6153    **********************************************************
     
    7062        </javac>
    7163    </target>
    72 
    7364    <!--
    7465    **********************************************************
     
    8475            <fileset dir="images"/>
    8576        </copy>
     77        <copy todir="${plugin.build.dir}/data">
     78            <fileset dir="data"/>
     79        </copy>
    8680        <copy todir="${plugin.build.dir}">
    8781            <fileset dir=".">
    88                 <include name="README" />
    89                 <include name="LICENSE" />
     82                <include name="README"/>
     83                <include name="LICENSE"/>
    9084            </fileset>
    9185        </copy>
    9286        <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
    9387            <!--
    94         ************************************************
    95         ** configure these properties. Most of them will be copied to the plugins
    96         ** manifest file. Property values will also show up in the list available
    97         ** plugins: http://josm.openstreetmap.de/wiki/Plugins.
    98         **
    99         ************************************************
    100     -->
     88            ************************************************
     89            ** configure these properties. Most of them will be copied to the plugins
     90            ** manifest file. Property values will also show up in the list available
     91            ** plugins: http://josm.openstreetmap.de/wiki/Plugins.
     92            **
     93            ************************************************
     94            -->
    10195            <manifest>
    10296                <attribute name="Author" value="..."/>
     
    111105        </jar>
    112106    </target>
    113 
    114107    <!--
    115108    **********************************************************
     
    120113    -->
    121114    <target name="revision">
    122 
    123115        <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
    124116            <env key="LANG" value="C"/>
     
    130122        <delete file="REVISION"/>
    131123    </target>
    132 
    133124    <!--
    134125    **********************************************************
     
    140131        <delete file="${plugin.jar}"/>
    141132    </target>
    142 
    143133    <!--
    144134    **********************************************************
     
    155145        <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
    156146    </target>
    157 
    158 
    159147    <!--
    160148    ************************** Publishing the plugin ***********************************
    161149    -->
    162150    <!--
    163         ** extracts the JOSM release for the JOSM version in ../core and saves it in the
    164         ** property ${coreversion.info.entry.revision}
    165         **
    166         -->
     151    ** extracts the JOSM release for the JOSM version in ../core and saves it in the
     152    ** property ${coreversion.info.entry.revision}
     153    -->
    167154    <target name="core-info">
    168155        <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
     
    175162        <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
    176163        <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
    177         <delete file="core.info.xml" />
    178     </target>
    179 
    180     <!--
    181         ** commits the source tree for this plugin
    182         -->
     164        <delete file="core.info.xml"/>
     165    </target>
     166    <!-- commits the source tree for this plugin -->
    183167    <target name="commit-current">
    184168        <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
     
    190174        </exec>
    191175    </target>
    192 
    193     <!--
    194         ** updates (svn up) the source tree for this plugin
    195         -->
     176    <!-- updates (svn up) the source tree for this plugin -->
    196177    <target name="update-current">
    197178        <echo>Updating plugin source ...</echo>
     
    208189        </exec>
    209190    </target>
    210 
    211     <!--
    212         ** commits the plugin.jar
    213         -->
     191    <!-- commits the plugin.jar -->
    214192    <target name="commit-dist">
    215193        <echo>
     
    230208        </exec>
    231209    </target>
    232 
    233     <!-- ** make sure svn is present as a command line tool ** -->
     210    <!-- make sure svn is present as a command line tool -->
    234211    <target name="ensure-svn-present">
    235212        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
    236             <env key="LANG" value="C" />
    237             <arg value="--version" />
     213            <env key="LANG" value="C"/>
     214            <arg value="--version"/>
    238215        </exec>
    239216        <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
     
    241218            <condition>
    242219                <not>
    243                     <isset property="svn.exit.code" />
     220                    <isset property="svn.exit.code"/>
    244221                </not>
    245222            </condition>
     
    248225            <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
    249226            <condition>
    250                 <isfailure code="${svn.exit.code}" />
     227                <isfailure code="${svn.exit.code}"/>
    251228            </condition>
    252229        </fail>
    253230    </target>
    254 
    255231    <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
    256232    </target>
  • applications/editors/josm/plugins/ColumbusCSV/build.xml

    r25192 r26174  
    1 <?xml version="1.0" encoding="UTF-8"?>
     1<?xml version="1.0" encoding="utf-8"?>
    22<!--
    33** This is a template build file for a JOSM  plugin.
     
    2626      ** should not be necessary to change the following properties
    2727     -->
    28     <property name="josm"          location="../../core/dist/josm-custom.jar"/>
    29         <property name="josm_stable"  location="../../core/dist/3529/josm-tested.jar"/>
    30     <property name="plugin.build.dir"       value="build"/>
    31     <property name="plugin.src.dir"         value="src"/>
     28    <property name="josm" location="../../core/dist/josm-custom.jar"/>
     29    <property name="josm_stable" location="../../core/dist/3529/josm-tested.jar"/>
     30    <property name="plugin.build.dir" value="build"/>
     31    <property name="plugin.src.dir" value="src"/>
    3232    <!-- this is the directory where the plugin jar is copied to -->
    33     <property name="plugin.dist.dir"        value="../../dist"/>
     33    <property name="plugin.dist.dir" value="../../dist"/>
    3434    <property name="ant.build.javac.target" value="1.5"/>
    35     <property name="plugin.jar"             value="${plugin.dist.dir}/${ant.project.name}.jar"/>
    36 
     35    <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/>
    3736    <!--
    3837    **********************************************************
     
    4140    -->
    4241    <target name="init">
    43         <mkdir dir="${plugin.build.dir}"/>     
     42        <mkdir dir="${plugin.build.dir}"/>
    4443    </target>
    45 
    4644    <!--
    4745    **********************************************************
     
    5654        </javac>
    5755    </target>
    58 
    5956    <!--
    6057    **********************************************************
     
    6360    -->
    6461    <target name="dist" depends="compile,revision">
    65         <mkdir dir="${plugin.dist.dir}"/>
     62        <mkdir dir="${plugin.dist.dir}"/>
    6663        <echo message="creating ${plugin.jar} ... "/>
    6764        <copy todir="${plugin.build.dir}/resources">
     
    7168            <fileset dir="images"/>
    7269        </copy>
     70        <copy todir="${plugin.build.dir}/data">
     71            <fileset dir="data"/>
     72        </copy>
    7373        <copy todir="${plugin.build.dir}">
    7474            <fileset dir=".">
    75                 <include name="README" />
    76                 <include name="LICENSE" />
     75                <include name="README"/>
     76                <include name="LICENSE"/>
    7777            </fileset>
    7878        </copy>
    7979        <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
    80     <!--
     80            <!--
    8181        ************************************************
    8282        ** configure these properties. Most of them will be copied to the plugins
     
    9191                <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
    9292                <attribute name="Plugin-Description" value="Imports proprietary CSV files of the Columbus/Visiontac V-900 GPS logger into a GPX layer."/>
    93                 <attribute name="de_Plugin-Description" value="Importiert die CSV-Dateien des Columbus/Visiontac V-900 GPS Loggers in GPX-Daten."/>
     93                <attribute name="de_Plugin-Description" value="Importiert die CSV-Dateien des Columbus/Visiontac V-900 GPS Loggers in GPX-Daten."/>
    9494                <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/wiki/JOSM/Plugins/ColumbusCSV"/>
    9595                <attribute name="Plugin-Mainversion" value="3835"/>
    9696                <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
    97                 <attribute name="Plugin-Icon" value="images/colcsvicon.png"/>
     97                <attribute name="Plugin-Icon" value="images/colcsvicon.png"/>
    9898            </manifest>
    99         </jar>       
     99        </jar>
    100100    </target>
    101 
    102101    <!--
    103102    **********************************************************
     
    108107    -->
    109108    <target name="revision">
    110                 <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
    111                     <env key="LANG" value="C"/>
    112                     <arg value="info"/>
    113                     <arg value="--xml"/>
    114                     <arg value="build.xml"/>
    115                 </exec>
    116         <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
    117         <echo message="Revision: ${version.entry.commit.revision}"/>
    118         <delete file="REVISION"/>
    119         </target>
    120 
     109        <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
     110            <env key="LANG" value="C"/>
     111            <arg value="info"/>
     112            <arg value="--xml"/>
     113            <arg value="build.xml"/>
     114        </exec>
     115        <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
     116        <echo message="Revision: ${version.entry.commit.revision}"/>
     117        <delete file="REVISION"/>
     118    </target>
    121119    <!--
    122120    **********************************************************
     
    128126        <delete file="${plugin.jar}"/>
    129127    </target>
    130 
    131128    <!--
    132129    **********************************************************
  • applications/editors/josm/plugins/CommandLine/build.xml

    r25199 r26174  
    1 <?xml version="1.0" encoding="UTF-8"?>
     1<?xml version="1.0" encoding="utf-8"?>
    22<project name="CommandLine" default="dist" basedir=".">
    3 
    43    <!-- enter the SVN commit message -->
    5     <property name="commit.message" value="Moar bugfixes" />
     4    <property name="commit.message" value="Moar bugfixes"/>
    65    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    7     <property name="plugin.main.version" value="3835" />
    8 
    9 
     6    <property name="plugin.main.version" value="3835"/>
    107    <!--
    118      ************************************************
    129      ** should not be necessary to change the following properties
    1310     -->
    14     <property name="josm"                   location="../../core/dist/josm-custom.jar"/>
    15     <property name="plugin.build.dir"       value="build"/>
    16     <property name="plugin.src.dir"         value="src"/>
     11    <property name="josm" location="../../core/dist/josm-custom.jar"/>
     12    <property name="plugin.build.dir" value="build"/>
     13    <property name="plugin.src.dir" value="src"/>
    1714    <!-- this is the directory where the plugin jar is copied to -->
    18     <property name="plugin.dist.dir"        value="../../dist"/>
     15    <property name="plugin.dist.dir" value="../../dist"/>
    1916    <property name="ant.build.javac.target" value="1.5"/>
    20     <property name="plugin.dist.dir"        value="../../dist"/>
    21     <property name="plugin.jar"             value="${plugin.dist.dir}/${ant.project.name}.jar"/>
    22 
     17    <property name="plugin.dist.dir" value="../../dist"/>
     18    <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/>
    2319    <!--
    2420    **********************************************************
     
    2925        <mkdir dir="${plugin.build.dir}"/>
    3026    </target>
    31 
    3227    <!--
    3328    **********************************************************
     
    4237        </javac>
    4338    </target>
    44 
    4539    <!--
    4640    **********************************************************
     
    5650            <fileset dir="images"/>
    5751        </copy>
     52        <copy todir="${plugin.build.dir}/data">
     53            <fileset dir="data"/>
     54        </copy>
    5855        <copy todir="${plugin.build.dir}">
    5956            <fileset dir=".">
    60                 <include name="README" />
    61                 <include name="LICENSE" />
     57                <include name="README"/>
     58                <include name="LICENSE"/>
    6259            </fileset>
    6360        </copy>
     
    8582        </jar>
    8683    </target>
    87 
    8884    <!--
    8985    **********************************************************
     
    9490    -->
    9591    <target name="revision">
    96 
    9792        <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
    9893            <env key="LANG" value="C"/>
     
    10499        <delete file="REVISION"/>
    105100    </target>
    106 
    107101    <!--
    108102    **********************************************************
     
    114108        <delete file="${plugin.jar}"/>
    115109    </target>
    116 
    117110    <!--
    118111    **********************************************************
     
    129122        <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
    130123    </target>
    131 
    132 
    133124    <!--
    134125    ************************** Publishing the plugin ***********************************
     
    149140        <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
    150141        <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
    151         <delete file="core.info.xml" />
    152     </target>
    153 
     142        <delete file="core.info.xml"/>
     143    </target>
    154144    <!--
    155145        ** commits the source tree for this plugin
     
    164154        </exec>
    165155    </target>
    166 
    167156    <!--
    168157        ** updates (svn up) the source tree for this plugin
     
    182171        </exec>
    183172    </target>
    184 
    185173    <!--
    186174        ** commits the plugin.jar
     
    204192        </exec>
    205193    </target>
    206 
    207194    <!-- ** make sure svn is present as a command line tool ** -->
    208195    <target name="ensure-svn-present">
    209196        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
    210             <env key="LANG" value="C" />
    211             <arg value="--version" />
     197            <env key="LANG" value="C"/>
     198            <arg value="--version"/>
    212199        </exec>
    213200        <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
     
    215202            <condition>
    216203                <not>
    217                     <isset property="svn.exit.code" />
     204                    <isset property="svn.exit.code"/>
    218205                </not>
    219206            </condition>
     
    222209            <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
    223210            <condition>
    224                 <isfailure code="${svn.exit.code}" />
     211                <isfailure code="${svn.exit.code}"/>
    225212            </condition>
    226213        </fail>
    227214    </target>
    228 
    229215    <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
    230216    </target>
  • applications/editors/josm/plugins/Create_grid_of_ways/build.xml

    r25192 r26174  
    1 <?xml version="1.0" encoding="UTF-8"?>
     1<?xml version="1.0" encoding="utf-8"?>
    22<!--
    33** This is the build file for the Create_grid_of_ways  plugin.
     
    2929-->
    3030<project name="Create_grid_of_ways" default="dist" basedir=".">
    31 
    32         <!-- enter the SVN commit message -->
    33         <property name="commit.message" value="Changed constructor signature, updated build.xml" />
    34         <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    35         <property name="plugin.main.version" value="3835" />
    36 
    37 
    38         <property name="josm"                   location="../../core/dist/josm-custom.jar"/>
    39         <property name="plugin.dist.dir"        value="../../dist"/>
    40         <property name="plugin.build.dir"       value="build"/>
    41         <property name="plugin.jar"             value="${plugin.dist.dir}/${ant.project.name}.jar"/>
    42         <property name="ant.build.javac.target" value="1.5"/>
    43         <target name="init">
    44                 <mkdir dir="${plugin.build.dir}"/>
    45         </target>
    46         <target name="compile" depends="init">
    47                 <echo message="creating ${plugin.jar}"/>
    48                 <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}">
    49                         <compilerarg value="-Xlint:deprecation"/>
    50                         <compilerarg value="-Xlint:unchecked"/>
    51                 </javac>
    52         </target>
    53         <target name="dist" depends="compile,revision">
    54                 <copy todir="${plugin.build.dir}/images">
    55                         <fileset dir="images"/>
    56                 </copy>
    57                 <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
    58                         <manifest>
    59                                 <attribute name="Author" value="Jorge Luis Chamorro"/>
    60                                 <attribute name="Plugin-Class" value="CreateGridOfWaysPlugin.CreateGridOfWaysPlugin"/>
    61                                 <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
    62                                 <attribute name="Plugin-Description" value="Create a grid of ways."/>
    63                                 <attribute name="Plugin-Icon" value="images/creategridofways.png"/>
    64                                 <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/wiki/Create_grid_of_ways"/>
    65                                 <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
    66                                 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
    67                         </manifest>
    68                 </jar>
    69         </target>
    70         <target name="revision">
    71                 <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
    72                         <env key="LANG" value="C"/>
    73                         <arg value="info"/>
    74                         <arg value="--xml"/>
    75                         <arg value="."/>
    76                 </exec>
    77                 <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
    78                 <delete file="REVISION"/>
    79         </target>
    80         <target name="clean">
    81                 <delete dir="${plugin.build.dir}"/>
    82                 <delete file="${plugin.jar}"/>
    83         </target>
    84         <target name="install" depends="dist">
    85                 <property environment="env"/>
    86                 <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
    87                         <and>
    88                                 <os family="windows"/>
    89                         </and>
    90                 </condition>
    91                 <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
    92         </target>
    93 
    94         <!--
    95         ************************** Publishing the plugin ***********************************
    96         -->
    97         <!--
    98                 ** extracts the JOSM release for the JOSM version in ../core and saves it in the
    99                 ** property ${coreversion.info.entry.revision}
    100                 **
    101                 -->
    102         <target name="core-info">
    103                 <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
    104                         <env key="LANG" value="C"/>
    105                         <arg value="info"/>
    106                         <arg value="--xml"/>
    107                         <arg value="../../core"/>
    108                 </exec>
    109                 <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
    110                 <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
    111                 <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
    112                 <delete file="core.info.xml" />
    113         </target>
    114 
    115         <!--
    116                 ** commits the source tree for this plugin
    117                 -->
    118         <target name="commit-current">
    119                 <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
    120                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    121                         <env key="LANG" value="C"/>
    122                         <arg value="commit"/>
    123                         <arg value="-m '${commit.message}'"/>
    124                         <arg value="."/>
    125                 </exec>
    126         </target>
    127 
    128         <!--
    129                 ** updates (svn up) the source tree for this plugin
    130                 -->
    131         <target name="update-current">
    132                 <echo>Updating plugin source ...</echo>
    133                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    134                         <env key="LANG" value="C"/>
    135                         <arg value="up"/>
    136                         <arg value="."/>
    137                 </exec>
    138                 <echo>Updating ${plugin.jar} ...</echo>
    139                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    140                         <env key="LANG" value="C"/>
    141                         <arg value="up"/>
    142                         <arg value="../dist/${plugin.jar}"/>
    143                 </exec>
    144         </target>
    145 
    146         <!--
    147                 ** commits the plugin.jar
    148                 -->
    149         <target name="commit-dist">
    150                 <echo>
    151         ***** Properties of published ${plugin.jar} *****
    152         Commit message    : '${commit.message}'                                 
    153         Plugin-Mainversion: ${plugin.main.version}
    154         JOSM build version: ${coreversion.info.entry.revision}
    155         Plugin-Version    : ${version.entry.commit.revision}
    156         ***** / Properties of published ${plugin.jar} *****                                     
    157                                                
    158         Now commiting ${plugin.jar} ...
    159         </echo>
    160                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    161                         <env key="LANG" value="C"/>
    162                         <arg value="-m '${commit.message}'"/>
    163                         <arg value="commit"/>
    164                         <arg value="${plugin.jar}"/>
    165                 </exec>
    166         </target>
    167 
    168         <!-- ** make sure svn is present as a command line tool ** -->
    169         <target name="ensure-svn-present">
    170                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
    171                         <env key="LANG" value="C" />
    172                         <arg value="--version" />
    173                 </exec>
    174                 <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
    175                         <!-- return code not set at all? Most likely svn isn't installed -->
    176                         <condition>
    177                                 <not>
    178                                         <isset property="svn.exit.code" />
    179                                 </not>
    180                         </condition>
    181                 </fail>
    182                 <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
    183                         <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
    184                         <condition>
    185                                 <isfailure code="${svn.exit.code}" />
    186                         </condition>
    187                 </fail>
    188         </target>
    189 
    190         <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
    191         </target>
     31    <!-- enter the SVN commit message -->
     32    <property name="commit.message" value="Changed constructor signature, updated build.xml"/>
     33    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
     34    <property name="plugin.main.version" value="3835"/>
     35    <property name="josm" location="../../core/dist/josm-custom.jar"/>
     36    <property name="plugin.dist.dir" value="../../dist"/>
     37    <property name="plugin.build.dir" value="build"/>
     38    <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/>
     39    <property name="ant.build.javac.target" value="1.5"/>
     40    <target name="init">
     41        <mkdir dir="${plugin.build.dir}"/>
     42    </target>
     43    <target name="compile" depends="init">
     44        <echo message="creating ${plugin.jar}"/>
     45        <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}">
     46            <compilerarg value="-Xlint:deprecation"/>
     47            <compilerarg value="-Xlint:unchecked"/>
     48        </javac>
     49    </target>
     50    <target name="dist" depends="compile,revision">
     51        <copy todir="${plugin.build.dir}/images">
     52            <fileset dir="images"/>
     53        </copy>
     54        <copy todir="${plugin.build.dir}/data">
     55            <fileset dir="data"/>
     56        </copy>
     57        <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
     58            <manifest>
     59                <attribute name="Author" value="Jorge Luis Chamorro"/>
     60                <attribute name="Plugin-Class" value="CreateGridOfWaysPlugin.CreateGridOfWaysPlugin"/>
     61                <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
     62                <attribute name="Plugin-Description" value="Create a grid of ways."/>
     63                <attribute name="Plugin-Icon" value="images/creategridofways.png"/>
     64                <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/wiki/Create_grid_of_ways"/>
     65                <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
     66                <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
     67            </manifest>
     68        </jar>
     69    </target>
     70    <target name="revision">
     71        <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
     72            <env key="LANG" value="C"/>
     73            <arg value="info"/>
     74            <arg value="--xml"/>
     75            <arg value="."/>
     76        </exec>
     77        <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
     78        <delete file="REVISION"/>
     79    </target>
     80    <target name="clean">
     81        <delete dir="${plugin.build.dir}"/>
     82        <delete file="${plugin.jar}"/>
     83    </target>
     84    <target name="install" depends="dist">
     85        <property environment="env"/>
     86        <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
     87            <and>
     88                <os family="windows"/>
     89            </and>
     90        </condition>
     91        <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
     92    </target>
     93    <!--
     94    ************************** Publishing the plugin ***********************************
     95    -->
     96    <!--
     97        ** extracts the JOSM release for the JOSM version in ../core and saves it in the
     98        ** property ${coreversion.info.entry.revision}
     99        **
     100        -->
     101    <target name="core-info">
     102        <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
     103            <env key="LANG" value="C"/>
     104            <arg value="info"/>
     105            <arg value="--xml"/>
     106            <arg value="../../core"/>
     107        </exec>
     108        <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
     109        <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
     110        <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
     111        <delete file="core.info.xml"/>
     112    </target>
     113    <!--
     114        ** commits the source tree for this plugin
     115        -->
     116    <target name="commit-current">
     117        <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
     118        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     119            <env key="LANG" value="C"/>
     120            <arg value="commit"/>
     121            <arg value="-m '${commit.message}'"/>
     122            <arg value="."/>
     123        </exec>
     124    </target>
     125    <!--
     126        ** updates (svn up) the source tree for this plugin
     127        -->
     128    <target name="update-current">
     129        <echo>Updating plugin source ...</echo>
     130        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     131            <env key="LANG" value="C"/>
     132            <arg value="up"/>
     133            <arg value="."/>
     134        </exec>
     135        <echo>Updating ${plugin.jar} ...</echo>
     136        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     137            <env key="LANG" value="C"/>
     138            <arg value="up"/>
     139            <arg value="../dist/${plugin.jar}"/>
     140        </exec>
     141    </target>
     142    <!--
     143        ** commits the plugin.jar
     144        -->
     145    <target name="commit-dist">
     146        <echo>
     147    ***** Properties of published ${plugin.jar} *****
     148    Commit message    : '${commit.message}'                 
     149    Plugin-Mainversion: ${plugin.main.version}
     150    JOSM build version: ${coreversion.info.entry.revision}
     151    Plugin-Version    : ${version.entry.commit.revision}
     152    ***** / Properties of published ${plugin.jar} *****                 
     153                       
     154    Now commiting ${plugin.jar} ...
     155    </echo>
     156        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     157            <env key="LANG" value="C"/>
     158            <arg value="-m '${commit.message}'"/>
     159            <arg value="commit"/>
     160            <arg value="${plugin.jar}"/>
     161        </exec>
     162    </target>
     163    <!-- ** make sure svn is present as a command line tool ** -->
     164    <target name="ensure-svn-present">
     165        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
     166            <env key="LANG" value="C"/>
     167            <arg value="--version"/>
     168        </exec>
     169        <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
     170            <!-- return code not set at all? Most likely svn isn't installed -->
     171            <condition>
     172                <not>
     173                    <isset property="svn.exit.code"/>
     174                </not>
     175            </condition>
     176        </fail>
     177        <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
     178            <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
     179            <condition>
     180                <isfailure code="${svn.exit.code}"/>
     181            </condition>
     182        </fail>
     183    </target>
     184    <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
     185    </target>
    192186</project>
  • applications/editors/josm/plugins/DirectDownload/build.xml

    r25199 r26174  
    1 <?xml version="1.0" encoding="UTF-8"?>
     1<?xml version="1.0" encoding="utf-8"?>
    22<!--
    33** This is a template build file for a JOSM  plugin.
     
    2929-->
    3030<project name="DirectDownload" default="dist" basedir=".">
    31 
    3231    <!-- enter the SVN commit message -->
    33     <property name="commit.message" value="Commit message" />
     32    <property name="commit.message" value="Commit message"/>
    3433    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    35     <property name="plugin.main.version" value="3835" />
    36 
    37 
     34    <property name="plugin.main.version" value="3835"/>
    3835    <!--
    3936      ************************************************
    4037      ** should not be necessary to change the following properties
    4138     -->
    42     <property name="josm"                   location="../../core/dist/josm-custom.jar"/>
    43     <property name="plugin.build.dir"       value="build"/>
    44     <property name="plugin.src.dir"         value="src"/>
     39    <property name="josm" location="../../core/dist/josm-custom.jar"/>
     40    <property name="plugin.build.dir" value="build"/>
     41    <property name="plugin.src.dir" value="src"/>
    4542    <!-- this is the directory where the plugin jar is copied to -->
    46     <property name="plugin.dist.dir"        value="../../dist"/>
     43    <property name="plugin.dist.dir" value="../../dist"/>
    4744    <property name="ant.build.javac.target" value="1.5"/>
    48     <property name="plugin.dist.dir"        value="../../dist"/>
    49     <property name="plugin.jar"             value="${plugin.dist.dir}/${ant.project.name}.jar"/>
    50 
     45    <property name="plugin.dist.dir" value="../../dist"/>
     46    <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/>
    5147    <!--
    5248    **********************************************************
     
    5753        <mkdir dir="${plugin.build.dir}"/>
    5854    </target>
    59 
    6055    <!--
    6156    **********************************************************
     
    7065        </javac>
    7166    </target>
    72 
    7367    <!--
    7468    **********************************************************
     
    8478            <fileset dir="images"/>
    8579        </copy>
     80        <copy todir="${plugin.build.dir}/data">
     81            <fileset dir="data"/>
     82        </copy>
    8683        <copy todir="${plugin.build.dir}">
    8784            <fileset dir=".">
    88                 <include name="README" />
    89                 <include name="LICENSE" />
     85                <include name="README"/>
     86                <include name="LICENSE"/>
    9087            </fileset>
    9188        </copy>
     
    104101                <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
    105102                <attribute name="Plugin-Description" value="Download your GPX tracks from openstreetmap.org"/>
    106 <!--
     103                <!--
    107104                <attribute name="Plugin-Icon" value="..."/>
    108105                <attribute name="Plugin-Link" value="..."/>
     
    113110        </jar>
    114111    </target>
    115 
    116112    <!--
    117113    **********************************************************
     
    122118    -->
    123119    <target name="revision">
    124 
    125120        <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
    126121            <env key="LANG" value="C"/>
     
    132127        <delete file="REVISION"/>
    133128    </target>
    134 
    135129    <!--
    136130    **********************************************************
     
    142136        <delete file="${plugin.jar}"/>
    143137    </target>
    144 
    145138    <!--
    146139    **********************************************************
     
    157150        <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
    158151    </target>
    159 
    160 
    161152    <!--
    162153    ************************** Publishing the plugin ***********************************
     
    177168        <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
    178169        <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
    179         <delete file="core.info.xml" />
    180     </target>
    181 
     170        <delete file="core.info.xml"/>
     171    </target>
    182172    <!--
    183173        ** commits the source tree for this plugin
     
    192182        </exec>
    193183    </target>
    194 
    195184    <!--
    196185        ** updates (svn up) the source tree for this plugin
     
    210199        </exec>
    211200    </target>
    212 
    213201    <!--
    214202        ** commits the plugin.jar
     
    232220        </exec>
    233221    </target>
    234 
    235222    <!-- ** make sure svn is present as a command line tool ** -->
    236223    <target name="ensure-svn-present">
    237224        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
    238             <env key="LANG" value="C" />
    239             <arg value="--version" />
     225            <env key="LANG" value="C"/>
     226            <arg value="--version"/>
    240227        </exec>
    241228        <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
     
    243230            <condition>
    244231                <not>
    245                     <isset property="svn.exit.code" />
     232                    <isset property="svn.exit.code"/>
    246233                </not>
    247234            </condition>
     
    250237            <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
    251238            <condition>
    252                 <isfailure code="${svn.exit.code}" />
     239                <isfailure code="${svn.exit.code}"/>
    253240            </condition>
    254241        </fail>
    255242    </target>
    256 
    257243    <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
    258244    </target>
  • applications/editors/josm/plugins/DirectUpload/build.xml

    r25199 r26174  
    1 <?xml version="1.0" encoding="UTF-8"?>
     1<?xml version="1.0" encoding="utf-8"?>
    22<!--
    33** This is the build file for the DirectUpload plugin
     
    2626-->
    2727<project name="DirectUpload" default="dist" basedir=".">
    28 
    29         <property name="commit.message" value="applied JOSM Ticket 4498 (patch by ax) - oauth support for gpx upload (I accidentally committed parts of the path in [24236])" />
    30         <property name="plugin.main.version" value="3835" />
    31 
    32         <property name="josm"                   location="../../core/dist/josm-custom.jar"/>
    33         <property name="plugin.dist.dir"        value="../../dist"/>
    34         <property name="plugin.build.dir"       value="build"/>
    35         <property name="plugin.jar"             value="${plugin.dist.dir}/${ant.project.name}.jar"/>
    36         <property name="ant.build.javac.target" value="1.5"/>
    37         <target name="init">
    38                 <mkdir dir="${plugin.build.dir}"/>
    39         </target>
    40         <target name="compile" depends="init">
    41                 <echo message="creating ${plugin.jar}"/>
    42                 <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}">
    43                         <compilerarg value="-Xlint:deprecation"/>
    44                         <compilerarg value="-Xlint:unchecked"/>
    45                 </javac>
    46         </target>
    47         <target name="dist" depends="compile,revision">
    48                 <copy todir="${plugin.build.dir}/images">
    49                         <fileset dir="images"/>
    50                 </copy>
    51                 <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
    52                         <manifest>
    53                                 <attribute name="Author" value="Subhodip Biswas"/>
    54                                 <attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.DirectUpload.UploadDataGuiPlugin"/>
    55                                 <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
    56                                 <attribute name="Plugin-Description" value="This plugin directly upload GPS Traces from current active layer in JOSM to openstreetmap.org."/>
    57                                 <attribute name="Plugin-Icon" value="images/UploadAction.png"/>
    58                                 <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/index.php/User:Subhodip/GSoC_Doc#DirectUpload_Plugin_in_JOSM_:"/>
    59                                 <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
    60                                 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
    61                         </manifest>
    62                 </jar>
    63         </target>
    64         <target name="revision">
    65                 <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
    66                         <env key="LANG" value="C"/>
    67                         <arg value="info"/>
    68                         <arg value="--xml"/>
    69                         <arg value="."/>
    70                 </exec>
    71                 <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
    72                 <delete file="REVISION"/>
    73         </target>
    74         <target name="clean">
    75                 <delete dir="${plugin.build.dir}"/>
    76                 <delete file="${plugin.jar}"/>
    77         </target>
    78         <target name="install" depends="dist">
    79                 <property environment="env"/>
    80                 <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
    81                         <and>
    82                                 <os family="windows"/>
    83                         </and>
    84                 </condition>
    85                 <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
    86         </target>
    87         <!--
    88          ************************** Publishing the plugin ***********************************
    89         -->
    90         <!--
    91         ** extracts the JOSM release for the JOSM version in ../core and saves it in the
    92         ** property ${coreversion.info.entry.revision}
    93         **
    94         -->
    95         <target name="core-info">
    96                 <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
    97                         <env key="LANG" value="C"/>
    98                         <arg value="info"/>
    99                         <arg value="--xml"/>
    100                         <arg value="../../core"/>
    101                 </exec>
    102                 <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
    103                 <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
    104                 <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
    105                 <delete file="core.info.xml" />
    106         </target>
    107 
    108         <!--
    109         ** commits the source tree for this plugin
    110         -->
    111         <target name="commit-current">
    112                 <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
    113                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    114                         <env key="LANG" value="C"/>
    115                         <arg value="commit"/>
    116                         <arg value="-m '${commit.message}'"/>
    117                         <arg value="."/>
    118                 </exec>
    119         </target>
    120 
    121         <!--
    122         ** updates (svn up) the source tree for this plugin
    123         -->
    124         <target name="update-current">
    125                 <echo>Updating plugin source ...</echo>
    126                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    127                         <env key="LANG" value="C"/>
    128                         <arg value="up"/>
    129                         <arg value="."/>
    130                 </exec>
    131                 <echo>Updating ${plugin.jar} ...</echo>
    132                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    133                         <env key="LANG" value="C"/>
    134                         <arg value="up"/>
    135                         <arg value="../dist/${plugin.jar}"/>
    136                 </exec>
    137         </target>
    138 
    139         <!--
    140         ** commits the plugin.jar
    141         -->
    142         <target name="commit-dist">
    143                 <echo>
     28    <property name="commit.message" value="applied JOSM Ticket 4498 (patch by ax) - oauth support for gpx upload (I accidentally committed parts of the path in [24236])"/>
     29    <property name="plugin.main.version" value="3835"/>
     30    <property name="josm" location="../../core/dist/josm-custom.jar"/>
     31    <property name="plugin.dist.dir" value="../../dist"/>
     32    <property name="plugin.build.dir" value="build"/>
     33    <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/>
     34    <property name="ant.build.javac.target" value="1.5"/>
     35    <target name="init">
     36        <mkdir dir="${plugin.build.dir}"/>
     37    </target>
     38    <target name="compile" depends="init">
     39        <echo message="creating ${plugin.jar}"/>
     40        <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}">
     41            <compilerarg value="-Xlint:deprecation"/>
     42            <compilerarg value="-Xlint:unchecked"/>
     43        </javac>
     44    </target>
     45    <target name="dist" depends="compile,revision">
     46        <copy todir="${plugin.build.dir}/images">
     47            <fileset dir="images"/>
     48        </copy>
     49        <copy todir="${plugin.build.dir}/data">
     50            <fileset dir="data"/>
     51        </copy>
     52        <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
     53            <manifest>
     54                <attribute name="Author" value="Subhodip Biswas"/>
     55                <attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.DirectUpload.UploadDataGuiPlugin"/>
     56                <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
     57                <attribute name="Plugin-Description" value="This plugin directly upload GPS Traces from current active layer in JOSM to openstreetmap.org."/>
     58                <attribute name="Plugin-Icon" value="images/UploadAction.png"/>
     59                <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/index.php/User:Subhodip/GSoC_Doc#DirectUpload_Plugin_in_JOSM_:"/>
     60                <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
     61                <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
     62            </manifest>
     63        </jar>
     64    </target>
     65    <target name="revision">
     66        <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
     67            <env key="LANG" value="C"/>
     68            <arg value="info"/>
     69            <arg value="--xml"/>
     70            <arg value="."/>
     71        </exec>
     72        <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
     73        <delete file="REVISION"/>
     74    </target>
     75    <target name="clean">
     76        <delete dir="${plugin.build.dir}"/>
     77        <delete file="${plugin.jar}"/>
     78    </target>
     79    <target name="install" depends="dist">
     80        <property environment="env"/>
     81        <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
     82            <and>
     83                <os family="windows"/>
     84            </and>
     85        </condition>
     86        <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
     87    </target>
     88    <!--
     89     ************************** Publishing the plugin ***********************************
     90    -->
     91    <!--
     92    ** extracts the JOSM release for the JOSM version in ../core and saves it in the
     93    ** property ${coreversion.info.entry.revision}
     94    **
     95    -->
     96    <target name="core-info">
     97        <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
     98            <env key="LANG" value="C"/>
     99            <arg value="info"/>
     100            <arg value="--xml"/>
     101            <arg value="../../core"/>
     102        </exec>
     103        <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
     104        <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
     105        <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
     106        <delete file="core.info.xml"/>
     107    </target>
     108    <!--
     109    ** commits the source tree for this plugin
     110    -->
     111    <target name="commit-current">
     112        <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
     113        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     114            <env key="LANG" value="C"/>
     115            <arg value="commit"/>
     116            <arg value="-m '${commit.message}'"/>
     117            <arg value="."/>
     118        </exec>
     119    </target>
     120    <!--
     121    ** updates (svn up) the source tree for this plugin
     122    -->
     123    <target name="update-current">
     124        <echo>Updating plugin source ...</echo>
     125        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     126            <env key="LANG" value="C"/>
     127            <arg value="up"/>
     128            <arg value="."/>
     129        </exec>
     130        <echo>Updating ${plugin.jar} ...</echo>
     131        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     132            <env key="LANG" value="C"/>
     133            <arg value="up"/>
     134            <arg value="../dist/${plugin.jar}"/>
     135        </exec>
     136    </target>
     137    <!--
     138    ** commits the plugin.jar
     139    -->
     140    <target name="commit-dist">
     141        <echo>
    144142***** Properties of published ${plugin.jar} *****
    145143Commit message    : '${commit.message}'
     
    151149Now commiting ${plugin.jar} ...
    152150</echo>
    153                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    154                         <env key="LANG" value="C"/>
    155                         <arg value="-m '${commit.message}'"/>
    156                         <arg value="commit"/>
    157                         <arg value="${plugin.jar}"/>
    158                 </exec>
    159         </target>
    160 
    161         <!-- ** make sure svn is present as a command line tool ** -->
    162         <target name="ensure-svn-present">
    163                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
    164                         <env key="LANG" value="C" />
    165                         <arg value="--version" />
    166                 </exec>
    167                 <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
    168                         <!-- return code not set at all? Most likely svn isn't installed -->
    169                         <condition>
    170                                 <not>
    171                                         <isset property="svn.exit.code" />
    172                                 </not>
    173                         </condition>
    174                 </fail>
    175                 <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
    176                         <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
    177                         <condition>
    178                                 <isfailure code="${svn.exit.code}" />
    179                         </condition>
    180                 </fail>
    181         </target>
    182 
    183         <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
    184         </target>
     151        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     152            <env key="LANG" value="C"/>
     153            <arg value="-m '${commit.message}'"/>
     154            <arg value="commit"/>
     155            <arg value="${plugin.jar}"/>
     156        </exec>
     157    </target>
     158    <!-- ** make sure svn is present as a command line tool ** -->
     159    <target name="ensure-svn-present">
     160        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
     161            <env key="LANG" value="C"/>
     162            <arg value="--version"/>
     163        </exec>
     164        <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
     165            <!-- return code not set at all? Most likely svn isn't installed -->
     166            <condition>
     167                <not>
     168                    <isset property="svn.exit.code"/>
     169                </not>
     170            </condition>
     171        </fail>
     172        <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
     173            <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
     174            <condition>
     175                <isfailure code="${svn.exit.code}"/>
     176            </condition>
     177        </fail>
     178    </target>
     179    <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
     180    </target>
    185181</project>
  • applications/editors/josm/plugins/ElevationProfile/build.xml

    r25192 r26174  
    1 <?xml version="1.0" encoding="UTF-8"?>
     1<?xml version="1.0" encoding="utf-8"?>
    22<!--
    33** This is a template build file for a JOSM  plugin.
     
    2626      ** should not be necessary to change the following properties
    2727     -->
    28         <property name="josm"          location="../../core/dist/josm-custom.jar"/>
    29         <property name="josm_stable"  location="../../core/dist/3529/josm-tested.jar"/>
    30     <property name="plugin.build.dir"       value="build"/>
    31     <property name="plugin.src.dir"         value="src"/>
     28    <property name="josm" location="../../core/dist/josm-custom.jar"/>
     29    <property name="josm_stable" location="../../core/dist/3529/josm-tested.jar"/>
     30    <property name="plugin.build.dir" value="build"/>
     31    <property name="plugin.src.dir" value="src"/>
    3232    <!-- this is the directory where the plugin jar is copied to -->
    3333    <property name="ant.build.javac.target" value="1.5"/>
    34     <property name="plugin.dist.dir"        value="../../dist"/>
    35     <property name="plugin.jar"             value="${plugin.dist.dir}/${ant.project.name}.jar"/>
    36 
     34    <property name="plugin.dist.dir" value="../../dist"/>
     35    <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/>
    3736    <!--
    3837    **********************************************************
     
    4342        <mkdir dir="${plugin.build.dir}"/>
    4443    </target>
    45 
    4644    <!--
    4745    **********************************************************
     
    5654        </javac>
    5755    </target>
    58 
    5956    <!--
    6057    **********************************************************
     
    6360    -->
    6461    <target name="dist" depends="compile,revision">
    65         <condition property="josm.dist.dir" value="../../dist" else="dist">
    66                             <and>
    67                                 <os family="windows"/>
    68                             </and>
    69                         </condition>
    70         <mkdir dir="${plugin.dist.dir}"/>
     62        <condition property="josm.dist.dir" value="../../dist" else="dist">
     63            <and>
     64                <os family="windows"/>
     65            </and>
     66        </condition>
     67        <mkdir dir="${plugin.dist.dir}"/>
    7168        <echo message="creating ${plugin.jar} ... "/>
    72         <!--
    73         <copy todir="${plugin.build.dir}/resources">
    74             <fileset dir="resources"/>
    75         </copy>
    76         -->       
    7769        <copy todir="${plugin.build.dir}/images">
    7870            <fileset dir="images"/>
    7971        </copy>
     72        <copy todir="${plugin.build.dir}/data">
     73            <fileset dir="data"/>
     74        </copy>
    8075        <copy todir="${plugin.build.dir}">
    8176            <fileset dir=".">
    82                 <include name="README" />
    83                 <include name="LICENSE" />
     77                <include name="README"/>
     78                <include name="LICENSE"/>
    8479            </fileset>
    8580        </copy>
    8681        <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
    87     <!--
     82            <!--
    8883        ************************************************
    8984        ** configure these properties. Most of them will be copied to the plugins
     
    9893                <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
    9994                <attribute name="Plugin-Description" value="Shows the elevation profile and some statistical data of a GPX track."/>
    100                 <attribute name="de_Plugin-Description" value="Zeigt das Höhenprofil und statistische Werte eines GPX-Tracks."/>
     95                <attribute name="de_Plugin-Description" value="Zeigt das Höhenprofil und statistische Werte eines GPX-Tracks."/>
    10196                <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/wiki/JOSM/Plugins/ElevationProfile"/>
    10297                <attribute name="Plugin-Mainversion" value="3835"/>
    10398                <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
    104                 <attribute name="Plugin-Icon" value="images/elevation.png"/>
     99                <attribute name="Plugin-Icon" value="images/elevation.png"/>
    105100            </manifest>
    106         </jar>       
     101        </jar>
    107102    </target>
    108 
    109103    <!--
    110104    **********************************************************
     
    115109    -->
    116110    <target name="revision">
    117                 <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
    118                     <env key="LANG" value="C"/>
    119                     <arg value="info"/>
    120                     <arg value="--xml"/>
    121                     <arg value="build.xml"/>
    122                 </exec>
    123         <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
    124         <echo message="Revision: ${version.entry.commit.revision}"/>
    125         <delete file="REVISION"/>
    126         </target>
    127 
     111        <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
     112            <env key="LANG" value="C"/>
     113            <arg value="info"/>
     114            <arg value="--xml"/>
     115            <arg value="build.xml"/>
     116        </exec>
     117        <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
     118        <echo message="Revision: ${version.entry.commit.revision}"/>
     119        <delete file="REVISION"/>
     120    </target>
    128121    <!--
    129122    **********************************************************
     
    135128        <delete file="${plugin.jar}"/>
    136129    </target>
    137 
    138130    <!--
    139131    **********************************************************
     
    147139                <os family="windows"/>
    148140            </and>
    149         </condition>           
     141        </condition>
    150142        <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
    151143    </target>
  • applications/editors/josm/plugins/FastDraw/build.xml

    r26071 r26174  
    1 <?xml version="1.0" encoding="UTF-8"?>
     1<?xml version="1.0" encoding="utf-8"?>
    22<!--
    33** This is a template build file for a JOSM  plugin.
     
    2929-->
    3030<project name="FastDraw" default="dist" basedir=".">
    31 
    32         <!-- enter the SVN commit message -->
    33         <property name="commit.message" value="FastDraw: plugin icon" />
    34         <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    35         <property name="plugin.main.version" value="3835" />
    36 
    37         <!--
     31    <!-- enter the SVN commit message -->
     32    <property name="commit.message" value="FastDraw: plugin icon"/>
     33    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
     34    <property name="plugin.main.version" value="3835"/>
     35    <!--
    3836      ************************************************
    3937      ** should not be necessary to change the following properties
    4038     -->
    41         <property name="josm" location="../../core/dist/josm-custom.jar" />
    42     <property name="josm_location" value="../../core/dist" />
    43        
    44         <property name="plugin.build.dir" value="build" />
    45         <property name="plugin.src.dir" value="src" />
    46         <!-- this is the directory where the plugin jar is copied to -->
    47         <property name="plugin.dist.dir" value="../../dist" />
    48         <property name="ant.build.javac.target" value="1.5" />
    49         <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar" />
    50 
    51         <!--
     39    <property name="josm" location="../../core/dist/josm-custom.jar"/>
     40    <property name="josm_location" value="../../core/dist"/>
     41    <property name="plugin.build.dir" value="build"/>
     42    <property name="plugin.src.dir" value="src"/>
     43    <!-- this is the directory where the plugin jar is copied to -->
     44    <property name="plugin.dist.dir" value="../../dist"/>
     45    <property name="ant.build.javac.target" value="1.5"/>
     46    <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/>
     47    <!--
    5248    **********************************************************
    5349    ** init - initializes the build
    5450    **********************************************************
    5551    -->
    56         <target name="init">
    57                 <mkdir dir="${plugin.build.dir}" />
    58         </target>
    59 
    60         <!--
     52    <target name="init">
     53        <mkdir dir="${plugin.build.dir}"/>
     54    </target>
     55    <!--
    6156    **********************************************************
    6257    ** compile - complies the source tree
    6358    **********************************************************
    6459    -->
    65         <target name="compile" depends="init">
    66                 <echo message="compiling sources for  ${plugin.jar} ... " />
    67                 <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}">
    68                         <compilerarg value="-Xlint:deprecation" />
    69                         <compilerarg value="-Xlint:unchecked" />
    70                 </javac>
    71         </target>
    72 
    73         <!--
     60    <target name="compile" depends="init">
     61        <echo message="compiling sources for  ${plugin.jar} ... "/>
     62        <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}">
     63            <compilerarg value="-Xlint:deprecation"/>
     64            <compilerarg value="-Xlint:unchecked"/>
     65        </javac>
     66    </target>
     67    <!--
    7468    **********************************************************
    7569    ** dist - creates the plugin jar
    7670    **********************************************************
    7771    -->
    78         <target name="dist" depends="compile, revision">
    79                 <echo message="creating ${ant.project.name}.jar ... " />
    80                 <copy todir="${plugin.build.dir}/resources">
    81                         <fileset dir="resources" />
    82                 </copy>
    83                 <copy todir="${plugin.build.dir}/images">
    84                         <fileset dir="images" />
    85                 </copy>
    86                 <copy todir="${plugin.build.dir}">
    87                         <fileset dir=".">
    88                                 <include name="README" />
    89                                 <include name="LICENSE" />
    90                         </fileset>
    91                 </copy>
    92                 <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
    93                         <!--
     72    <target name="dist" depends="compile, revision">
     73        <echo message="creating ${ant.project.name}.jar ... "/>
     74        <copy todir="${plugin.build.dir}/resources">
     75            <fileset dir="resources"/>
     76        </copy>
     77        <copy todir="${plugin.build.dir}/images">
     78            <fileset dir="images"/>
     79        </copy>
     80        <copy todir="${plugin.build.dir}/data">
     81            <fileset dir="data"/>
     82        </copy>
     83        <copy todir="${plugin.build.dir}">
     84            <fileset dir=".">
     85                <include name="README"/>
     86                <include name="LICENSE"/>
     87            </fileset>
     88        </copy>
     89        <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
     90            <!--
    9491        ************************************************
    9592        ** configure these properties. Most of them will be copied to the plugins
     
    9996        ************************************************
    10097    -->
    101                         <manifest>
    102                                 <attribute name="Author" value="Alexei Kasatkin" />
    103                                 <attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.fastdraw.FastDrawingPlugin" />
    104                                 <attribute name="Plugin-Date" value="${version.entry.commit.date}" />
    105                                 <attribute name="Plugin-Icon" value="images/favicon.png" />
    106                                 <attribute name="Plugin-Description" value="Fast drawing ways by mouse" />
    107                                 <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/wiki/JOSM/Plugins/FastDraw" />
    108                                 <attribute name="ru_Plugin-Link" value="http://wiki.openstreetmap.org/wiki/RU:JOSM/Plugins/FastDraw" />
    109                                 <attribute name="Plugin-Mainversion" value="${plugin.main.version}" />
    110                                 <attribute name="Plugin-Version" value="${version.entry.commit.revision}" />
    111                         </manifest>
    112                 </jar>
    113         </target>
    114 
    115         <!--
     98            <manifest>
     99                <attribute name="Author" value="Alexei Kasatkin"/>
     100                <attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.fastdraw.FastDrawingPlugin"/>
     101                <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
     102                <attribute name="Plugin-Icon" value="images/favicon.png"/>
     103                <attribute name="Plugin-Description" value="Fast drawing ways by mouse"/>
     104                <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/wiki/JOSM/Plugins/FastDraw"/>
     105                <attribute name="ru_Plugin-Link" value="http://wiki.openstreetmap.org/wiki/RU:JOSM/Plugins/FastDraw"/>
     106                <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
     107                <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
     108            </manifest>
     109        </jar>
     110    </target>
     111    <!--
    116112    **********************************************************
    117113    ** revision - extracts the current revision number for the
     
    120116    **********************************************************
    121117    -->
    122         <target name="revision">
    123 
    124                 <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
    125                         <env key="LANG" value="C" />
    126                         <arg value="info" />
    127                         <arg value="--xml" />
    128                         <arg value="." />
    129                 </exec>
    130                 <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true" />
    131                 <delete file="REVISION" />
    132         </target>
    133 
    134         <!--
     118    <target name="revision">
     119        <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
     120            <env key="LANG" value="C"/>
     121            <arg value="info"/>
     122            <arg value="--xml"/>
     123            <arg value="."/>
     124        </exec>
     125        <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
     126        <delete file="REVISION"/>
     127    </target>
     128    <!--
    135129    **********************************************************
    136130    ** clean - clean up the build environment
    137131    **********************************************************
    138132    -->
    139         <target name="clean">
    140                 <delete dir="${plugin.build.dir}" />
    141                 <delete file="${plugin.jar}" />
    142         </target>
    143 
    144         <!--
     133    <target name="clean">
     134        <delete dir="${plugin.build.dir}"/>
     135        <delete file="${plugin.jar}"/>
     136    </target>
     137    <!--
    145138    **********************************************************
    146139    ** install - install the plugin in your local JOSM installation
    147140    **********************************************************
    148141    -->
    149         <target name="install" depends="dist">
    150                 <property environment="env" />
    151                 <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
    152                         <and>
    153                                 <os family="windows" />
    154                         </and>
    155                 </condition>
    156                 <copy file="${plugin.jar}" todir="${josm.plugins.dir}" force="true"/>
    157         </target>
    158 
    159 
    160         <!--
     142    <target name="install" depends="dist">
     143        <property environment="env"/>
     144        <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
     145            <and>
     146                <os family="windows"/>
     147            </and>
     148        </condition>
     149        <copy file="${plugin.jar}" todir="${josm.plugins.dir}" force="true"/>
     150    </target>
     151    <!--
    161152    ************************** Publishing the plugin ***********************************
    162153    -->
    163         <!--
     154    <!--
    164155        ** extracts the JOSM release for the JOSM version in ../core and saves it in the
    165156        ** property ${coreversion.info.entry.revision}
    166157        **
    167158        -->
    168         <target name="core-info">
    169                 <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
    170                         <env key="LANG" value="C" />
    171                         <arg value="info" />
    172                         <arg value="--xml" />
    173                         <arg value="../../core" />
    174                 </exec>
    175                 <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true" />
    176                 <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
    177                 <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
    178                 <delete file="core.info.xml" />
    179         </target>
    180 
    181         <!--
     159    <target name="core-info">
     160        <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
     161            <env key="LANG" value="C"/>
     162            <arg value="info"/>
     163            <arg value="--xml"/>
     164            <arg value="../../core"/>
     165        </exec>
     166        <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
     167        <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
     168        <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
     169        <delete file="core.info.xml"/>
     170    </target>
     171    <!--
    182172        ** commits the source tree for this plugin
    183173        -->
    184         <target name="commit-current">
    185                 <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
    186                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    187                         <env key="LANG" value="C" />
    188                         <arg value="commit" />
    189                         <arg value="-m '${commit.message}'" />
    190                         <arg value="." />
    191                 </exec>
    192         </target>
    193 
    194         <!--
     174    <target name="commit-current">
     175        <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
     176        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     177            <env key="LANG" value="C"/>
     178            <arg value="commit"/>
     179            <arg value="-m '${commit.message}'"/>
     180            <arg value="."/>
     181        </exec>
     182    </target>
     183    <!--
    195184        ** updates (svn up) the source tree for this plugin
    196185        -->
    197         <target name="update-current">
    198                 <echo>Updating plugin source ...</echo>
    199                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    200                         <env key="LANG" value="C" />
    201                         <arg value="up" />
    202                         <arg value="." />
    203                 </exec>
    204                 <echo>Updating ${plugin.jar} ...</echo>
    205                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    206                         <env key="LANG" value="C" />
    207                         <arg value="up" />
    208                         <arg value="../dist/${plugin.jar}" />
    209                 </exec>
    210         </target>
    211 
    212         <!--
     186    <target name="update-current">
     187        <echo>Updating plugin source ...</echo>
     188        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     189            <env key="LANG" value="C"/>
     190            <arg value="up"/>
     191            <arg value="."/>
     192        </exec>
     193        <echo>Updating ${plugin.jar} ...</echo>
     194        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     195            <env key="LANG" value="C"/>
     196            <arg value="up"/>
     197            <arg value="../dist/${plugin.jar}"/>
     198        </exec>
     199    </target>
     200    <!--
    213201        ** commits the plugin.jar
    214202        -->
    215         <target name="commit-dist">
    216                 <echo>
     203    <target name="commit-dist">
     204        <echo>
    217205    ***** Properties of published ${plugin.jar} *****
    218206    Commit message    : '${commit.message}'                   
     
    224212    Now commiting ${plugin.jar} ...
    225213    </echo>
    226                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    227                         <env key="LANG" value="C" />
    228                         <arg value="-m '${commit.message}'" />
    229                         <arg value="commit" />
    230                         <arg value="${plugin.jar}" />
    231                 </exec>
    232         </target>
    233 
    234         <!-- ** make sure svn is present as a command line tool ** -->
    235         <target name="ensure-svn-present">
    236                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
    237                         <env key="LANG" value="C" />
    238                         <arg value="--version" />
    239                 </exec>
    240                 <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
    241                         <!-- return code not set at all? Most likely svn isn't installed -->
    242                         <condition>
    243                                 <not>
    244                                         <isset property="svn.exit.code" />
    245                                 </not>
    246                         </condition>
    247                 </fail>
    248                 <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
    249                         <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
    250                         <condition>
    251                                 <isfailure code="${svn.exit.code}" />
    252                         </condition>
    253                 </fail>
    254         </target>
    255 
    256         <target name="dist_and_launch" depends="clean,dist">
    257                 <copy file="${plugin.jar}" tofile="${josm_location}/appdata/JOSM/plugins/${ant.project.name}.jar" />
    258                 <exec executable="${josm_location}/josm-custom-launch.bat" />
    259         </target>
    260 
    261         <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
    262         </target>
    263         <target name="runjosm" depends="install">
    264                 <java jar="${josm}" fork="true">
     214        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     215            <env key="LANG" value="C"/>
     216            <arg value="-m '${commit.message}'"/>
     217            <arg value="commit"/>
     218            <arg value="${plugin.jar}"/>
     219        </exec>
     220    </target>
     221    <!-- ** make sure svn is present as a command line tool ** -->
     222    <target name="ensure-svn-present">
     223        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
     224            <env key="LANG" value="C"/>
     225            <arg value="--version"/>
     226        </exec>
     227        <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
     228            <!-- return code not set at all? Most likely svn isn't installed -->
     229            <condition>
     230                <not>
     231                    <isset property="svn.exit.code"/>
     232                </not>
     233            </condition>
     234        </fail>
     235        <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
     236            <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
     237            <condition>
     238                <isfailure code="${svn.exit.code}"/>
     239            </condition>
     240        </fail>
     241    </target>
     242    <target name="dist_and_launch" depends="clean,dist">
     243        <copy file="${plugin.jar}" tofile="${josm_location}/appdata/JOSM/plugins/${ant.project.name}.jar"/>
     244        <exec executable="${josm_location}/josm-custom-launch.bat"/>
     245    </target>
     246    <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
     247    </target>
     248    <target name="runjosm" depends="install">
     249        <java jar="${josm}" fork="true">
    265250            <arg line="../../core/data_nodist/restriction.osm"/>
    266251        </java>
    267         </target>
    268 
     252    </target>
    269253</project>
  • applications/editors/josm/plugins/FixAddresses/build.xml

    r25374 r26174  
    1 <?xml version="1.0" encoding="UTF-8"?>
     1<?xml version="1.0" encoding="utf-8"?>
    22<!--
    33** This is a template build file for a JOSM  plugin.
     
    2626      ** should not be necessary to change the following properties
    2727     -->
    28     <property name="josm"          location="../../core/dist/josm-custom.jar"/>
    29         <property name="josm_3529"    location="../../core/dist/3529/josm-tested.jar"/>
    30     <property name="plugin.build.dir"       value="build"/>
    31     <property name="plugin.src.dir"         value="src"/>
     28    <property name="josm" location="../../core/dist/josm-custom.jar"/>
     29    <property name="josm_3529" location="../../core/dist/3529/josm-tested.jar"/>
     30    <property name="plugin.build.dir" value="build"/>
     31    <property name="plugin.src.dir" value="src"/>
    3232    <!-- this is the directory where the plugin jar is copied to -->
    33     <property name="plugin.dist.dir"        value="../../dist"/>
     33    <property name="plugin.dist.dir" value="../../dist"/>
    3434    <property name="ant.build.javac.target" value="1.5"/>
    35     <property name="plugin.jar"             value="${plugin.dist.dir}/${ant.project.name}.jar"/>
    36 
     35    <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/>
    3736    <!--
    3837    **********************************************************
     
    4140    -->
    4241    <target name="init">
    43         <mkdir dir="${plugin.build.dir}"/>     
     42        <mkdir dir="${plugin.build.dir}"/>
    4443    </target>
    45 
    4644    <!--
    4745    **********************************************************
     
    5654        </javac>
    5755    </target>
    58 
    5956    <!--
    6057    **********************************************************
     
    6360    -->
    6461    <target name="dist" depends="compile,revision">
    65         <mkdir dir="${plugin.dist.dir}"/>
     62        <mkdir dir="${plugin.dist.dir}"/>
    6663        <echo message="creating ${plugin.jar} ... "/>
    6764        <copy todir="${plugin.build.dir}/resources">
     
    7168            <fileset dir="images"/>
    7269        </copy>
     70        <copy todir="${plugin.build.dir}/data">
     71            <fileset dir="data"/>
     72        </copy>
    7373        <copy todir="${plugin.build.dir}">
    7474            <fileset dir=".">
    75                 <include name="README" />
    76                 <include name="GPL-v2.0.txt" />
    77                 <include name="GPL-v3.0.txt" />
     75                <include name="README"/>
     76                <include name="GPL-v2.0.txt"/>
     77                <include name="GPL-v3.0.txt"/>
    7878            </fileset>
    7979        </copy>
    8080        <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
    81     <!--
     81            <!--
    8282        ************************************************
    8383        ** configure these properties. Most of them will be copied to the plugins
     
    9292                <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
    9393                <attribute name="Plugin-Description" value="Finds and fixes invalid street addresses in a comfortable way."/>
    94                 <attribute name="de_Plugin-Description" value="Findet ungültige Addressen und bietet Unterstützung zur deren Korrektur."/>
     94                <attribute name="de_Plugin-Description" value="Findet ungültige Addressen und bietet Unterstützung zur deren Korrektur."/>
    9595                <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/wiki/JOSM/Plugins/FixAddresses"/>
    9696                <attribute name="Plugin-Mainversion" value="3835"/>
    9797                <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
    98                 <attribute name="Plugin-Icon" value="images/fixaddresses.png"/>
     98                <attribute name="Plugin-Icon" value="images/fixaddresses.png"/>
    9999            </manifest>
    100         </jar>       
     100        </jar>
    101101    </target>
    102 
    103102    <!--
    104103    **********************************************************
     
    109108    -->
    110109    <target name="revision">
    111                 <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
    112                     <env key="LANG" value="C"/>
    113                     <arg value="info"/>
    114                     <arg value="--xml"/>
    115                     <arg value="."/>
    116                 </exec>
    117         <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
    118         <echo message="Revision: ${version.entry.commit.revision}"/>
    119         <delete file="REVISION"/>
    120         </target>
    121 
     110        <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
     111            <env key="LANG" value="C"/>
     112            <arg value="info"/>
     113            <arg value="--xml"/>
     114            <arg value="."/>
     115        </exec>
     116        <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
     117        <echo message="Revision: ${version.entry.commit.revision}"/>
     118        <delete file="REVISION"/>
     119    </target>
    122120    <!--
    123121    **********************************************************
     
    129127        <delete file="${plugin.jar}"/>
    130128    </target>
    131 
    132129    <!--
    133130    **********************************************************
  • applications/editors/josm/plugins/ImportImagePlugin/build.xml

    r25934 r26174  
    1 <?xml version="1.0" encoding="UTF-8"?>
     1<?xml version="1.0" encoding="utf-8"?>
    22<!--
    33** This is a template build file for a JOSM  plugin.
     
    2929-->
    3030<project name="ImportImagePlugin" default="dist" basedir=".">
    31 
    32         <!-- enter the SVN commit message -->
    33         <property name="commit.message" value="use consistent plugin name (don't mix up the words)" />
    34         <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    35         <property name="plugin.main.version" value="4065" />
    36 
    37 
    38         <!--
     31    <!-- enter the SVN commit message -->
     32    <property name="commit.message" value="use consistent plugin name (don't mix up the words)"/>
     33    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
     34    <property name="plugin.main.version" value="4065"/>
     35    <!--
    3936      ************************************************
    4037      ** should not be necessary to change the following properties
    4138     -->
    42         <property name="josm"                   location="../../core/dist/josm-custom.jar"/>
    43         <property name="plugin.build.dir"       value="build"/>
    44         <property name="plugin.src.dir"         value="src"/>
    45         <!-- this is the directory where the plugin jar is copied to -->
    46         <property name="plugin.dist.dir"        value="../../dist"/>
    47         <property name="ant.build.javac.target" value="1.5"/>
    48         <property name="plugin.dist.dir"        value="../../dist"/>
    49         <property name="plugin.jar"             value="${plugin.dist.dir}/${ant.project.name}.jar"/>
    50 
    51         <!--
     39    <property name="josm" location="../../core/dist/josm-custom.jar"/>
     40    <property name="plugin.build.dir" value="build"/>
     41    <property name="plugin.src.dir" value="src"/>
     42    <!-- this is the directory where the plugin jar is copied to -->
     43    <property name="plugin.dist.dir" value="../../dist"/>
     44    <property name="ant.build.javac.target" value="1.5"/>
     45    <property name="plugin.dist.dir" value="../../dist"/>
     46    <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/>
     47    <!--
    5248    **********************************************************
    5349    ** init - initializes the build
    5450    **********************************************************
    5551    -->
    56         <target name="init">
    57                 <mkdir dir="${plugin.build.dir}"/>
    58         </target>
    59 
    60         <!--
     52    <target name="init">
     53        <mkdir dir="${plugin.build.dir}"/>
     54    </target>
     55    <!--
    6156    **********************************************************
    6257    ** compile - complies the source tree
    6358    **********************************************************
    6459    -->
    65         <target name="compile" depends="init">
    66                 <echo message="compiling sources for  ${plugin.jar} ... "/>
    67                 <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}">
     60    <target name="compile" depends="init">
     61        <echo message="compiling sources for  ${plugin.jar} ... "/>
     62        <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}">
    6863            <classpath>
    6964                <pathelement location="${josm}"/>
     
    7267                </fileset>
    7368            </classpath>
    74                         <compilerarg value="-Xlint:deprecation"/>
    75                         <compilerarg value="-Xlint:unchecked"/>
    76                 </javac>
    77         </target>
    78 
    79         <!--
     69            <compilerarg value="-Xlint:deprecation"/>
     70            <compilerarg value="-Xlint:unchecked"/>
     71        </javac>
     72    </target>
     73    <!--
    8074    **********************************************************
    8175    ** dist - creates the plugin jar
    8276    **********************************************************
    8377    -->
    84         <target name="dist" depends="compile,revision">
    85                 <echo message="creating ${ant.project.name}.jar ... "/>
    86                
    87                 <copy todir="${plugin.build.dir}/lib">
    88                         <fileset dir="lib">
    89                                   <not>
    90                                     <filename name="log4j-1.2.12.jar"/>
    91                                   </not>
    92                         </fileset>
    93                 </copy>
     78    <target name="dist" depends="compile,revision">
     79        <echo message="creating ${ant.project.name}.jar ... "/>
     80        <copy todir="${plugin.build.dir}/lib">
     81            <fileset dir="lib">
     82                <not>
     83                    <filename name="log4j-1.2.12.jar"/>
     84                </not>
     85            </fileset>
     86        </copy>
    9487        <unjar src="lib/log4j-1.2.12.jar" dest="${plugin.build.dir}"/>
    95                 <copy todir="${plugin.build.dir}/images">
    96                         <fileset dir="images"/>
    97                 </copy>
    98                 <copy todir="${plugin.build.dir}/resources">
    99                         <fileset dir="resources"/>
    100                 </copy>
    101                 <copy todir="${plugin.build.dir}">
    102                         <fileset dir=".">
    103                                 <include name="README" />
    104                                 <include name="LICENSE" />
    105                         </fileset>
    106                 </copy>
    107                
    108                 <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
    109                         <!--
     88        <copy todir="${plugin.build.dir}/images">
     89            <fileset dir="images"/>
     90        </copy>
     91        <copy todir="${plugin.build.dir}/data">
     92            <fileset dir="data"/>
     93        </copy>
     94        <copy todir="${plugin.build.dir}/resources">
     95            <fileset dir="resources"/>
     96        </copy>
     97        <copy todir="${plugin.build.dir}">
     98            <fileset dir=".">
     99                <include name="README"/>
     100                <include name="LICENSE"/>
     101            </fileset>
     102        </copy>
     103        <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
     104            <!--
    110105        ************************************************
    111106        ** configure these properties. Most of them will be copied to the plugins
     
    115110        ************************************************
    116111    -->
    117 
    118                         <manifest>
     112            <manifest>
    119113                <attribute name="Author" value="Christoph Beekmans, Fabian Kowitz, Anna Robaszkiewicz, Oliver Kuhn, Martin Ulitzny"/>
    120114                <attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.ImportImagePlugin.ImportImagePlugin"/>
     
    124118                <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
    125119                <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
    126                         </manifest>
    127                 </jar>
    128         </target>
    129 
    130         <!--
     120            </manifest>
     121        </jar>
     122    </target>
     123    <!--
    131124    **********************************************************
    132125    ** revision - extracts the current revision number for the
     
    135128    **********************************************************
    136129    -->
    137         <target name="revision">
    138 
    139                 <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
    140                         <env key="LANG" value="C"/>
    141                         <arg value="info"/>
    142                         <arg value="--xml"/>
    143                         <arg value="."/>
    144                 </exec>
    145                 <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
    146                 <delete file="REVISION"/>
    147         </target>
    148 
    149         <!--
     130    <target name="revision">
     131        <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
     132            <env key="LANG" value="C"/>
     133            <arg value="info"/>
     134            <arg value="--xml"/>
     135            <arg value="."/>
     136        </exec>
     137        <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
     138        <delete file="REVISION"/>
     139    </target>
     140    <!--
    150141    **********************************************************
    151142    ** clean - clean up the build environment
    152143    **********************************************************
    153144    -->
    154         <target name="clean">
    155                 <delete dir="${plugin.build.dir}"/>
    156                 <delete file="${plugin.jar}"/>
    157         </target>
    158 
    159         <!--
     145    <target name="clean">
     146        <delete dir="${plugin.build.dir}"/>
     147        <delete file="${plugin.jar}"/>
     148    </target>
     149    <!--
    160150    **********************************************************
    161151    ** install - install the plugin in your local JOSM installation
    162152    **********************************************************
    163153    -->
    164         <target name="install" depends="dist">
    165                 <property environment="env"/>
    166                 <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
    167                         <and>
    168                                 <os family="windows"/>
    169                         </and>
    170                 </condition>
    171                 <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
    172         </target>
    173 
    174 
    175         <!--
    176         ************************** Publishing the plugin ***********************************
    177         -->
    178         <!--
    179                 ** extracts the JOSM release for the JOSM version in ../core and saves it in the
    180                 ** property ${coreversion.info.entry.revision}
    181                 **
    182                 -->
    183         <target name="core-info">
    184                 <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
    185                         <env key="LANG" value="C"/>
    186                         <arg value="info"/>
    187                         <arg value="--xml"/>
    188                         <arg value="../../core"/>
    189                 </exec>
    190                 <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
    191                 <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
    192                 <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
    193                 <delete file="core.info.xml" />
    194         </target>
    195 
    196         <!--
    197                 ** commits the source tree for this plugin
    198                 -->
    199         <target name="commit-current">
    200                 <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
    201                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    202                         <env key="LANG" value="C"/>
    203                         <arg value="commit"/>
    204                         <arg value="-m '${commit.message}'"/>
    205                         <arg value="."/>
    206                 </exec>
    207         </target>
    208 
    209         <!--
    210                 ** updates (svn up) the source tree for this plugin
    211                 -->
    212         <target name="update-current">
    213                 <echo>Updating plugin source ...</echo>
    214                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    215                         <env key="LANG" value="C"/>
    216                         <arg value="up"/>
    217                         <arg value="."/>
    218                 </exec>
    219                 <echo>Updating ${plugin.jar} ...</echo>
    220                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    221                         <env key="LANG" value="C"/>
    222                         <arg value="up"/>
    223                         <arg value="../dist/${plugin.jar}"/>
    224                 </exec>
    225         </target>
    226 
    227         <!--
    228                 ** commits the plugin.jar
    229                 -->
    230         <target name="commit-dist">
    231                 <echo>
    232         ***** Properties of published ${plugin.jar} *****
    233         Commit message    : '${commit.message}'                                 
    234         Plugin-Mainversion: ${plugin.main.version}
    235         JOSM build version: ${coreversion.info.entry.revision}
    236         Plugin-Version    : ${version.entry.commit.revision}
    237         ***** / Properties of published ${plugin.jar} *****                                     
    238                                                
    239         Now commiting ${plugin.jar} ...
    240         </echo>
    241                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    242                         <env key="LANG" value="C"/>
    243                         <arg value="-m '${commit.message}'"/>
    244                         <arg value="commit"/>
    245                         <arg value="${plugin.jar}"/>
    246                 </exec>
    247         </target>
    248 
    249         <!-- ** make sure svn is present as a command line tool ** -->
    250         <target name="ensure-svn-present">
    251                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
    252                         <env key="LANG" value="C" />
    253                         <arg value="--version" />
    254                 </exec>
    255                 <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
    256                         <!-- return code not set at all? Most likely svn isn't installed -->
    257                         <condition>
    258                                 <not>
    259                                         <isset property="svn.exit.code" />
    260                                 </not>
    261                         </condition>
    262                 </fail>
    263                 <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
    264                         <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
    265                         <condition>
    266                                 <isfailure code="${svn.exit.code}" />
    267                         </condition>
    268                 </fail>
    269         </target>
    270 
    271         <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
    272         </target>
    273        
    274         <target name="unjar-test" >
     154    <target name="install" depends="dist">
     155        <property environment="env"/>
     156        <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
     157            <and>
     158                <os family="windows"/>
     159            </and>
     160        </condition>
     161        <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
     162    </target>
     163    <!--
     164    ************************** Publishing the plugin ***********************************
     165    -->
     166    <!--
     167        ** extracts the JOSM release for the JOSM version in ../core and saves it in the
     168        ** property ${coreversion.info.entry.revision}
     169        **
     170        -->
     171    <target name="core-info">
     172        <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
     173            <env key="LANG" value="C"/>
     174            <arg value="info"/>
     175            <arg value="--xml"/>
     176            <arg value="../../core"/>
     177        </exec>
     178        <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
     179        <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
     180        <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
     181        <delete file="core.info.xml"/>
     182    </target>
     183    <!--
     184        ** commits the source tree for this plugin
     185        -->
     186    <target name="commit-current">
     187        <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
     188        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     189            <env key="LANG" value="C"/>
     190            <arg value="commit"/>
     191            <arg value="-m '${commit.message}'"/>
     192            <arg value="."/>
     193        </exec>
     194    </target>
     195    <!--
     196        ** updates (svn up) the source tree for this plugin
     197        -->
     198    <target name="update-current">
     199        <echo>Updating plugin source ...</echo>
     200        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     201            <env key="LANG" value="C"/>
     202            <arg value="up"/>
     203            <arg value="."/>
     204        </exec>
     205        <echo>Updating ${plugin.jar} ...</echo>
     206        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     207            <env key="LANG" value="C"/>
     208            <arg value="up"/>
     209            <arg value="../dist/${plugin.jar}"/>
     210        </exec>
     211    </target>
     212    <!--
     213        ** commits the plugin.jar
     214        -->
     215    <target name="commit-dist">
     216        <echo>
     217    ***** Properties of published ${plugin.jar} *****
     218    Commit message    : '${commit.message}'                 
     219    Plugin-Mainversion: ${plugin.main.version}
     220    JOSM build version: ${coreversion.info.entry.revision}
     221    Plugin-Version    : ${version.entry.commit.revision}
     222    ***** / Properties of published ${plugin.jar} *****                 
     223                       
     224    Now commiting ${plugin.jar} ...
     225    </echo>
     226        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     227            <env key="LANG" value="C"/>
     228            <arg value="-m '${commit.message}'"/>
     229            <arg value="commit"/>
     230            <arg value="${plugin.jar}"/>
     231        </exec>
     232    </target>
     233    <!-- ** make sure svn is present as a command line tool ** -->
     234    <target name="ensure-svn-present">
     235        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
     236            <env key="LANG" value="C"/>
     237            <arg value="--version"/>
     238        </exec>
     239        <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
     240            <!-- return code not set at all? Most likely svn isn't installed -->
     241            <condition>
     242                <not>
     243                    <isset property="svn.exit.code"/>
     244                </not>
     245            </condition>
     246        </fail>
     247        <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
     248            <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
     249            <condition>
     250                <isfailure code="${svn.exit.code}"/>
     251            </condition>
     252        </fail>
     253    </target>
     254    <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
     255    </target>
     256    <target name="unjar-test">
    275257        <!--unjar dest="C:/Workspace_2/geotoolstest/lib/unjartest">
    276258            <fileset dir="lib"/>
    277259        </unjar-->
    278        
    279                         <jar destfile="C:/Workspace_2/geotoolstest/lib/unjartest/${ant.project.name}.jar" basedir="C:/Workspace_2/geotoolstest/lib/unjartest">
    280 
    281                         <manifest>
     260        <jar destfile="C:/Workspace_2/geotoolstest/lib/unjartest/${ant.project.name}.jar" basedir="C:/Workspace_2/geotoolstest/lib/unjartest">
     261            <manifest>
    282262                <attribute name="Author" value="Christoph Beekmans, Fabian Kowitz, Anna Robaszkiewicz, Oliver Kuhn, Martin Ulitzny"/>
    283263                <attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.CoveragePlugin.CoveragePlugin"/>
     
    287267                <attribute name="Plugin-Mainversion" value=".."/>
    288268                <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
    289                 <attribute name="Class-path" value=" . CoveragePlugin/lib/commons-beanutils-1.7.0.jar CoveragePlugin/lib/commons-pool-1.5.3.jar CoveragePlugin/lib/geoapi-2.3-M1.jar CoveragePlugin/lib/geoapi-pending-2.3-M1.jar CoveragePlugin/lib/geoapi.jar CoveragePlugin/lib/gt-api-2.6.0.jar CoveragePlugin/lib/gt-coverage-2.6.0.jar CoveragePlugin/lib/gt-epsg-extension-2.6.0.jar CoveragePlugin/lib/gt-epsg-hsql-2.6.0.jar CoveragePlugin/lib/gt-geotiff-2.6.0.jar CoveragePlugin/lib/gt-main-2.6.0.jar CoveragePlugin/lib/gt-metadata-2.6.0.jar CoveragePlugin/lib/gt-referencing-2.6.0.jar CoveragePlugin/lib/hsqldb-1.8.0.7.jar CoveragePlugin/lib/imageio-ext-tiff-1.0.4.jar CoveragePlugin/lib/imageio-ext-utilities-1.0.4.jar CoveragePlugin/lib/jai_codec-1.1.3.jar CoveragePlugin/lib/jai_core.jar CoveragePlugin/lib/jai_imageio-1.1.jar CoveragePlugin/lib/jdom-1.0.jar CoveragePlugin/lib/jsr-275-1.0-beta-2.jar CoveragePlugin/lib/jts-1.10.jar CoveragePlugin/lib/log4j-1.2.12.jar CoveragePlugin/lib/vecmath-1.3.2.jar" />
    290                         </manifest>
    291                 </jar>
    292         </target>
    293        
     269                <attribute name="Class-path" value=" . CoveragePlugin/lib/commons-beanutils-1.7.0.jar CoveragePlugin/lib/commons-pool-1.5.3.jar CoveragePlugin/lib/geoapi-2.3-M1.jar CoveragePlugin/lib/geoapi-pending-2.3-M1.jar CoveragePlugin/lib/geoapi.jar CoveragePlugin/lib/gt-api-2.6.0.jar CoveragePlugin/lib/gt-coverage-2.6.0.jar CoveragePlugin/lib/gt-epsg-extension-2.6.0.jar CoveragePlugin/lib/gt-epsg-hsql-2.6.0.jar CoveragePlugin/lib/gt-geotiff-2.6.0.jar CoveragePlugin/lib/gt-main-2.6.0.jar CoveragePlugin/lib/gt-metadata-2.6.0.jar CoveragePlugin/lib/gt-referencing-2.6.0.jar CoveragePlugin/lib/hsqldb-1.8.0.7.jar CoveragePlugin/lib/imageio-ext-tiff-1.0.4.jar CoveragePlugin/lib/imageio-ext-utilities-1.0.4.jar CoveragePlugin/lib/jai_codec-1.1.3.jar CoveragePlugin/lib/jai_core.jar CoveragePlugin/lib/jai_imageio-1.1.jar CoveragePlugin/lib/jdom-1.0.jar CoveragePlugin/lib/jsr-275-1.0-beta-2.jar CoveragePlugin/lib/jts-1.10.jar CoveragePlugin/lib/log4j-1.2.12.jar CoveragePlugin/lib/vecmath-1.3.2.jar"/>
     270            </manifest>
     271        </jar>
     272    </target>
    294273</project>
  • applications/editors/josm/plugins/ImproveWayAccuracy/build.xml

    r26061 r26174  
    1 <?xml version="1.0" encoding="UTF-8"?>
     1<?xml version="1.0" encoding="utf-8"?>
    22<!--
    33** This is a template build file for a JOSM  plugin.
     
    2929-->
    3030<project name="ImproveWayAccuracy" default="dist" basedir=".">
    31 
    32         <!-- enter the SVN commit message -->
    33         <property name="commit.message" value="Initial JOSM ImproveWayAccuracy plugin commit" />
    34         <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    35         <property name="plugin.main.version" value="3835" />
    36 
    37         <!--
     31    <!-- enter the SVN commit message -->
     32    <property name="commit.message" value="Initial JOSM ImproveWayAccuracy plugin commit"/>
     33    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
     34    <property name="plugin.main.version" value="3835"/>
     35    <!--
    3836      ************************************************
    3937      ** should not be necessary to change the following properties
    4038     -->
    41         <property name="josm" location="../../core/dist/josm-custom.jar" />
    42     <property name="josm_location" value="../../core/dist" />
    43        
    44         <property name="plugin.build.dir" value="build" />
    45         <property name="plugin.src.dir" value="src" />
    46         <!-- this is the directory where the plugin jar is copied to -->
    47         <property name="plugin.dist.dir" value="../../dist" />
    48         <property name="ant.build.javac.target" value="1.5" />
    49         <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar" />
    50 
    51         <!--
     39    <property name="josm" location="../../core/dist/josm-custom.jar"/>
     40    <property name="josm_location" value="../../core/dist"/>
     41    <property name="plugin.build.dir" value="build"/>
     42    <property name="plugin.src.dir" value="src"/>
     43    <!-- this is the directory where the plugin jar is copied to -->
     44    <property name="plugin.dist.dir" value="../../dist"/>
     45    <property name="ant.build.javac.target" value="1.5"/>
     46    <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/>
     47    <!--
    5248    **********************************************************
    5349    ** init - initializes the build
    5450    **********************************************************
    5551    -->
    56         <target name="init">
    57                 <mkdir dir="${plugin.build.dir}" />
    58         </target>
    59 
    60         <!--
     52    <target name="init">
     53        <mkdir dir="${plugin.build.dir}"/>
     54    </target>
     55    <!--
    6156    **********************************************************
    6257    ** compile - complies the source tree
    6358    **********************************************************
    6459    -->
    65         <target name="compile" depends="init">
    66                 <echo message="compiling sources for  ${plugin.jar} ... " />
    67                 <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}">
    68                         <compilerarg value="-Xlint:deprecation" />
    69                         <compilerarg value="-Xlint:unchecked" />
    70                 </javac>
    71         </target>
    72 
    73         <!--
     60    <target name="compile" depends="init">
     61        <echo message="compiling sources for  ${plugin.jar} ... "/>
     62        <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}">
     63            <compilerarg value="-Xlint:deprecation"/>
     64            <compilerarg value="-Xlint:unchecked"/>
     65        </javac>
     66    </target>
     67    <!--
    7468    **********************************************************
    7569    ** dist - creates the plugin jar
    7670    **********************************************************
    7771    -->
    78         <target name="dist" depends="compile, revision">
    79                 <echo message="creating ${ant.project.name}.jar ... " />
    80                 <copy todir="${plugin.build.dir}/resources">
    81                         <fileset dir="resources" />
    82                 </copy>
    83                 <copy todir="${plugin.build.dir}/images">
    84                         <fileset dir="images" />
    85                 </copy>
    86                 <copy todir="${plugin.build.dir}">
    87                         <fileset dir=".">
    88                                 <include name="README" />
    89                                 <include name="LICENSE" />
    90                         </fileset>
    91                 </copy>
    92                 <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
    93                         <!--
     72    <target name="dist" depends="compile, revision">
     73        <echo message="creating ${ant.project.name}.jar ... "/>
     74        <copy todir="${plugin.build.dir}/resources">
     75            <fileset dir="resources"/>
     76        </copy>
     77        <copy todir="${plugin.build.dir}/images">
     78            <fileset dir="images"/>
     79        </copy>
     80        <copy todir="${plugin.build.dir}/data">
     81            <fileset dir="data"/>
     82        </copy>
     83        <copy todir="${plugin.build.dir}">
     84            <fileset dir=".">
     85                <include name="README"/>
     86                <include name="LICENSE"/>
     87            </fileset>
     88        </copy>
     89        <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
     90            <!--
    9491        ************************************************
    9592        ** configure these properties. Most of them will be copied to the plugins
     
    9996        ************************************************
    10097    -->
    101                         <manifest>
    102                                 <attribute name="Author" value="Alexander Kachkaev" />
    103                                 <attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.iwa.IWAPlugin" />
    104                                 <attribute name="Plugin-Date" value="${version.entry.commit.date}" />
    105                                 <attribute name="Plugin-Icon" value="images/favicon.png" />
    106                                 <attribute name="Plugin-Description" value="Can be useful when you are improving accuracy of existing ways. The idea of the plugin is to substitute dragging and dropping nodes with clicking to quicken the editing process." />
    107                                 <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/wiki/JOSM/Plugins/ImproveWayAccuracy" />
    108                 <attribute name="ru_Plugin-Link" value="http://wiki.openstreetmap.org/wiki/RU:JOSM/Plugins/ImproveWayAccuracy" />
    109                                 <attribute name="Plugin-Mainversion" value="${plugin.main.version}" />
    110                                 <attribute name="Plugin-Version" value="${version.entry.commit.revision}" />
    111                         </manifest>
    112                 </jar>
    113         </target>
    114 
    115         <!--
     98            <manifest>
     99                <attribute name="Author" value="Alexander Kachkaev"/>
     100                <attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.iwa.IWAPlugin"/>
     101                <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
     102                <attribute name="Plugin-Icon" value="images/favicon.png"/>
     103                <attribute name="Plugin-Description" value="Can be useful when you are improving accuracy of existing ways. The idea of the plugin is to substitute dragging and dropping nodes with clicking to quicken the editing process."/>
     104                <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/wiki/JOSM/Plugins/ImproveWayAccuracy"/>
     105                <attribute name="ru_Plugin-Link" value="http://wiki.openstreetmap.org/wiki/RU:JOSM/Plugins/ImproveWayAccuracy"/>
     106                <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
     107                <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
     108            </manifest>
     109        </jar>
     110    </target>
     111    <!--
    116112    **********************************************************
    117113    ** revision - extracts the current revision number for the
     
    120116    **********************************************************
    121117    -->
    122         <target name="revision">
    123 
    124                 <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
    125                         <env key="LANG" value="C" />
    126                         <arg value="info" />
    127                         <arg value="--xml" />
    128                         <arg value="." />
    129                 </exec>
    130                 <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true" />
    131                 <delete file="REVISION" />
    132         </target>
    133 
    134         <!--
     118    <target name="revision">
     119        <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
     120            <env key="LANG" value="C"/>
     121            <arg value="info"/>
     122            <arg value="--xml"/>
     123            <arg value="."/>
     124        </exec>
     125        <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
     126        <delete file="REVISION"/>
     127    </target>
     128    <!--
    135129    **********************************************************
    136130    ** clean - clean up the build environment
    137131    **********************************************************
    138132    -->
    139         <target name="clean">
    140                 <delete dir="${plugin.build.dir}" />
    141                 <delete file="${plugin.jar}" />
    142         </target>
    143 
    144         <!--
     133    <target name="clean">
     134        <delete dir="${plugin.build.dir}"/>
     135        <delete file="${plugin.jar}"/>
     136    </target>
     137    <!--
    145138    **********************************************************
    146139    ** install - install the plugin in your local JOSM installation
    147140    **********************************************************
    148141    -->
    149         <target name="install" depends="dist">
    150                 <property environment="env" />
    151                 <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
    152                         <and>
    153                                 <os family="windows" />
    154                         </and>
    155                 </condition>
    156                 <copy file="${plugin.jar}" todir="${josm.plugins.dir}" />
    157         </target>
    158 
    159 
    160         <!--
     142    <target name="install" depends="dist">
     143        <property environment="env"/>
     144        <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
     145            <and>
     146                <os family="windows"/>
     147            </and>
     148        </condition>
     149        <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
     150    </target>
     151    <!--
    161152    ************************** Publishing the plugin ***********************************
    162153    -->
    163         <!--
     154    <!--
    164155        ** extracts the JOSM release for the JOSM version in ../core and saves it in the
    165156        ** property ${coreversion.info.entry.revision}
    166157        **
    167158        -->
    168         <target name="core-info">
    169                 <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
    170                         <env key="LANG" value="C" />
    171                         <arg value="info" />
    172                         <arg value="--xml" />
    173                         <arg value="../../core" />
    174                 </exec>
    175                 <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true" />
    176                 <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
    177                 <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
    178                 <delete file="core.info.xml" />
    179         </target>
    180 
    181         <!--
     159    <target name="core-info">
     160        <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
     161            <env key="LANG" value="C"/>
     162            <arg value="info"/>
     163            <arg value="--xml"/>
     164            <arg value="../../core"/>
     165        </exec>
     166        <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
     167        <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
     168        <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
     169        <delete file="core.info.xml"/>
     170    </target>
     171    <!--
    182172        ** commits the source tree for this plugin
    183173        -->
    184         <target name="commit-current">
    185                 <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
    186                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    187                         <env key="LANG" value="C" />
    188                         <arg value="commit" />
    189                         <arg value="-m '${commit.message}'" />
    190                         <arg value="." />
    191                 </exec>
    192         </target>
    193 
    194         <!--
     174    <target name="commit-current">
     175        <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
     176        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     177            <env key="LANG" value="C"/>
     178            <arg value="commit"/>
     179            <arg value="-m '${commit.message}'"/>
     180            <arg value="."/>
     181        </exec>
     182    </target>
     183    <!--
    195184        ** updates (svn up) the source tree for this plugin
    196185        -->
    197         <target name="update-current">
    198                 <echo>Updating plugin source ...</echo>
    199                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    200                         <env key="LANG" value="C" />
    201                         <arg value="up" />
    202                         <arg value="." />
    203                 </exec>
    204                 <echo>Updating ${plugin.jar} ...</echo>
    205                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    206                         <env key="LANG" value="C" />
    207                         <arg value="up" />
    208                         <arg value="../dist/${plugin.jar}" />
    209                 </exec>
    210         </target>
    211 
    212         <!--
     186    <target name="update-current">
     187        <echo>Updating plugin source ...</echo>
     188        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     189            <env key="LANG" value="C"/>
     190            <arg value="up"/>
     191            <arg value="."/>
     192        </exec>
     193        <echo>Updating ${plugin.jar} ...</echo>
     194        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     195            <env key="LANG" value="C"/>
     196            <arg value="up"/>
     197            <arg value="../dist/${plugin.jar}"/>
     198        </exec>
     199    </target>
     200    <!--
    213201        ** commits the plugin.jar
    214202        -->
    215         <target name="commit-dist">
    216                 <echo>
     203    <target name="commit-dist">
     204        <echo>
    217205    ***** Properties of published ${plugin.jar} *****
    218206    Commit message    : '${commit.message}'                   
     
    224212    Now commiting ${plugin.jar} ...
    225213    </echo>
    226                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    227                         <env key="LANG" value="C" />
    228                         <arg value="-m '${commit.message}'" />
    229                         <arg value="commit" />
    230                         <arg value="${plugin.jar}" />
    231                 </exec>
    232         </target>
    233 
    234         <!-- ** make sure svn is present as a command line tool ** -->
    235         <target name="ensure-svn-present">
    236                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
    237                         <env key="LANG" value="C" />
    238                         <arg value="--version" />
    239                 </exec>
    240                 <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
    241                         <!-- return code not set at all? Most likely svn isn't installed -->
    242                         <condition>
    243                                 <not>
    244                                         <isset property="svn.exit.code" />
    245                                 </not>
    246                         </condition>
    247                 </fail>
    248                 <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
    249                         <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
    250                         <condition>
    251                                 <isfailure code="${svn.exit.code}" />
    252                         </condition>
    253                 </fail>
    254         </target>
    255 
    256         <target name="dist_and_launch" depends="clean,dist">
    257                 <copy file="${plugin.jar}" tofile="${josm_location}/appdata/JOSM/plugins/${ant.project.name}.jar" />
    258                 <exec executable="${josm_location}/josm-custom-launch.bat" />
    259         </target>
    260 
    261         <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
    262         </target>
     214        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     215            <env key="LANG" value="C"/>
     216            <arg value="-m '${commit.message}'"/>
     217            <arg value="commit"/>
     218            <arg value="${plugin.jar}"/>
     219        </exec>
     220    </target>
     221    <!-- ** make sure svn is present as a command line tool ** -->
     222    <target name="ensure-svn-present">
     223        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
     224            <env key="LANG" value="C"/>
     225            <arg value="--version"/>
     226        </exec>
     227        <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
     228            <!-- return code not set at all? Most likely svn isn't installed -->
     229            <condition>
     230                <not>
     231                    <isset property="svn.exit.code"/>
     232                </not>
     233            </condition>
     234        </fail>
     235        <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
     236            <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
     237            <condition>
     238                <isfailure code="${svn.exit.code}"/>
     239            </condition>
     240        </fail>
     241    </target>
     242    <target name="dist_and_launch" depends="clean,dist">
     243        <copy file="${plugin.jar}" tofile="${josm_location}/appdata/JOSM/plugins/${ant.project.name}.jar"/>
     244        <exec executable="${josm_location}/josm-custom-launch.bat"/>
     245    </target>
     246    <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
     247    </target>
    263248</project>
  • applications/editors/josm/plugins/OpeningHoursEditor/build.xml

    r25190 r26174  
    1 <?xml version="1.0" encoding="UTF-8"?>
     1<?xml version="1.0" encoding="utf-8"?>
    22<!--
    33** This is a template build file for a JOSM  plugin.
     
    2929-->
    3030<project name="OpeningHoursEditor" default="dist" basedir=".">
    31 
    3231    <!-- enter the SVN commit message -->
    33     <property name="commit.message" value="fixed main version" />
     32    <property name="commit.message" value="fixed main version"/>
    3433    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    35         <property name="plugin.main.version" value="3835" />
    36 
    37 
     34    <property name="plugin.main.version" value="3835"/>
    3835    <!--
    3936      ************************************************
    4037      ** should not be necessary to change the following properties
    4138     -->
    42     <property name="josm"                   location="../../core/dist/josm-custom.jar"/>
    43     <property name="plugin.build.dir"       value="build"/>
    44     <property name="plugin.src.dir"         value="src"/>
     39    <property name="josm" location="../../core/dist/josm-custom.jar"/>
     40    <property name="plugin.build.dir" value="build"/>
     41    <property name="plugin.src.dir" value="src"/>
    4542    <!-- this is the directory where the plugin jar is copied to -->
    46     <property name="plugin.dist.dir"        value="../../dist"/>
     43    <property name="plugin.dist.dir" value="../../dist"/>
    4744    <property name="ant.build.javac.target" value="1.5"/>
    48     <property name="plugin.jar"             value="${plugin.dist.dir}/${ant.project.name}.jar"/>
    49 
    50 
    51         <!--
     45    <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/>
     46    <!--
    5247    **********************************************************
    5348    ** javacc-otc - compiles OpeningTimeCompiler
    5449    **
    55         ** can be changed see http://www.engr.mun.ca/~theo/JavaCC-FAQ/javacc-faq-moz.htm#tth_sEc2.5
    56     **********************************************************
    57     -->
    58         <target name="javacc-otc">
    59                 <echo message="compiling OpeningTimeCompiler with javacc ... " />
    60                 <exec executable="javacc" dir="src/org/openstreetmap/josm/plugins/ohe/parser/">
    61                         <arg value="OpeningTimeCompiler.jj" />
    62                 </exec>
    63         </target>
    64        
    65        
     50    ** can be changed see http://www.engr.mun.ca/~theo/JavaCC-FAQ/javacc-faq-moz.htm#tth_sEc2.5
     51    **********************************************************
     52    -->
     53    <target name="javacc-otc">
     54        <echo message="compiling OpeningTimeCompiler with javacc ... "/>
     55        <exec executable="javacc" dir="src/org/openstreetmap/josm/plugins/ohe/parser/">
     56            <arg value="OpeningTimeCompiler.jj"/>
     57        </exec>
     58    </target>
    6659    <!--
    6760    **********************************************************
     
    7265        <mkdir dir="${plugin.build.dir}"/>
    7366    </target>
    74 
    7567    <!--
    7668    **********************************************************
     
    8577        </javac>
    8678    </target>
    87 
    8879    <!--
    8980    **********************************************************
     
    9687            <fileset dir="images"/>
    9788        </copy>
     89        <copy todir="${plugin.build.dir}/data">
     90            <fileset dir="data"/>
     91        </copy>
    9892        <copy todir="${plugin.build.dir}">
    9993            <fileset dir=".">
    100                 <include name="README" />
    101                 <include name="LICENSE" />
     94                <include name="README"/>
     95                <include name="LICENSE"/>
    10296            </fileset>
    10397        </copy>
     
    111105        ************************************************
    112106    -->
    113                         <manifest>
    114                                 <attribute name="Author" value="Falko Thomale" />
    115                                 <attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.ohe.OhePlugin" />
    116                                 <attribute name="Plugin-Date" value="${version.entry.commit.date}" />
    117                                 <attribute name="Plugin-Description" value="extended options for editing opening_hours" />
     107            <manifest>
     108                <attribute name="Author" value="Falko Thomale"/>
     109                <attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.ohe.OhePlugin"/>
     110                <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
     111                <attribute name="Plugin-Description" value="extended options for editing opening_hours"/>
    118112                <attribute name="Plugin-Icon" value="images/opening_hours.png"/>
    119                                 <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/wiki/JOSM/Plugins/OpeningHoursEditor" />
    120                                 <attribute name="Plugin-Mainversion" value="${plugin.main.version}" />
    121                                 <attribute name="Plugin-Version" value="${version.entry.commit.revision}" />
    122                         </manifest>
     113                <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/wiki/JOSM/Plugins/OpeningHoursEditor"/>
     114                <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
     115                <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
     116            </manifest>
    123117        </jar>
    124118    </target>
    125 
    126119    <!--
    127120    **********************************************************
     
    132125    -->
    133126    <target name="revision">
    134 
    135127        <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
    136128            <env key="LANG" value="C"/>
     
    142134        <delete file="REVISION"/>
    143135    </target>
    144 
    145136    <!--
    146137    **********************************************************
     
    152143        <delete file="${plugin.jar}"/>
    153144    </target>
    154 
    155145    <!--
    156146    **********************************************************
     
    167157        <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
    168158    </target>
    169 
    170 
    171159    <!--
    172160    ************************** Publishing the plugin ***********************************
     
    187175        <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
    188176        <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
    189         <delete file="core.info.xml" />
    190     </target>
    191 
     177        <delete file="core.info.xml"/>
     178    </target>
    192179    <!--
    193180        ** commits the source tree for this plugin
     
    202189        </exec>
    203190    </target>
    204 
    205191    <!--
    206192        ** updates (svn up) the source tree for this plugin
     
    220206        </exec>
    221207    </target>
    222 
    223208    <!--
    224209        ** commits the plugin.jar
     
    242227        </exec>
    243228    </target>
    244 
    245229    <!-- ** make sure svn is present as a command line tool ** -->
    246230    <target name="ensure-svn-present">
    247231        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
    248             <env key="LANG" value="C" />
    249             <arg value="--version" />
     232            <env key="LANG" value="C"/>
     233            <arg value="--version"/>
    250234        </exec>
    251235        <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
     
    253237            <condition>
    254238                <not>
    255                     <isset property="svn.exit.code" />
     239                    <isset property="svn.exit.code"/>
    256240                </not>
    257241            </condition>
     
    260244            <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
    261245            <condition>
    262                 <isfailure code="${svn.exit.code}" />
     246                <isfailure code="${svn.exit.code}"/>
    263247            </condition>
    264248        </fail>
    265249    </target>
    266 
    267250    <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
    268251    </target>
  • applications/editors/josm/plugins/addrinterpolation/build.xml

    r25199 r26174  
    1 <?xml version="1.0" encoding="UTF-8"?>
     1<?xml version="1.0" encoding="utf-8"?>
    22<!--
    33** This is a template build file for a JOSM  plugin.
     
    2222-->
    2323<project name="AddrInterpolation" default="dist" basedir=".">
    24 
    25 
    26         <property name="commit.message" value="Impoved Icon" />
    27         <property name="plugin.main.version" value="3835" />
    28 
    29         <!--
     24    <property name="commit.message" value="Impoved Icon"/>
     25    <property name="plugin.main.version" value="3835"/>
     26    <!--
    3027      ************************************************
    3128      ** should not be necessary to change the following properties
    3229     -->
    33         <property name="josm"                   location="../../core/dist/josm-custom.jar"/>
    34         <property name="plugin.build.dir"       value="build"/>
    35         <property name="plugin.src.dir"         value="src"/>
    36         <!-- this is the directory where the plugin jar is copied to -->
    37         <property name="plugin.dist.dir"        value="../../dist"/>
    38         <property name="ant.build.javac.target" value="1.5"/>
    39         <property name="plugin.dist.dir"        value="../../dist"/>
    40         <property name="plugin.jar"             value="${plugin.dist.dir}/${ant.project.name}.jar"/>
    41 
    42         <!--
     30    <property name="josm" location="../../core/dist/josm-custom.jar"/>
     31    <property name="plugin.build.dir" value="build"/>
     32    <property name="plugin.src.dir" value="src"/>
     33    <!-- this is the directory where the plugin jar is copied to -->
     34    <property name="plugin.dist.dir" value="../../dist"/>
     35    <property name="ant.build.javac.target" value="1.5"/>
     36    <property name="plugin.dist.dir" value="../../dist"/>
     37    <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/>
     38    <!--
    4339    **********************************************************
    4440    ** init - initializes the build
    4541    **********************************************************
    4642    -->
    47         <target name="init">
    48                 <mkdir dir="${plugin.build.dir}"/>
    49         </target>
    50 
    51         <!--
     43    <target name="init">
     44        <mkdir dir="${plugin.build.dir}"/>
     45    </target>
     46    <!--
    5247    **********************************************************
    5348    ** compile - complies the source tree
    5449    **********************************************************
    5550    -->
    56         <target name="compile" depends="init">
    57                 <echo message="compiling sources for  ${plugin.jar} ... "/>
    58                 <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}">
    59                         <compilerarg value="-Xlint:deprecation"/>
    60                         <compilerarg value="-Xlint:unchecked"/>
    61                 </javac>
    62         </target>
    63 
    64         <!--
     51    <target name="compile" depends="init">
     52        <echo message="compiling sources for  ${plugin.jar} ... "/>
     53        <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}">
     54            <compilerarg value="-Xlint:deprecation"/>
     55            <compilerarg value="-Xlint:unchecked"/>
     56        </javac>
     57    </target>
     58    <!--
    6559    **********************************************************
    6660    ** dist - creates the plugin jar
    6761    **********************************************************
    6862    -->
    69         <target name="dist" depends="compile,revision">
    70                 <echo message="creating ${plugin.jar.name} ... "/>
    71                 <copy todir="${plugin.build.dir}/resources">
    72                         <fileset dir="resources"/>
    73                 </copy>
    74                 <copy todir="${plugin.build.dir}/images">
    75                         <fileset dir="images"/>
    76                 </copy>
    77                 <copy todir="${plugin.build.dir}">
    78                         <fileset dir=".">
    79                                 <include name="README" />
    80                                 <include name="LICENSE" />
    81                         </fileset>
    82                 </copy>
    83                 <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
    84                         <!--
     63    <target name="dist" depends="compile,revision">
     64        <echo message="creating ${plugin.jar.name} ... "/>
     65        <copy todir="${plugin.build.dir}/resources">
     66            <fileset dir="resources"/>
     67        </copy>
     68        <copy todir="${plugin.build.dir}/images">
     69            <fileset dir="images"/>
     70        </copy>
     71        <copy todir="${plugin.build.dir}/data">
     72            <fileset dir="data"/>
     73        </copy>
     74        <copy todir="${plugin.build.dir}">
     75            <fileset dir=".">
     76                <include name="README"/>
     77                <include name="LICENSE"/>
     78            </fileset>
     79        </copy>
     80        <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
     81            <!--
    8582        ************************************************
    8683        ** configure these properties. Most of them will be copied to the plugins
     
    9087        ************************************************
    9188    -->
    92                         <manifest>
    93                                 <attribute name="Author" value="Mike Nice"/>
    94                                 <attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.AddrInterpolation.AddrInterpolationPlugin"/>
    95                                 <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
    96                                 <attribute name="Plugin-Description" value="Group common Address Interpolation inputs in a single dialog, as well as an option to automatically generate individual house number nodes from a Way."/>
    97                                 <attribute name="Plugin-Icon" value="images/AddrInterpolation.png"/>
    98                                 <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/wiki/JOSM/Plugins/AddrInterpolation"/>
    99                                 <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
    100                                 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
    101                         </manifest>
    102                 </jar>
    103         </target>
    104 
    105         <!--
     89            <manifest>
     90                <attribute name="Author" value="Mike Nice"/>
     91                <attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.AddrInterpolation.AddrInterpolationPlugin"/>
     92                <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
     93                <attribute name="Plugin-Description" value="Group common Address Interpolation inputs in a single dialog, as well as an option to automatically generate individual house number nodes from a Way."/>
     94                <attribute name="Plugin-Icon" value="images/AddrInterpolation.png"/>
     95                <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/wiki/JOSM/Plugins/AddrInterpolation"/>
     96                <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
     97                <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
     98            </manifest>
     99        </jar>
     100    </target>
     101    <!--
    106102    **********************************************************
    107103    ** revision - extracts the current revision number for the
     
    110106    **********************************************************
    111107    -->
    112         <target name="revision">
    113                 <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
    114                         <env key="LANG" value="C"/>
    115                         <arg value="info"/>
    116                         <arg value="--xml"/>
    117                         <arg value="."/>
    118                 </exec>
    119                 <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
    120                 <delete file="REVISION"/>
    121         </target>
    122 
    123         <!--
     108    <target name="revision">
     109        <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
     110            <env key="LANG" value="C"/>
     111            <arg value="info"/>
     112            <arg value="--xml"/>
     113            <arg value="."/>
     114        </exec>
     115        <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
     116        <delete file="REVISION"/>
     117    </target>
     118    <!--
    124119    **********************************************************
    125120    ** clean - clean up the build environment
    126121    **********************************************************
    127122    -->
    128         <target name="clean">
    129                 <delete dir="${plugin.build.dir}"/>
    130                 <delete file="${plugin.jar}"/>
    131         </target>
    132 
    133         <!--
     123    <target name="clean">
     124        <delete dir="${plugin.build.dir}"/>
     125        <delete file="${plugin.jar}"/>
     126    </target>
     127    <!--
    134128    **********************************************************
    135129    ** install - install the plugin in your local JOSM installation
    136130    **********************************************************
    137131    -->
    138         <target name="install" depends="dist">
    139                 <property environment="env"/>
    140                 <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
    141                         <and>
    142                                 <os family="windows"/>
    143                         </and>
    144                 </condition>
    145                 <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
    146         </target>
    147 
    148         <!--
    149          ************************** Publishing the plugin ***********************************
    150         -->
    151         <!--
    152         ** extracts the JOSM release for the JOSM version in ../core and saves it in the
    153         ** property ${coreversion.info.entry.revision}
    154         **
    155         -->
    156         <target name="core-info">
    157                 <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
    158                         <env key="LANG" value="C"/>
    159                         <arg value="info"/>
    160                         <arg value="--xml"/>
    161                         <arg value="../../core"/>
    162                 </exec>
    163                 <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
    164                 <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
    165                 <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
    166                 <delete file="core.info.xml" />
    167         </target>
    168 
    169         <!--
    170         ** commits the source tree for this plugin
    171         -->
    172         <target name="commit-current">
    173                 <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
    174                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    175                         <env key="LANG" value="C"/>
    176                         <arg value="commit"/>
    177                         <arg value="-m '${commit.message}'"/>
    178                         <arg value="."/>
    179                 </exec>
    180         </target>
    181 
    182         <!--
    183         ** updates (svn up) the source tree for this plugin
    184         -->
    185         <target name="update-current">
    186                 <echo>Updating plugin source ...</echo>
    187                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    188                         <env key="LANG" value="C"/>
    189                         <arg value="up"/>
    190                         <arg value="."/>
    191                 </exec>
    192                 <echo>Updating ${plugin.jar} ...</echo>
    193                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    194                         <env key="LANG" value="C"/>
    195                         <arg value="up"/>
    196                         <arg value="../dist/${plugin.jar}"/>
    197                 </exec>
    198         </target>
    199 
    200         <!--
    201         ** commits the plugin.jar
    202         -->
    203         <target name="commit-dist">
    204                 <echo>
     132    <target name="install" depends="dist">
     133        <property environment="env"/>
     134        <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
     135            <and>
     136                <os family="windows"/>
     137            </and>
     138        </condition>
     139        <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
     140    </target>
     141    <!--
     142     ************************** Publishing the plugin ***********************************
     143    -->
     144    <!--
     145    ** extracts the JOSM release for the JOSM version in ../core and saves it in the
     146    ** property ${coreversion.info.entry.revision}
     147    **
     148    -->
     149    <target name="core-info">
     150        <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
     151            <env key="LANG" value="C"/>
     152            <arg value="info"/>
     153            <arg value="--xml"/>
     154            <arg value="../../core"/>
     155        </exec>
     156        <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
     157        <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
     158        <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
     159        <delete file="core.info.xml"/>
     160    </target>
     161    <!--
     162    ** commits the source tree for this plugin
     163    -->
     164    <target name="commit-current">
     165        <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
     166        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     167            <env key="LANG" value="C"/>
     168            <arg value="commit"/>
     169            <arg value="-m '${commit.message}'"/>
     170            <arg value="."/>
     171        </exec>
     172    </target>
     173    <!--
     174    ** updates (svn up) the source tree for this plugin
     175    -->
     176    <target name="update-current">
     177        <echo>Updating plugin source ...</echo>
     178        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     179            <env key="LANG" value="C"/>
     180            <arg value="up"/>
     181            <arg value="."/>
     182        </exec>
     183        <echo>Updating ${plugin.jar} ...</echo>
     184        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     185            <env key="LANG" value="C"/>
     186            <arg value="up"/>
     187            <arg value="../dist/${plugin.jar}"/>
     188        </exec>
     189    </target>
     190    <!--
     191    ** commits the plugin.jar
     192    -->
     193    <target name="commit-dist">
     194        <echo>
    205195***** Properties of published ${plugin.jar} *****
    206 Commit message    : '${commit.message}'                                 
     196Commit message    : '${commit.message}'                 
    207197Plugin-Mainversion: ${plugin.main.version}
    208198JOSM build version: ${coreversion.info.entry.revision}
    209199Plugin-Version    : ${version.entry.commit.revision}
    210 ***** / Properties of published ${plugin.jar} *****                                     
    211                                        
     200***** / Properties of published ${plugin.jar} *****                 
     201                   
    212202Now commiting ${plugin.jar} ...
    213203</echo>
    214                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    215                         <env key="LANG" value="C"/>
    216                         <arg value="-m '${commit.message}'"/>
    217                         <arg value="commit"/>
    218                         <arg value="${plugin.jar}"/>
    219                 </exec>
    220         </target>
    221 
    222         <!-- ** make sure svn is present as a command line tool ** -->
    223         <target name="ensure-svn-present">
    224                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
    225                         <env key="LANG" value="C" />
    226                         <arg value="--version" />
    227                 </exec>
    228                 <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
    229                         <!-- return code not set at all? Most likely svn isn't installed -->
    230                         <condition>
    231                                 <not>
    232                                         <isset property="svn.exit.code" />
    233                                 </not>
    234                         </condition>
    235                 </fail>
    236                 <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
    237                         <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
    238                         <condition>
    239                                 <isfailure code="${svn.exit.code}" />
    240                         </condition>
    241                 </fail>
    242         </target>
    243 
    244         <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
    245         </target>
     204        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     205            <env key="LANG" value="C"/>
     206            <arg value="-m '${commit.message}'"/>
     207            <arg value="commit"/>
     208            <arg value="${plugin.jar}"/>
     209        </exec>
     210    </target>
     211    <!-- ** make sure svn is present as a command line tool ** -->
     212    <target name="ensure-svn-present">
     213        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
     214            <env key="LANG" value="C"/>
     215            <arg value="--version"/>
     216        </exec>
     217        <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
     218            <!-- return code not set at all? Most likely svn isn't installed -->
     219            <condition>
     220                <not>
     221                    <isset property="svn.exit.code"/>
     222                </not>
     223            </condition>
     224        </fail>
     225        <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
     226            <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
     227            <condition>
     228                <isfailure code="${svn.exit.code}"/>
     229            </condition>
     230        </fail>
     231    </target>
     232    <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
     233    </target>
    246234</project>
  • applications/editors/josm/plugins/alignways/build.xml

    r25199 r26174  
    1 <?xml version="1.0" encoding="UTF-8"?>
     1<?xml version="1.0" encoding="utf-8"?>
    22<!--
    33** This is a template build file for a JOSM  plugin.
     
    2929-->
    3030<project name="alignways" default="dist" basedir=".">
     31    <!-- enter the SVN commit message -->
     32    <property name="commit.message" value="fix shortcut conflict"/>
     33    <!--
     34        enter the *lowest* JOSM version this plugin is currently compatible
     35        with
     36    -->
     37    <property name="plugin.main.version" value="3835"/>
     38    <!--
     39        ************************************************ ** should not be
     40        necessary to change the following properties
     41    -->
     42    <property name="josm" location="../../core/dist/josm-custom.jar"/>
     43    <property name="plugin.build.dir" value="build"/>
     44    <property name="plugin.src.dir" value="src"/>
     45    <property name="plugin.lib.dir" value="lib"/>
     46    <!-- this is the directory where the plugin jar is copied to -->
     47    <property name="plugin.dist.dir" value="../../dist"/>
     48    <property name="ant.build.javac.target" value="1.5"/>
     49    <property name="plugin.dist.dir" value="../../dist"/>
     50    <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/>
     51    <!--
     52        ********************************************************** ** init -
     53        initializes the build
     54        **********************************************************
     55    -->
     56    <target name="init">
     57        <mkdir dir="${plugin.build.dir}"/>
     58    </target>
     59    <!--
     60        ********************************************************** ** compile
     61        - complies the source tree
     62        **********************************************************
     63    -->
     64    <target name="compile" depends="init">
     65        <echo message="compiling sources for  ${plugin.jar} ... "/>
     66        <javac srcdir="src" classpath="${josm};${plugin.lib.dir}" debug="true" destdir="${plugin.build.dir}">
     67            <compilerarg value="-Xlint:deprecation"/>
     68            <compilerarg value="-Xlint:unchecked"/>
     69        </javac>
     70        <copy todir="${plugin.build.dir}">
     71            <fileset dir="lib"/>
     72        </copy>
     73    </target>
     74    <!--
     75        ********************************************************** ** dist -
     76        creates the plugin jar
     77        **********************************************************
     78    -->
     79    <target name="dist" depends="compile,revision">
     80        <echo message="creating ${ant.project.name}.jar ... "/>
     81        <copy todir="${plugin.build.dir}/resources">
     82            <fileset dir="resources"/>
     83        </copy>
     84        <copy todir="${plugin.build.dir}/images">
     85            <fileset dir="images"/>
     86        </copy>
     87        <copy todir="${plugin.build.dir}/data">
     88            <fileset dir="data"/>
     89        </copy>
     90        <copy todir="${plugin.build.dir}">
     91            <fileset dir=".">
     92                <include name="README"/>
     93                <include name="LICENSE"/>
     94            </fileset>
     95        </copy>
     96        <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
     97            <!--
     98                ************************************************ ** configure these
     99                properties. Most of them will be copied to the plugins ** manifest
     100                file. Property values will also show up in the list available **
     101                plugins: http://josm.openstreetmap.de/wiki/Plugins. **
     102                ************************************************
     103            -->
     104            <manifest>
     105                <attribute name="Author" value="Attila Szász"/>
     106                <attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.alignways.AlignWaysPlugin"/>
     107                <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
     108                <attribute name="Plugin-Description" value="Makes a pair of selected way segments parallel by rotating one of them around a chosen pivot."/>
     109                <attribute name="Plugin-Icon" value="images/alignways.png"/>
     110                <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
     111                <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
     112                <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/wiki/JOSM/Plugins/AlignWayS"/>
     113            </manifest>
     114        </jar>
     115    </target>
     116    <!--
     117        ********************************************************** ** revision
     118        - extracts the current revision number for the ** file build.number
     119        and stores it in the XML property ** version.*
     120        **********************************************************
     121    -->
     122    <target name="revision">
     123        <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
     124            <env key="LANG" value="C"/>
     125            <arg value="info"/>
     126            <arg value="--xml"/>
     127            <arg value="."/>
     128        </exec>
     129        <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
     130        <delete file="REVISION"/>
     131    </target>
     132    <!--
     133        ********************************************************** ** clean -
     134        clean up the build environment
     135        **********************************************************
     136    -->
     137    <target name="clean">
     138        <delete dir="${plugin.build.dir}"/>
     139        <delete file="${plugin.jar}"/>
     140    </target>
     141    <!--
     142        ********************************************************** ** install
     143        - install the plugin in your local JOSM installation
     144        **********************************************************
     145    -->
     146    <target name="install" depends="dist">
     147        <property environment="env"/>
     148        <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
     149            <and>
     150                <os family="windows"/>
     151            </and>
     152        </condition>
     153        <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
     154    </target>
     155    <!--
     156        ************************** Publishing the plugin
     157        ***********************************
     158    -->
     159    <!--
     160        ** extracts the JOSM release for the JOSM version in ../core and saves
     161        it in the ** property ${coreversion.info.entry.revision} **
     162    -->
     163    <target name="core-info">
     164        <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
     165            <env key="LANG" value="C"/>
     166            <arg value="info"/>
     167            <arg value="--xml"/>
     168            <arg value="../../core"/>
     169        </exec>
     170        <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
     171        <echo>Building against core revision
     172            ${coreversion.info.entry.revision}.</echo>
     173        <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
     174        <delete file="core.info.xml"/>
     175    </target>
     176    <!--
     177        ** commits the source tree for this plugin
     178        -->
     179    <target name="commit-current">
     180        <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
     181        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     182            <env key="LANG" value="C"/>
     183            <arg value="commit"/>
     184            <arg value="-m '${commit.message}'"/>
     185            <arg value="."/>
     186        </exec>
     187    </target>
     188    <!--
     189        ** updates (svn up) the source tree for this plugin
     190        -->
     191    <target name="update-current">
     192        <echo>Updating plugin source ...</echo>
     193        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     194            <env key="LANG" value="C"/>
     195            <arg value="up"/>
     196            <arg value="."/>
     197        </exec>
     198        <echo>Updating ${plugin.jar} ...</echo>
     199        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     200            <env key="LANG" value="C"/>
     201            <arg value="up"/>
     202            <arg value="../dist/${plugin.jar}"/>
     203        </exec>
     204    </target>
     205    <!--
     206        ** commits the plugin.jar
     207        -->
     208    <target name="commit-dist">
     209        <echo>
     210            ***** Properties of published ${plugin.jar} *****
     211            Commit message
     212            : '${commit.message}'
     213            Plugin-Mainversion: ${plugin.main.version}
     214            JOSM
     215            build version: ${coreversion.info.entry.revision}
     216            Plugin-Version :
     217            ${version.entry.commit.revision}
     218            ***** / Properties of published
     219            ${plugin.jar} *****
    31220
    32         <!-- enter the SVN commit message -->
    33         <property name="commit.message" value="fix shortcut conflict" />
    34         <!--
    35                 enter the *lowest* JOSM version this plugin is currently compatible
    36                 with
    37         -->
    38         <property name="plugin.main.version" value="3835" />
    39 
    40 
    41         <!--
    42                 ************************************************ ** should not be
    43                 necessary to change the following properties
    44         -->
    45         <property name="josm" location="../../core/dist/josm-custom.jar" />
    46         <property name="plugin.build.dir" value="build" />
    47         <property name="plugin.src.dir" value="src" />
    48         <property name="plugin.lib.dir" value="lib" />
    49         <!-- this is the directory where the plugin jar is copied to -->
    50         <property name="plugin.dist.dir" value="../../dist" />
    51         <property name="ant.build.javac.target" value="1.5" />
    52         <property name="plugin.dist.dir" value="../../dist" />
    53         <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar" />
    54 
    55         <!--
    56                 ********************************************************** ** init -
    57                 initializes the build
    58                 **********************************************************
    59         -->
    60         <target name="init">
    61                 <mkdir dir="${plugin.build.dir}" />
    62         </target>
    63 
    64         <!--
    65                 ********************************************************** ** compile
    66                 - complies the source tree
    67                 **********************************************************
    68         -->
    69         <target name="compile" depends="init">
    70                 <echo message="compiling sources for  ${plugin.jar} ... " />
    71                 <javac srcdir="src" classpath="${josm};${plugin.lib.dir}" debug="true"
    72                         destdir="${plugin.build.dir}">
    73                         <compilerarg value="-Xlint:deprecation" />
    74                         <compilerarg value="-Xlint:unchecked" />
    75                 </javac>
    76                 <copy todir="${plugin.build.dir}">
    77                         <fileset dir="lib" />
    78                 </copy>
    79         </target>
    80 
    81         <!--
    82                 ********************************************************** ** dist -
    83                 creates the plugin jar
    84                 **********************************************************
    85         -->
    86         <target name="dist" depends="compile,revision">
    87                 <echo message="creating ${ant.project.name}.jar ... " />
    88                 <copy todir="${plugin.build.dir}/resources">
    89                         <fileset dir="resources" />
    90                 </copy>
    91                 <copy todir="${plugin.build.dir}/images">
    92                         <fileset dir="images" />
    93                 </copy>
    94                 <copy todir="${plugin.build.dir}">
    95                         <fileset dir=".">
    96                                 <include name="README" />
    97                                 <include name="LICENSE" />
    98                         </fileset>
    99                 </copy>
    100                 <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
    101                         <!--
    102                                 ************************************************ ** configure these
    103                                 properties. Most of them will be copied to the plugins ** manifest
    104                                 file. Property values will also show up in the list available **
    105                                 plugins: http://josm.openstreetmap.de/wiki/Plugins. **
    106                                 ************************************************
    107                         -->
    108                         <manifest>
    109                                 <attribute name="Author" value="Attila Szász" />
    110                                 <attribute name="Plugin-Class"
    111                                         value="org.openstreetmap.josm.plugins.alignways.AlignWaysPlugin" />
    112                                 <attribute name="Plugin-Date" value="${version.entry.commit.date}" />
    113                                 <attribute name="Plugin-Description"
    114                                         value="Makes a pair of selected way segments parallel by rotating one of them around a chosen pivot." />
    115                                 <attribute name="Plugin-Icon" value="images/alignways.png"/>
    116                                 <attribute name="Plugin-Mainversion" value="${plugin.main.version}" />
    117                                 <attribute name="Plugin-Version" value="${version.entry.commit.revision}" />
    118                                 <attribute name="Plugin-Link"
    119                                         value="http://wiki.openstreetmap.org/wiki/JOSM/Plugins/AlignWayS" />
    120                         </manifest>
    121                 </jar>
    122         </target>
    123 
    124         <!--
    125                 ********************************************************** ** revision
    126                 - extracts the current revision number for the ** file build.number
    127                 and stores it in the XML property ** version.*
    128                 **********************************************************
    129         -->
    130         <target name="revision">
    131 
    132                 <exec append="false" output="REVISION" executable="svn"
    133                         failifexecutionfails="false">
    134                         <env key="LANG" value="C" />
    135                         <arg value="info" />
    136                         <arg value="--xml" />
    137                         <arg value="." />
    138                 </exec>
    139                 <xmlproperty file="REVISION" prefix="version" keepRoot="false"
    140                         collapseAttributes="true" />
    141                 <delete file="REVISION" />
    142         </target>
    143 
    144         <!--
    145                 ********************************************************** ** clean -
    146                 clean up the build environment
    147                 **********************************************************
    148         -->
    149         <target name="clean">
    150                 <delete dir="${plugin.build.dir}" />
    151                 <delete file="${plugin.jar}" />
    152         </target>
    153 
    154         <!--
    155                 ********************************************************** ** install
    156                 - install the plugin in your local JOSM installation
    157                 **********************************************************
    158         -->
    159         <target name="install" depends="dist">
    160                 <property environment="env" />
    161                 <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins"
    162                         else="${user.home}/.josm/plugins">
    163                         <and>
    164                                 <os family="windows" />
    165                         </and>
    166                 </condition>
    167                 <copy file="${plugin.jar}" todir="${josm.plugins.dir}" />
    168         </target>
    169 
    170 
    171         <!--
    172                 ************************** Publishing the plugin
    173                 ***********************************
    174         -->
    175         <!--
    176                 ** extracts the JOSM release for the JOSM version in ../core and saves
    177                 it in the ** property ${coreversion.info.entry.revision} **
    178         -->
    179         <target name="core-info">
    180                 <exec append="false" output="core.info.xml" executable="svn"
    181                         failifexecutionfails="false">
    182                         <env key="LANG" value="C" />
    183                         <arg value="info" />
    184                         <arg value="--xml" />
    185                         <arg value="../../core" />
    186                 </exec>
    187                 <xmlproperty file="core.info.xml" prefix="coreversion"
    188                         keepRoot="true" collapseAttributes="true" />
    189                 <echo>Building against core revision
    190                         ${coreversion.info.entry.revision}.</echo>
    191                 <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
    192                 <delete file="core.info.xml" />
    193         </target>
    194 
    195         <!--
    196                 ** commits the source tree for this plugin
    197                 -->
    198         <target name="commit-current">
    199                 <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
    200                 <exec append="true" output="svn.log" executable="svn"
    201                         failifexecutionfails="false">
    202                         <env key="LANG" value="C" />
    203                         <arg value="commit" />
    204                         <arg value="-m '${commit.message}'" />
    205                         <arg value="." />
    206                 </exec>
    207         </target>
    208 
    209         <!--
    210                 ** updates (svn up) the source tree for this plugin
    211                 -->
    212         <target name="update-current">
    213                 <echo>Updating plugin source ...</echo>
    214                 <exec append="true" output="svn.log" executable="svn"
    215                         failifexecutionfails="false">
    216                         <env key="LANG" value="C" />
    217                         <arg value="up" />
    218                         <arg value="." />
    219                 </exec>
    220                 <echo>Updating ${plugin.jar} ...</echo>
    221                 <exec append="true" output="svn.log" executable="svn"
    222                         failifexecutionfails="false">
    223                         <env key="LANG" value="C" />
    224                         <arg value="up" />
    225                         <arg value="../dist/${plugin.jar}" />
    226                 </exec>
    227         </target>
    228 
    229         <!--
    230                 ** commits the plugin.jar
    231                 -->
    232         <target name="commit-dist">
    233                 <echo>
    234                         ***** Properties of published ${plugin.jar} *****
    235                         Commit message
    236                         : '${commit.message}'
    237                         Plugin-Mainversion: ${plugin.main.version}
    238                         JOSM
    239                         build version: ${coreversion.info.entry.revision}
    240                         Plugin-Version :
    241                         ${version.entry.commit.revision}
    242                         ***** / Properties of published
    243                         ${plugin.jar} *****
    244 
    245                         Now commiting ${plugin.jar} ...
    246         </echo>
    247                 <exec append="true" output="svn.log" executable="svn"
    248                         failifexecutionfails="false">
    249                         <env key="LANG" value="C" />
    250                         <arg value="-m '${commit.message}'" />
    251                         <arg value="commit" />
    252                         <arg value="${plugin.jar}" />
    253                 </exec>
    254         </target>
    255 
    256         <!-- ** make sure svn is present as a command line tool ** -->
    257         <target name="ensure-svn-present">
    258                 <exec append="true" output="svn.log" executable="svn"
    259                         failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
    260                         <env key="LANG" value="C" />
    261                         <arg value="--version" />
    262                 </exec>
    263                 <fail
    264                         message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
    265                         <!-- return code not set at all? Most likely svn isn't installed -->
    266                         <condition>
    267                                 <not>
    268                                         <isset property="svn.exit.code" />
    269                                 </not>
    270                         </condition>
    271                 </fail>
    272                 <fail
    273                         message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
    274                         <!--
    275                                 error code from SVN? Most likely svn is not what we are looking on
    276                                 this system
    277                         -->
    278                         <condition>
    279                                 <isfailure code="${svn.exit.code}" />
    280                         </condition>
    281                 </fail>
    282         </target>
    283 
    284         <target name="publish"
    285                 depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
    286         </target>
     221            Now commiting ${plugin.jar} ...
     222    </echo>
     223        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     224            <env key="LANG" value="C"/>
     225            <arg value="-m '${commit.message}'"/>
     226            <arg value="commit"/>
     227            <arg value="${plugin.jar}"/>
     228        </exec>
     229    </target>
     230    <!-- ** make sure svn is present as a command line tool ** -->
     231    <target name="ensure-svn-present">
     232        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
     233            <env key="LANG" value="C"/>
     234            <arg value="--version"/>
     235        </exec>
     236        <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
     237            <!-- return code not set at all? Most likely svn isn't installed -->
     238            <condition>
     239                <not>
     240                    <isset property="svn.exit.code"/>
     241                </not>
     242            </condition>
     243        </fail>
     244        <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
     245            <!--
     246                error code from SVN? Most likely svn is not what we are looking on
     247                this system
     248            -->
     249            <condition>
     250                <isfailure code="${svn.exit.code}"/>
     251            </condition>
     252        </fail>
     253    </target>
     254    <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
     255    </target>
    287256</project>
  • applications/editors/josm/plugins/build.xml

    r25948 r26174  
     1<?xml version="1.0" encoding="utf-8"?>
    12<project name="josm-plugins" default="build" basedir=".">
    23    <target name="compile_josm" unless="skip-josm">
    3     <echo message="test"/>
    4         <ant dir="../core" target="dist" />
     4        <echo message="test"/>
     5        <ant dir="../core" target="dist"/>
    56    </target>
    6     <target name="compile" depends="compile_josm"></target>
    7     <target name="build" depends="dist"></target>
     7    <target name="compile" depends="compile_josm"/>
     8    <target name="build" depends="dist"/>
    89    <target name="dist" depends="compile">
    910        <mkdir dir="../dist"/>
     
    2526        <ant antfile="build.xml" target="dist" dir="epsg31287"/>
    2627        <ant antfile="build.xml" target="dist" dir="ext_tools"/>
     28        <ant antfile="build.xml" target="dist" dir="FastDraw"/>
    2729        <ant antfile="build.xml" target="dist" dir="FixAddresses"/>
    2830        <ant antfile="build.xml" target="dist" dir="globalsat"/>
     
    3537        <ant antfile="build.xml" target="dist" dir="ImproveWayAccuracy"/>
    3638        <ant antfile="build.xml" target="dist" dir="irsrectify"/>
     39        <ant antfile="build.xml" target="dist" dir="junctionchecking"/>
    3740        <ant antfile="build.xml" target="dist" dir="lakewalker"/>
    3841        <ant antfile="build.xml" target="dist" dir="livegps"/>
     
    4144        <ant antfile="build.xml" target="dist" dir="michigan_left"/>
    4245        <ant antfile="build.xml" target="dist" dir="multipoly-convert"/>
     46        <ant antfile="build.xml" target="dist" dir="namemanager"/>
    4347        <ant antfile="build.xml" target="dist" dir="nearclick"/>
    4448        <ant antfile="build.xml" target="dist" dir="OpeningHoursEditor"/>
     
    5256        <ant antfile="build.xml" target="dist" dir="proj4j"/>
    5357        <ant antfile="build.xml" target="dist" dir="public_transport"/>
     58        <ant antfile="build.xml" target="dist" dir="reltoolbox"/>
    5459        <ant antfile="build.xml" target="dist" dir="restart"/>
    5560        <ant antfile="build.xml" target="dist" dir="reverter"/>
     
    6772        <ant antfile="build.xml" target="dist" dir="touchscreenhelper"/>
    6873        <ant antfile="build.xml" target="dist" dir="tracer"/>
     74        <ant antfile="build.xml" target="dist" dir="turnlanes"/>
    6975        <ant antfile="build.xml" target="dist" dir="turnrestrictions"/>
    7076        <ant antfile="build.xml" target="dist" dir="undelete"/>
     
    8894        <ant antfile="build.xml" target="clean" dir="cadastre-fr"/>
    8995        <ant antfile="build.xml" target="clean" dir="colorscheme"/>
     96        <ant antfile="build.xml" target="clean" dir="ColumbusCSV"/>
    9097        <ant antfile="build.xml" target="clean" dir="CommandLine"/>
    9198        <ant antfile="build.xml" target="clean" dir="Create_grid_of_ways"/>
     
    96103        <ant antfile="build.xml" target="clean" dir="download_along"/>
    97104        <ant antfile="build.xml" target="clean" dir="editgpx"/>
     105        <ant antfile="build.xml" target="clean" dir="ElevationProfile"/>
    98106        <ant antfile="build.xml" target="clean" dir="epsg31287"/>
    99107        <ant antfile="build.xml" target="clean" dir="ext_tools"/>
     108        <ant antfile="build.xml" target="clean" dir="FastDraw"/>
     109        <ant antfile="build.xml" target="clean" dir="FixAddresses"/>
    100110        <ant antfile="build.xml" target="clean" dir="globalsat"/>
    101111        <ant antfile="build.xml" target="clean" dir="gpxfilter"/>
     
    107117        <ant antfile="build.xml" target="clean" dir="ImproveWayAccuracy"/>
    108118        <ant antfile="build.xml" target="clean" dir="irsrectify"/>
     119        <ant antfile="build.xml" target="clean" dir="junctionchecking"/>
    109120        <ant antfile="build.xml" target="clean" dir="lakewalker"/>
    110121        <ant antfile="build.xml" target="clean" dir="livegps"/>
     
    113124        <ant antfile="build.xml" target="clean" dir="michigan_left"/>
    114125        <ant antfile="build.xml" target="clean" dir="multipoly-convert"/>
     126        <ant antfile="build.xml" target="clean" dir="namemanager"/>
    115127        <ant antfile="build.xml" target="clean" dir="nearclick"/>
    116128        <ant antfile="build.xml" target="clean" dir="OpeningHoursEditor"/>
     
    124136        <ant antfile="build.xml" target="clean" dir="proj4j"/>
    125137        <ant antfile="build.xml" target="clean" dir="public_transport"/>
     138        <ant antfile="build.xml" target="clean" dir="reltoolbox"/>
    126139        <ant antfile="build.xml" target="clean" dir="restart"/>
    127140        <ant antfile="build.xml" target="clean" dir="reverter"/>
     
    129142        <ant antfile="build.xml" target="clean" dir="roadsigns"/>
    130143        <ant antfile="build.xml" target="clean" dir="routes"/>
    131         <ant antfile="build.xml" target="clean" dir="routing"/>       
     144        <ant antfile="build.xml" target="clean" dir="routing"/>
    132145        <ant antfile="build.xml" target="clean" dir="simplifyarea"/>
    133146        <ant antfile="build.xml" target="clean" dir="smed"/>
     
    141154        <ant antfile="build.xml" target="clean" dir="touchscreenhelper"/>
    142155        <ant antfile="build.xml" target="clean" dir="tracer"/>
     156        <ant antfile="build.xml" target="clean" dir="turnlanes"/>
    143157        <ant antfile="build.xml" target="clean" dir="trustosm"/>
    144158        <ant antfile="build.xml" target="clean" dir="turnrestrictions"/>
     
    152166        <ant antfile="build.xml" target="clean" dir="wms-turbo-challenge2"/>
    153167    </target>
    154     <target name="clean_install"></target>
    155     <target name="install" depends="dist"></target>
     168    <target name="clean_install"/>
     169    <target name="install" depends="dist"/>
    156170</project>
  • applications/editors/josm/plugins/buildings_tools/build.xml

    r25469 r26174  
    1 <?xml version="1.0" encoding="UTF-8"?>
     1<?xml version="1.0" encoding="utf-8"?>
    22<!--
    33** This is a template build file for a JOSM  plugin.
     
    2929-->
    3030<project name="buildings_tools" default="dist" basedir=".">
    31 
    32         <!-- enter the SVN commit message -->
    33         <property name="commit.message" value="update (23630 was committed together with the code which is not right)" />
    34         <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    35         <property name="plugin.main.version" value="3922" />
    36 
    37 
    38         <!--
     31    <!-- enter the SVN commit message -->
     32    <property name="commit.message" value="update (23630 was committed together with the code which is not right)"/>
     33    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
     34    <property name="plugin.main.version" value="3922"/>
     35    <!--
    3936      ************************************************
    4037      ** should not be necessary to change the following properties
    4138     -->
    42         <property name="josm"                   location="../../core/dist/josm-custom.jar"/>
    43         <property name="plugin.build.dir"       value="build"/>
    44         <property name="plugin.src.dir"         value="src"/>
    45         <!-- this is the directory where the plugin jar is copied to -->
    46         <property name="plugin.dist.dir"        value="../../dist"/>
    47         <property name="ant.build.javac.target" value="1.5"/>
    48         <property name="plugin.dist.dir"        value="../../dist"/>
    49         <property name="plugin.jar"             value="${plugin.dist.dir}/${ant.project.name}.jar"/>
    50 
    51         <!--
     39    <property name="josm" location="../../core/dist/josm-custom.jar"/>
     40    <property name="plugin.build.dir" value="build"/>
     41    <property name="plugin.src.dir" value="src"/>
     42    <!-- this is the directory where the plugin jar is copied to -->
     43    <property name="plugin.dist.dir" value="../../dist"/>
     44    <property name="ant.build.javac.target" value="1.5"/>
     45    <property name="plugin.dist.dir" value="../../dist"/>
     46    <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/>
     47    <!--
    5248    **********************************************************
    5349    ** init - initializes the build
    5450    **********************************************************
    5551    -->
    56         <target name="init">
    57                 <mkdir dir="${plugin.build.dir}"/>
    58         </target>
    59 
    60         <!--
     52    <target name="init">
     53        <mkdir dir="${plugin.build.dir}"/>
     54    </target>
     55    <!--
    6156    **********************************************************
    6257    ** compile - complies the source tree
    6358    **********************************************************
    6459    -->
    65         <target name="compile" depends="init">
    66                 <echo message="compiling sources for  ${plugin.jar} ... "/>
    67                 <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}">
    68                         <compilerarg value="-Xlint:deprecation"/>
    69                         <compilerarg value="-Xlint:unchecked"/>
    70                 </javac>
    71         </target>
    72 
    73         <!--
     60    <target name="compile" depends="init">
     61        <echo message="compiling sources for  ${plugin.jar} ... "/>
     62        <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}">
     63            <compilerarg value="-Xlint:deprecation"/>
     64            <compilerarg value="-Xlint:unchecked"/>
     65        </javac>
     66    </target>
     67    <!--
    7468    **********************************************************
    7569    ** dist - creates the plugin jar
    7670    **********************************************************
    7771    -->
    78         <target name="dist" depends="compile,revision">
    79                 <echo message="creating ${ant.project.name}.jar ... "/>
    80                 <copy todir="${plugin.build.dir}/resources">
    81                         <fileset dir="resources"/>
    82                 </copy>
    83                 <copy todir="${plugin.build.dir}/images">
    84                         <fileset dir="images"/>
    85                 </copy>
    86                 <copy todir="${plugin.build.dir}">
    87                         <fileset dir=".">
    88                                 <include name="README" />
    89                                 <include name="LICENSE" />
    90                         </fileset>
    91                 </copy>
    92                 <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
    93                         <!--
     72    <target name="dist" depends="compile,revision">
     73        <echo message="creating ${ant.project.name}.jar ... "/>
     74        <copy todir="${plugin.build.dir}/resources">
     75            <fileset dir="resources"/>
     76        </copy>
     77        <copy todir="${plugin.build.dir}/images">
     78            <fileset dir="images"/>
     79        </copy>
     80        <copy todir="${plugin.build.dir}/data">
     81            <fileset dir="data"/>
     82        </copy>
     83        <copy todir="${plugin.build.dir}">
     84            <fileset dir=".">
     85                <include name="README"/>
     86                <include name="LICENSE"/>
     87            </fileset>
     88        </copy>
     89        <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
     90            <!--
    9491        ************************************************
    9592        ** configure these properties. Most of them will be copied to the plugins
     
    9996        ************************************************
    10097    -->
    101                         <manifest>
    102                                 <attribute name="Author" value="Upliner"/>
    103                                 <attribute name="Plugin-Class" value="buildings_tools.BuildingsToolsPlugin"/>
    104                                 <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
    105                                 <attribute name="Plugin-Description" value="Tools for drawing buildings."/>
    106                                 <attribute name="Plugin-Icon" value="images/mapmode/building.png"/>
    107 
    108                                 <attribute name="ru_Plugin-Description" value="Инструменты для прорисовки зданий."/>
    109                                 <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/wiki/JOSM/Plugins/BuildingsTools"/>
    110                                 <attribute name="ru_Plugin-Link" value="http://wiki.openstreetmap.org/wiki/RU:JOSM/Plugins/BuildingsTools"/>
    111                                 <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
    112                                 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
    113                         </manifest>
    114                 </jar>
    115         </target>
    116 
    117         <!--
     98            <manifest>
     99                <attribute name="Author" value="Upliner"/>
     100                <attribute name="Plugin-Class" value="buildings_tools.BuildingsToolsPlugin"/>
     101                <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
     102                <attribute name="Plugin-Description" value="Tools for drawing buildings."/>
     103                <attribute name="Plugin-Icon" value="images/mapmode/building.png"/>
     104                <attribute name="ru_Plugin-Description" value="Инструменты для прорисовки зданий."/>
     105                <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/wiki/JOSM/Plugins/BuildingsTools"/>
     106                <attribute name="ru_Plugin-Link" value="http://wiki.openstreetmap.org/wiki/RU:JOSM/Plugins/BuildingsTools"/>
     107                <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
     108                <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
     109            </manifest>
     110        </jar>
     111    </target>
     112    <!--
    118113    **********************************************************
    119114    ** revision - extracts the current revision number for the
     
    122117    **********************************************************
    123118    -->
    124         <target name="revision">
    125 
    126                 <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
    127                         <env key="LANG" value="C"/>
    128                         <arg value="info"/>
    129                         <arg value="--xml"/>
    130                         <arg value="."/>
    131                 </exec>
    132                 <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
    133                 <delete file="REVISION"/>
    134         </target>
    135 
    136         <!--
     119    <target name="revision">
     120        <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
     121            <env key="LANG" value="C"/>
     122            <arg value="info"/>
     123            <arg value="--xml"/>
     124            <arg value="."/>
     125        </exec>
     126        <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
     127        <delete file="REVISION"/>
     128    </target>
     129    <!--
    137130    **********************************************************
    138131    ** clean - clean up the build environment
    139132    **********************************************************
    140133    -->
    141         <target name="clean">
    142                 <delete dir="${plugin.build.dir}"/>
    143                 <delete file="${plugin.jar}"/>
    144         </target>
    145 
    146         <!--
     134    <target name="clean">
     135        <delete dir="${plugin.build.dir}"/>
     136        <delete file="${plugin.jar}"/>
     137    </target>
     138    <!--
    147139    **********************************************************
    148140    ** install - install the plugin in your local JOSM installation
    149141    **********************************************************
    150142    -->
    151         <target name="install" depends="dist">
    152                 <property environment="env"/>
    153                 <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
    154                         <and>
    155                                 <os family="windows"/>
    156                         </and>
    157                 </condition>
    158                 <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
    159         </target>
    160 
    161 
    162         <!--
    163         ************************** Publishing the plugin ***********************************
    164         -->
    165         <!--
    166                 ** extracts the JOSM release for the JOSM version in ../core and saves it in the
    167                 ** property ${coreversion.info.entry.revision}
    168                 **
    169                 -->
    170         <target name="core-info">
    171                 <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
    172                         <env key="LANG" value="C"/>
    173                         <arg value="info"/>
    174                         <arg value="--xml"/>
    175                         <arg value="../../core"/>
    176                 </exec>
    177                 <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
    178                 <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
    179                 <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
    180                 <delete file="core.info.xml" />
    181         </target>
    182 
    183         <!--
    184                 ** commits the source tree for this plugin
    185                 -->
    186         <target name="commit-current">
    187                 <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
    188                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    189                         <env key="LANG" value="C"/>
    190                         <arg value="commit"/>
    191                         <arg value="-m '${commit.message}'"/>
    192                         <arg value="."/>
    193                 </exec>
    194         </target>
    195 
    196         <!--
    197                 ** updates (svn up) the source tree for this plugin
    198                 -->
    199         <target name="update-current">
    200                 <echo>Updating plugin source ...</echo>
    201                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    202                         <env key="LANG" value="C"/>
    203                         <arg value="up"/>
    204                         <arg value="."/>
    205                 </exec>
    206                 <echo>Updating ${plugin.jar} ...</echo>
    207                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    208                         <env key="LANG" value="C"/>
    209                         <arg value="up"/>
    210                         <arg value="../dist/${plugin.jar}"/>
    211                 </exec>
    212         </target>
    213 
    214         <!--
    215                 ** commits the plugin.jar
    216                 -->
    217         <target name="commit-dist">
    218                 <echo>
    219         ***** Properties of published ${plugin.jar} *****
    220         Commit message    : '${commit.message}'                                 
    221         Plugin-Mainversion: ${plugin.main.version}
    222         JOSM build version: ${coreversion.info.entry.revision}
    223         Plugin-Version    : ${version.entry.commit.revision}
    224         ***** / Properties of published ${plugin.jar} *****                                     
    225                                                
    226         Now commiting ${plugin.jar} ...
    227         </echo>
    228                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    229                         <env key="LANG" value="C"/>
    230                         <arg value="-m '${commit.message}'"/>
    231                         <arg value="commit"/>
    232                         <arg value="${plugin.jar}"/>
    233                 </exec>
    234         </target>
    235 
    236         <!-- ** make sure svn is present as a command line tool ** -->
    237         <target name="ensure-svn-present">
    238                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
    239                         <env key="LANG" value="C" />
    240                         <arg value="--version" />
    241                 </exec>
    242                 <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
    243                         <!-- return code not set at all? Most likely svn isn't installed -->
    244                         <condition>
    245                                 <not>
    246                                         <isset property="svn.exit.code" />
    247                                 </not>
    248                         </condition>
    249                 </fail>
    250                 <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
    251                         <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
    252                         <condition>
    253                                 <isfailure code="${svn.exit.code}" />
    254                         </condition>
    255                 </fail>
    256         </target>
    257 
    258         <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
    259         </target>
     143    <target name="install" depends="dist">
     144        <property environment="env"/>
     145        <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
     146            <and>
     147                <os family="windows"/>
     148            </and>
     149        </condition>
     150        <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
     151    </target>
     152    <!--
     153    ************************** Publishing the plugin ***********************************
     154    -->
     155    <!--
     156        ** extracts the JOSM release for the JOSM version in ../core and saves it in the
     157        ** property ${coreversion.info.entry.revision}
     158        **
     159        -->
     160    <target name="core-info">
     161        <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
     162            <env key="LANG" value="C"/>
     163            <arg value="info"/>
     164            <arg value="--xml"/>
     165            <arg value="../../core"/>
     166        </exec>
     167        <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
     168        <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
     169        <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
     170        <delete file="core.info.xml"/>
     171    </target>
     172    <!--
     173        ** commits the source tree for this plugin
     174        -->
     175    <target name="commit-current">
     176        <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
     177        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     178            <env key="LANG" value="C"/>
     179            <arg value="commit"/>
     180            <arg value="-m '${commit.message}'"/>
     181            <arg value="."/>
     182        </exec>
     183    </target>
     184    <!--
     185        ** updates (svn up) the source tree for this plugin
     186        -->
     187    <target name="update-current">
     188        <echo>Updating plugin source ...</echo>
     189        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     190            <env key="LANG" value="C"/>
     191            <arg value="up"/>
     192            <arg value="."/>
     193        </exec>
     194        <echo>Updating ${plugin.jar} ...</echo>
     195        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     196            <env key="LANG" value="C"/>
     197            <arg value="up"/>
     198            <arg value="../dist/${plugin.jar}"/>
     199        </exec>
     200    </target>
     201    <!--
     202        ** commits the plugin.jar
     203        -->
     204    <target name="commit-dist">
     205        <echo>
     206    ***** Properties of published ${plugin.jar} *****
     207    Commit message    : '${commit.message}'                 
     208    Plugin-Mainversion: ${plugin.main.version}
     209    JOSM build version: ${coreversion.info.entry.revision}
     210    Plugin-Version    : ${version.entry.commit.revision}
     211    ***** / Properties of published ${plugin.jar} *****                 
     212                       
     213    Now commiting ${plugin.jar} ...
     214    </echo>
     215        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     216            <env key="LANG" value="C"/>
     217            <arg value="-m '${commit.message}'"/>
     218            <arg value="commit"/>
     219            <arg value="${plugin.jar}"/>
     220        </exec>
     221    </target>
     222    <!-- ** make sure svn is present as a command line tool ** -->
     223    <target name="ensure-svn-present">
     224        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
     225            <env key="LANG" value="C"/>
     226            <arg value="--version"/>
     227        </exec>
     228        <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
     229            <!-- return code not set at all? Most likely svn isn't installed -->
     230            <condition>
     231                <not>
     232                    <isset property="svn.exit.code"/>
     233                </not>
     234            </condition>
     235        </fail>
     236        <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
     237            <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
     238            <condition>
     239                <isfailure code="${svn.exit.code}"/>
     240            </condition>
     241        </fail>
     242    </target>
     243    <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
     244    </target>
    260245</project>
  • applications/editors/josm/plugins/cadastre-fr/build.xml

    r25192 r26174  
     1<?xml version="1.0" encoding="utf-8"?>
    12<!--
    23** This is a template build file for the cadastre-fr plugin.
     
    2526-->
    2627<project name="cadastre-fr" default="dist" basedir=".">
    27     <property name="josm"                   location="../../core/dist/josm-custom.jar"/>
    28     <property name="plugin.dist.dir"        value="../../dist"/>
    29     <property name="plugin.build.dir"       value="build"/>
    30     <property name="plugin.jar"             value="${plugin.dist.dir}/${ant.project.name}.jar"/>
     28    <property name="josm" location="../../core/dist/josm-custom.jar"/>
     29    <property name="plugin.dist.dir" value="../../dist"/>
     30    <property name="plugin.build.dir" value="build"/>
     31    <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/>
    3132    <property name="ant.build.javac.target" value="1.5"/>
    32 
    33 
    34 
    35         <property name="commit.message" value="Changed constructor for Plugin" />
    36         <property name="plugin.main.version" value="3835" />
    37 
     33    <property name="commit.message" value="Changed constructor for Plugin"/>
     34    <property name="plugin.main.version" value="3835"/>
    3835    <target name="init">
    3936        <mkdir dir="${plugin.build.dir}"/>
     
    4946        <copy todir="${plugin.build.dir}/images">
    5047            <fileset dir="images"/>
     48        </copy>
     49        <copy todir="${plugin.build.dir}/data">
     50            <fileset dir="data"/>
    5151        </copy>
    5252        <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
     
    8787        <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
    8888    </target>
     89    <!--
     90         ************************** Publishing the plugin ***********************************
     91        -->
     92    <!--
     93              ** extracts the JOSM release for the JOSM version in ../core and saves it in the
     94              ** property ${coreversion.info.entry.revision}
     95              **
     96            -->
     97    <target name="core-info">
     98        <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
     99            <env key="LANG" value="C"/>
     100            <arg value="info"/>
     101            <arg value="--xml"/>
     102            <arg value="../../core"/>
     103        </exec>
     104        <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
     105        <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
     106        <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
     107        <delete file="core.info.xml"/>
     108    </target>
     109    <!--
     110             ** commits the source tree for this plugin
     111            -->
     112    <target name="commit-current">
     113        <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
     114        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     115            <env key="LANG" value="C"/>
     116            <arg value="commit"/>
     117            <arg value="-m '${commit.message}'"/>
     118            <arg value="."/>
     119        </exec>
     120    </target>
     121    <!--
     122            ** updates (svn up) the source tree for this plugin
     123            -->
     124    <target name="update-current">
     125        <echo>Updating plugin source ...</echo>
     126        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     127            <env key="LANG" value="C"/>
     128            <arg value="up"/>
     129            <arg value="."/>
     130        </exec>
     131        <echo>Updating ${plugin.jar} ...</echo>
     132        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     133            <env key="LANG" value="C"/>
     134            <arg value="up"/>
     135            <arg value="../dist/${plugin.jar}"/>
     136        </exec>
     137    </target>
     138    <!--
     139             ** commits the plugin.jar
     140             -->
     141    <target name="commit-dist">
     142        <echo>
     143    ***** Properties of published ${plugin.jar} *****
     144    Commit message    : '${commit.message}'
     145    Plugin-Mainversion: ${plugin.main.version}
     146    JOSM build version: ${coreversion.info.entry.revision}
     147    Plugin-Version    : ${version.entry.commit.revision}
     148    ***** / Properties of published ${plugin.jar} *****
    89149
    90         <!--
    91                  ************************** Publishing the plugin ***********************************
    92                 -->
    93                         <!--
    94                           ** extracts the JOSM release for the JOSM version in ../core and saves it in the
    95                           ** property ${coreversion.info.entry.revision}
    96                           **
    97                         -->
    98                         <target name="core-info">
    99                         <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
    100                                     <env key="LANG" value="C"/>
    101                                     <arg value="info"/>
    102                                     <arg value="--xml"/>
    103                                     <arg value="../../core"/>
    104                         </exec>
    105                         <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
    106                                 <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
    107                                 <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
    108                                 <delete file="core.info.xml" />
    109                         </target>
    110 
    111                         <!--
    112                          ** commits the source tree for this plugin
    113                         -->
    114                         <target name="commit-current">
    115                                 <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
    116                             <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    117                                             <env key="LANG" value="C"/>
    118                                             <arg value="commit"/>
    119                                             <arg value="-m '${commit.message}'"/>
    120                                             <arg value="."/>
    121                             </exec>
    122                         </target>
    123 
    124                         <!--
    125                         ** updates (svn up) the source tree for this plugin
    126                         -->
    127                         <target name="update-current">
    128                                 <echo>Updating plugin source ...</echo>
    129                             <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    130                                             <env key="LANG" value="C"/>
    131                                             <arg value="up"/>
    132                                             <arg value="."/>
    133                             </exec>
    134                                 <echo>Updating ${plugin.jar} ...</echo>
    135                             <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    136                                             <env key="LANG" value="C"/>
    137                                             <arg value="up"/>
    138                                             <arg value="../dist/${plugin.jar}"/>
    139                             </exec>
    140                         </target>
    141 
    142                         <!--
    143                          ** commits the plugin.jar
    144                          -->
    145                         <target name="commit-dist">
    146                                         <echo>
    147         ***** Properties of published ${plugin.jar} *****
    148         Commit message    : '${commit.message}'
    149         Plugin-Mainversion: ${plugin.main.version}
    150         JOSM build version: ${coreversion.info.entry.revision}
    151         Plugin-Version    : ${version.entry.commit.revision}
    152         ***** / Properties of published ${plugin.jar} *****
    153 
    154         Now commiting ${plugin.jar} ...
    155         </echo>
    156                                     <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    157                                                     <env key="LANG" value="C"/>
    158                                                                 <arg value="-m '${commit.message}'"/>
    159                                                                 <arg value="commit"/>
    160                                                 <arg value="${plugin.jar}"/>
    161                                     </exec>
    162                         </target>
    163 
    164                         <target name="publish" depends="core-info,commit-current,update-current,clean,dist,commit-dist">
    165                         </target>
     150    Now commiting ${plugin.jar} ...
     151    </echo>
     152        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     153            <env key="LANG" value="C"/>
     154            <arg value="-m '${commit.message}'"/>
     155            <arg value="commit"/>
     156            <arg value="${plugin.jar}"/>
     157        </exec>
     158    </target>
     159    <target name="publish" depends="core-info,commit-current,update-current,clean,dist,commit-dist">
     160            </target>
    166161</project>
  • applications/editors/josm/plugins/colorscheme/build.xml

    r25192 r26174  
    1 <?xml version="1.0" encoding="UTF-8"?>
     1<?xml version="1.0" encoding="utf-8"?>
    22<!--
    33** This is the build file for the colorscheme plugin
     
    2626-->
    2727<project name="colorscheme" default="dist" basedir=".">
    28 
    29 
    30         <property name="commit.message" value="Uses new constructor for Plugin" />
    31         <property name="plugin.main.version" value="3835" />
    32 
    33         <property name="josm"                   location="../../core/dist/josm-custom.jar"/>
    34         <property name="plugin.dist.dir"        value="../../dist"/>
    35         <property name="plugin.build.dir"       value="build"/>
    36         <property name="plugin.jar"             value="${plugin.dist.dir}/${ant.project.name}.jar"/>
    37         <property name="ant.build.javac.target" value="1.5"/>
    38         <target name="init">
    39                 <mkdir dir="${plugin.build.dir}"/>
    40         </target>
    41         <target name="compile" depends="init">
    42                 <echo message="creating ${plugin.jar}"/>
    43                 <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}">
    44                         <compilerarg value="-Xlint:deprecation"/>
    45                         <compilerarg value="-Xlint:unchecked"/>
    46                 </javac>
    47         </target>
    48         <target name="dist" depends="compile,revision">
    49                 <copy todir="${plugin.build.dir}">
    50                         <fileset dir="src">
    51                                 <include name="*.xml"/>
    52                         </fileset>
    53                 </copy>
    54                 <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
    55                         <manifest>
    56                                 <attribute name="Author" value="Christof Dallermassl"/>
    57                                 <attribute name="Plugin-Class" value="at.dallermassl.josm.plugin.colorscheme.ColorSchemePlugin" />
    58                                 <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
    59                                 <attribute name="Plugin-Description" value="Allows the user to create different color schemes and to switch between them. Just change the colors and create a new scheme. Used to switch to a white background with matching colors for better visibility in bright sunlight. See dialog in JOSM's preferences and 'Map Settings' (strange but true :-)" />
    60                                 <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
    61                                 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
    62                         </manifest>
    63                 </jar>
    64         </target>
    65         <target name="revision">
    66                 <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
    67                         <env key="LANG" value="C"/>
    68                         <arg value="info"/>
    69                         <arg value="--xml"/>
    70                         <arg value="."/>
    71                 </exec>
    72                 <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
    73                 <delete file="REVISION"/>
    74         </target>
    75         <target name="clean">
    76                 <delete dir="${plugin.build.dir}"/>
    77                 <delete file="${plugin.jar}"/>
    78         </target>
    79         <target name="install" depends="dist">
    80                 <property environment="env"/>
    81                 <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
    82                         <and>
    83                                 <os family="windows"/>
    84                         </and>
    85                 </condition>
    86                 <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
    87         </target>
    88 
    89         <!--
    90          ************************** Publishing the plugin ***********************************
    91         -->
    92         <!--
    93         ** extracts the JOSM release for the JOSM version in ../core and saves it in the
    94         ** property ${coreversion.info.entry.revision}
    95         **
    96         -->
    97         <target name="core-info">
    98                 <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
    99                         <env key="LANG" value="C"/>
    100                         <arg value="info"/>
    101                         <arg value="--xml"/>
    102                         <arg value="../../core"/>
    103                 </exec>
    104                 <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
    105                 <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
    106                 <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
    107                 <delete file="core.info.xml" />
    108         </target>
    109 
    110         <!--
    111         ** commits the source tree for this plugin
    112         -->
    113         <target name="commit-current">
    114                 <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
    115                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    116                         <env key="LANG" value="C"/>
    117                         <arg value="commit"/>
    118                         <arg value="-m '${commit.message}'"/>
    119                         <arg value="."/>
    120                 </exec>
    121         </target>
    122 
    123         <!--
    124         ** updates (svn up) the source tree for this plugin
    125         -->
    126         <target name="update-current">
    127                 <echo>Updating plugin source ...</echo>
    128                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    129                         <env key="LANG" value="C"/>
    130                         <arg value="up"/>
    131                         <arg value="."/>
    132                 </exec>
    133                 <echo>Updating ${plugin.jar} ...</echo>
    134                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    135                         <env key="LANG" value="C"/>
    136                         <arg value="up"/>
    137                         <arg value="../dist/${plugin.jar}"/>
    138                 </exec>
    139         </target>
    140 
    141         <!--
    142         ** commits the plugin.jar
    143         -->
    144         <target name="commit-dist">
    145                 <echo>
     28    <property name="commit.message" value="Uses new constructor for Plugin"/>
     29    <property name="plugin.main.version" value="3835"/>
     30    <property name="josm" location="../../core/dist/josm-custom.jar"/>
     31    <property name="plugin.dist.dir" value="../../dist"/>
     32    <property name="plugin.build.dir" value="build"/>
     33    <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/>
     34    <property name="ant.build.javac.target" value="1.5"/>
     35    <target name="init">
     36        <mkdir dir="${plugin.build.dir}"/>
     37    </target>
     38    <target name="compile" depends="init">
     39        <echo message="creating ${plugin.jar}"/>
     40        <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}">
     41            <compilerarg value="-Xlint:deprecation"/>
     42            <compilerarg value="-Xlint:unchecked"/>
     43        </javac>
     44    </target>
     45    <target name="dist" depends="compile,revision">
     46        <copy todir="${plugin.build.dir}">
     47            <fileset dir="src">
     48                <include name="*.xml"/>
     49            </fileset>
     50        </copy>
     51        <copy todir="${plugin.build.dir}/data">
     52            <fileset dir="data"/>
     53        </copy>
     54        <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
     55            <manifest>
     56                <attribute name="Author" value="Christof Dallermassl"/>
     57                <attribute name="Plugin-Class" value="at.dallermassl.josm.plugin.colorscheme.ColorSchemePlugin"/>
     58                <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
     59                <attribute name="Plugin-Description" value="Allows the user to create different color schemes and to switch between them. Just change the colors and create a new scheme. Used to switch to a white background with matching colors for better visibility in bright sunlight. See dialog in JOSM's preferences and 'Map Settings' (strange but true :-)"/>
     60                <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
     61                <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
     62            </manifest>
     63        </jar>
     64    </target>
     65    <target name="revision">
     66        <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
     67            <env key="LANG" value="C"/>
     68            <arg value="info"/>
     69            <arg value="--xml"/>
     70            <arg value="."/>
     71        </exec>
     72        <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
     73        <delete file="REVISION"/>
     74    </target>
     75    <target name="clean">
     76        <delete dir="${plugin.build.dir}"/>
     77        <delete file="${plugin.jar}"/>
     78    </target>
     79    <target name="install" depends="dist">
     80        <property environment="env"/>
     81        <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
     82            <and>
     83                <os family="windows"/>
     84            </and>
     85        </condition>
     86        <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
     87    </target>
     88    <!--
     89     ************************** Publishing the plugin ***********************************
     90    -->
     91    <!--
     92    ** extracts the JOSM release for the JOSM version in ../core and saves it in the
     93    ** property ${coreversion.info.entry.revision}
     94    **
     95    -->
     96    <target name="core-info">
     97        <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
     98            <env key="LANG" value="C"/>
     99            <arg value="info"/>
     100            <arg value="--xml"/>
     101            <arg value="../../core"/>
     102        </exec>
     103        <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
     104        <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
     105        <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
     106        <delete file="core.info.xml"/>
     107    </target>
     108    <!--
     109    ** commits the source tree for this plugin
     110    -->
     111    <target name="commit-current">
     112        <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
     113        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     114            <env key="LANG" value="C"/>
     115            <arg value="commit"/>
     116            <arg value="-m '${commit.message}'"/>
     117            <arg value="."/>
     118        </exec>
     119    </target>
     120    <!--
     121    ** updates (svn up) the source tree for this plugin
     122    -->
     123    <target name="update-current">
     124        <echo>Updating plugin source ...</echo>
     125        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     126            <env key="LANG" value="C"/>
     127            <arg value="up"/>
     128            <arg value="."/>
     129        </exec>
     130        <echo>Updating ${plugin.jar} ...</echo>
     131        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     132            <env key="LANG" value="C"/>
     133            <arg value="up"/>
     134            <arg value="../dist/${plugin.jar}"/>
     135        </exec>
     136    </target>
     137    <!--
     138    ** commits the plugin.jar
     139    -->
     140    <target name="commit-dist">
     141        <echo>
    146142***** Properties of published ${plugin.jar} *****
    147 Commit message    : '${commit.message}'                                 
     143Commit message    : '${commit.message}'                 
    148144Plugin-Mainversion: ${plugin.main.version}
    149145JOSM build version: ${coreversion.info.entry.revision}
    150146Plugin-Version    : ${version.entry.commit.revision}
    151 ***** / Properties of published ${plugin.jar} *****                                     
    152                                        
     147***** / Properties of published ${plugin.jar} *****                 
     148                   
    153149Now commiting ${plugin.jar} ...
    154150</echo>
    155                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    156                         <env key="LANG" value="C"/>
    157                         <arg value="-m '${commit.message}'"/>
    158                         <arg value="commit"/>
    159                         <arg value="${plugin.jar}"/>
    160                 </exec>
    161         </target>
    162 
    163         <!-- ** make sure svn is present as a command line tool ** -->
    164         <target name="ensure-svn-present">
    165                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
    166                         <env key="LANG" value="C" />
    167                         <arg value="--version" />
    168                 </exec>
    169                 <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
    170                         <!-- return code not set at all? Most likely svn isn't installed -->
    171                         <condition>
    172                                 <not>
    173                                         <isset property="svn.exit.code" />
    174                                 </not>
    175                         </condition>
    176                 </fail>
    177                 <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
    178                         <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
    179                         <condition>
    180                                 <isfailure code="${svn.exit.code}" />
    181                         </condition>
    182                 </fail>
    183         </target>
    184 
    185         <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
    186         </target>
     151        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     152            <env key="LANG" value="C"/>
     153            <arg value="-m '${commit.message}'"/>
     154            <arg value="commit"/>
     155            <arg value="${plugin.jar}"/>
     156        </exec>
     157    </target>
     158    <!-- ** make sure svn is present as a command line tool ** -->
     159    <target name="ensure-svn-present">
     160        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
     161            <env key="LANG" value="C"/>
     162            <arg value="--version"/>
     163        </exec>
     164        <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
     165            <!-- return code not set at all? Most likely svn isn't installed -->
     166            <condition>
     167                <not>
     168                    <isset property="svn.exit.code"/>
     169                </not>
     170            </condition>
     171        </fail>
     172        <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
     173            <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
     174            <condition>
     175                <isfailure code="${svn.exit.code}"/>
     176            </condition>
     177        </fail>
     178    </target>
     179    <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
     180    </target>
    187181</project>
  • applications/editors/josm/plugins/conflation/build.xml

    r25942 r26174  
    1 <?xml version="1.0" encoding="UTF-8"?>
     1<?xml version="1.0" encoding="utf-8"?>
    22<!--
    33** This is the build file for the conflation JOSM plugin.
     
    2929-->
    3030<project name="conflation" default="dist" basedir=".">
    31 
    3231    <!-- enter the SVN commit message -->
    33     <property name="commit.message" value="Commit message" />
     32    <property name="commit.message" value="Commit message"/>
    3433    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    35     <property name="plugin.main.version" value="" />
    36 
    37 
     34    <property name="plugin.main.version" value=""/>
    3835    <!--
    3936      ************************************************
    4037      ** should not be necessary to change the following properties
    4138     -->
    42     <property name="josm"                   location="../../core/dist/josm-custom.jar"/>
    43     <property name="plugin.build.dir"       value="build"/>
    44     <property name="plugin.src.dir"         value="src"/>
     39    <property name="josm" location="../../core/dist/josm-custom.jar"/>
     40    <property name="plugin.build.dir" value="build"/>
     41    <property name="plugin.src.dir" value="src"/>
    4542    <!-- this is the directory where the plugin jar is copied to -->
    46     <property name="plugin.dist.dir"        value="../../dist"/>
     43    <property name="plugin.dist.dir" value="../../dist"/>
    4744    <property name="ant.build.javac.target" value="1.5"/>
    48     <property name="plugin.dist.dir"        value="../../dist"/>
    49     <property name="plugin.jar"             value="${plugin.dist.dir}/${ant.project.name}.jar"/>
    50 
     45    <property name="plugin.dist.dir" value="../../dist"/>
     46    <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/>
    5147    <!--
    5248    **********************************************************
     
    5753        <mkdir dir="${plugin.build.dir}"/>
    5854    </target>
    59 
    6055    <!--
    6156    **********************************************************
     
    7065        </javac>
    7166    </target>
    72 
    7367    <!--
    7468    **********************************************************
     
    8478            <fileset dir="images"/>
    8579        </copy>
     80        <copy todir="${plugin.build.dir}/data">
     81            <fileset dir="data"/>
     82        </copy>
    8683        <copy todir="${plugin.build.dir}">
    8784            <fileset dir=".">
    88                 <include name="README" />
    89                 <include name="LICENSE" />
     85                <include name="README"/>
     86                <include name="LICENSE"/>
    9087            </fileset>
    9188        </copy>
     
    111108        </jar>
    112109    </target>
    113 
    114110    <!--
    115111    **********************************************************
     
    120116    -->
    121117    <target name="revision">
    122 
    123118        <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
    124119            <env key="LANG" value="C"/>
     
    130125        <delete file="REVISION"/>
    131126    </target>
    132 
    133127    <!--
    134128    **********************************************************
     
    140134        <delete file="${plugin.jar}"/>
    141135    </target>
    142 
    143136    <!--
    144137    **********************************************************
     
    155148        <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
    156149    </target>
    157 
    158 
    159150    <!--
    160151    ************************** Publishing the plugin ***********************************
     
    175166        <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
    176167        <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
    177         <delete file="core.info.xml" />
    178     </target>
    179 
     168        <delete file="core.info.xml"/>
     169    </target>
    180170    <!--
    181171        ** commits the source tree for this plugin
     
    190180        </exec>
    191181    </target>
    192 
    193182    <!--
    194183        ** updates (svn up) the source tree for this plugin
     
    208197        </exec>
    209198    </target>
    210 
    211199    <!--
    212200        ** commits the plugin.jar
     
    230218        </exec>
    231219    </target>
    232 
    233220    <!-- ** make sure svn is present as a command line tool ** -->
    234221    <target name="ensure-svn-present">
    235222        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
    236             <env key="LANG" value="C" />
    237             <arg value="--version" />
     223            <env key="LANG" value="C"/>
     224            <arg value="--version"/>
    238225        </exec>
    239226        <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
     
    241228            <condition>
    242229                <not>
    243                     <isset property="svn.exit.code" />
     230                    <isset property="svn.exit.code"/>
    244231                </not>
    245232            </condition>
     
    248235            <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
    249236            <condition>
    250                 <isfailure code="${svn.exit.code}" />
     237                <isfailure code="${svn.exit.code}"/>
    251238            </condition>
    252239        </fail>
    253240    </target>
    254 
    255241    <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
    256242    </target>
  • applications/editors/josm/plugins/czechaddress/build.xml

    r25192 r26174  
     1<?xml version="1.0" encoding="utf-8"?>
    12<project name="czechaddress" default="dist" basedir=".">
    2     <property name="josm"                   location="../../core/dist/josm-custom.jar"/>
    3     <property name="plugin.dist.dir"        value="../../dist"/>
    4     <property name="plugin.build.dir"       value="build"/>
    5     <property name="plugin.jar"             value="${plugin.dist.dir}/${ant.project.name}.jar"/>
    6     <property name="plugin.manifest"        value="${plugin.build.dir}/org/openstreetmap/josm/plugins/czechaddress/MANIFEST.MF"/>
     3    <property name="josm" location="../../core/dist/josm-custom.jar"/>
     4    <property name="plugin.dist.dir" value="../../dist"/>
     5    <property name="plugin.build.dir" value="build"/>
     6    <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/>
     7    <property name="plugin.manifest" value="${plugin.build.dir}/org/openstreetmap/josm/plugins/czechaddress/MANIFEST.MF"/>
    78    <property name="ant.build.javac.target" value="1.5"/>
    8 
    9 
    10 
    119    <target name="clean" description="Removes all build files and the plugins's jar">
    1210        <delete dir="${plugin.build.dir}"/>
    1311        <delete file="${plugin.jar}"/>
    1412    </target>
    15 
    16 
    17 
    1813    <target name="init">
    1914        <mkdir dir="${plugin.build.dir}"/>
    2015        <mkdir dir="${plugin.dist.dir}"/>
    2116    </target>
    22 
    23 
    24 
    25     <target name="compile" depends="init,revision"
    26             description="Compile the plugin and make it ready for running">
    27 
    28         <javac srcdir="src"
    29                classpath="${josm}"
    30                debug="true"
    31                encoding="utf8"
    32                destdir="${plugin.build.dir}">
     17    <target name="compile" depends="init,revision" description="Compile the plugin and make it ready for running">
     18        <javac srcdir="src" classpath="${josm}" debug="true" encoding="utf8" destdir="${plugin.build.dir}">
    3319            <compilerarg value="-Xlint:deprecation"/>
    3420            <compilerarg value="-Xlint:unchecked"/>
    3521        </javac>
    36 
    3722        <copy todir="${plugin.build.dir}/images">
    3823            <fileset dir="images"/>
    3924        </copy>
    40 
     25        <copy todir="${plugin.build.dir}/data">
     26            <fileset dir="data"/>
     27        </copy>
    4128        <manifest file="${plugin.manifest}">
    4229            <attribute name="Author" value="Radomír Černoch"/>
     
    4835            <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
    4936        </manifest>
    50 
    5137    </target>
    52 
    53 
    54 
    5538    <target name="dist" depends="compile">
    56         <jar destfile="${plugin.jar}"
    57              basedir ="${plugin.build.dir}"
    58              manifest="${plugin.build.dir}/org/openstreetmap/josm/plugins/czechaddress/MANIFEST.MF"/>
     39        <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}" manifest="${plugin.build.dir}/org/openstreetmap/josm/plugins/czechaddress/MANIFEST.MF"/>
    5940    </target>
    60 
    61 
    62 
    6341    <target name="revision">
    6442        <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
     
    6846            <arg value="."/>
    6947        </exec>
    70         <xmlproperty file="REVISION" prefix="version"
    71                      keepRoot="false" collapseAttributes="true"/>
     48        <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
    7249        <delete file="REVISION"/>
    7350    </target>
    74 
    75 
    76 
    7751    <target name="install" depends="dist">
    7852        <property environment="env"/>
    79         <condition property="josm.plugins.dir"
    80                    value="${env.APPDATA}/JOSM/plugins"
    81                    else="${user.home}/.josm/plugins">
    82             <and><os family="windows"/></and>
     53        <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
     54            <and>
     55                <os family="windows"/>
     56            </and>
    8357        </condition>
    8458        <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
    8559    </target>
    86 
    87 
    88 
    8960    <target name="run" depends="compile">
    9061        <java classname="JOSM" fork="true">
     
    10374        </java>
    10475    </target>
    105 
    106 
    107 
    108     <target name="profile" depends="compile"
    109             description="Profile CzechAddress with Netbeans">
     76    <target name="profile" depends="compile" description="Profile CzechAddress with Netbeans">
    11077        <fail unless="netbeans.home">
    11178            This target can only run inside the NetBeans IDE.
     
    12996        </java>
    13097    </target>
    131 
    132     <target name="debug" depends="compile"
    133             description="Debug CzechAddress with Netbeans">
    134         <nbjpdastart addressproperty="jpda.address"
    135                      name="czechaddress"
    136                      transport="dt_socket"/>
     98    <target name="debug" depends="compile" description="Debug CzechAddress with Netbeans">
     99        <nbjpdastart addressproperty="jpda.address" name="czechaddress" transport="dt_socket"/>
    137100        <java classname="JOSM" fork="true">
    138101            <jvmarg value="-Xrunjdwp:transport=dt_socket,address=${jpda.address}"/>
     
    150113        </java>
    151114    </target>
    152 
    153115</project>
  • applications/editors/josm/plugins/dataimport/build.xml

    r25192 r26174  
    1 <?xml version="1.0" encoding="UTF-8"?>
     1<?xml version="1.0" encoding="utf-8"?>
    22<!--
    33** This is the build file for the dataimport plugin.
     
    2828-->
    2929<project name="dataimport" default="dist" basedir=".">
    30 
    31         <!-- enter the SVN commit message -->
    32         <property name="commit.message" value="Changed constructor signature, updated build.xml" />
    33         <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    34         <property name="plugin.main.version" value="3835" />
    35 
    36         <!--
     30    <!-- enter the SVN commit message -->
     31    <property name="commit.message" value="Changed constructor signature, updated build.xml"/>
     32    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
     33    <property name="plugin.main.version" value="3835"/>
     34    <!--
    3735      ************************************************
    3836      ** should not be necessary to change the following properties
    3937     -->
    40         <property name="josm"                   location="../../core/dist/josm-custom.jar"/>
    41         <property name="plugin.build.dir"       value="build"/>
    42         <property name="plugin.src.dir"         value="src"/>
    43         <!-- this is the directory where the plugin jar is copied to -->
    44         <property name="plugin.dist.dir"        value="../../dist"/>
    45         <property name="ant.build.javac.target" value="1.5"/>
    46         <property name="plugin.dist.dir"        value="../../dist"/>
    47         <property name="plugin.jar"             value="${plugin.dist.dir}/${ant.project.name}.jar"/>
    48 
    49         <!--
     38    <property name="josm" location="../../core/dist/josm-custom.jar"/>
     39    <property name="plugin.build.dir" value="build"/>
     40    <property name="plugin.src.dir" value="src"/>
     41    <!-- this is the directory where the plugin jar is copied to -->
     42    <property name="plugin.dist.dir" value="../../dist"/>
     43    <property name="ant.build.javac.target" value="1.5"/>
     44    <property name="plugin.dist.dir" value="../../dist"/>
     45    <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/>
     46    <!--
    5047    **********************************************************
    5148    ** init - initializes the build
    5249    **********************************************************
    5350    -->
    54         <target name="init">
    55                 <mkdir dir="${plugin.build.dir}"/>
    56         </target>
    57 
    58         <!--
     51    <target name="init">
     52        <mkdir dir="${plugin.build.dir}"/>
     53    </target>
     54    <!--
    5955    **********************************************************
    6056    ** compile - complies the source tree
    6157    **********************************************************
    6258    -->
    63         <target name="compile" depends="init">
    64                 <echo message="compiling sources for  ${plugin.jar} ... "/>
    65                 <javac srcdir="src" debug="true" destdir="${plugin.build.dir}">
    66                         <compilerarg value="-Xlint:deprecation"/>
    67                         <compilerarg value="-Xlint:unchecked"/>
    68                         <classpath>
    69                                 <pathelement location="${josm}"/>
    70                                 <fileset dir="lib">
    71                                         <include name="**/*.jar"/>
    72                                 </fileset>
    73                         </classpath>
    74                 </javac>
    75         </target>
    76 
    77         <!--
     59    <target name="compile" depends="init">
     60        <echo message="compiling sources for  ${plugin.jar} ... "/>
     61        <javac srcdir="src" debug="true" destdir="${plugin.build.dir}">
     62            <compilerarg value="-Xlint:deprecation"/>
     63            <compilerarg value="-Xlint:unchecked"/>
     64            <classpath>
     65                <pathelement location="${josm}"/>
     66                <fileset dir="lib">
     67                    <include name="**/*.jar"/>
     68                </fileset>
     69            </classpath>
     70        </javac>
     71    </target>
     72    <!--
    7873    **********************************************************
    7974    ** dist - creates the plugin jar
    8075    **********************************************************
    8176    -->
    82         <target name="dist" depends="compile,revision">
    83                 <echo message="creating ${ant.project.name}.jar ... "/>
    84                 <copy todir="${plugin.build.dir}">
    85                         <fileset dir=".">
    86                                 <include name="README" />
    87                                 <include name="LICENSE" />
    88                         </fileset>
    89                 </copy>
    90                 <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
    91                         <!--
     77    <target name="dist" depends="compile,revision">
     78        <echo message="creating ${ant.project.name}.jar ... "/>
     79        <copy todir="${plugin.build.dir}">
     80            <fileset dir=".">
     81                <include name="README"/>
     82                <include name="LICENSE"/>
     83            </fileset>
     84        </copy>
     85        <copy todir="${plugin.build.dir}/data">
     86            <fileset dir="data"/>
     87        </copy>
     88        <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
     89            <!--
    9290        ************************************************
    9391        ** configure these properties. Most of them will be copied to the plugins
     
    9795        ************************************************
    9896    -->
    99                         <zipfileset src="lib/jsr173-1.0_api.jar" includes="**/*.class"/>
    100                         <zipfileset src="lib/jaxb-api.jar" includes="**/*.class"/>
    101                         <zipfileset src="lib/jaxb-api.jar" includes="**/*.properties"/>
    102 
    103                         <zipfileset src="lib/jaxb-impl.jar" includes="**/*.class"/>
    104 
    105                         <manifest>
    106                                 <attribute name="Author" value="Dieter Muecke"/>
    107                                 <attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.dataimport.DataImportPlugin"/>
    108                                 <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
    109                                 <attribute name="Plugin-Description" value="Allows to import various file formats into JOSM directly."/>
    110                                 <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
    111                                 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
    112                         </manifest>
    113                 </jar>
    114         </target>
    115 
    116         <!--
     97            <zipfileset src="lib/jsr173-1.0_api.jar" includes="**/*.class"/>
     98            <zipfileset src="lib/jaxb-api.jar" includes="**/*.class"/>
     99            <zipfileset src="lib/jaxb-api.jar" includes="**/*.properties"/>
     100            <zipfileset src="lib/jaxb-impl.jar" includes="**/*.class"/>
     101            <manifest>
     102                <attribute name="Author" value="Dieter Muecke"/>
     103                <attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.dataimport.DataImportPlugin"/>
     104                <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
     105                <attribute name="Plugin-Description" value="Allows to import various file formats into JOSM directly."/>
     106                <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
     107                <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
     108            </manifest>
     109        </jar>
     110    </target>
     111    <!--
    117112    **********************************************************
    118113    ** revision - extracts the current revision number for the
     
    121116    **********************************************************
    122117    -->
    123         <target name="revision">
     118    <target name="revision">
     119        <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
     120            <env key="LANG" value="C"/>
     121            <arg value="info"/>
     122            <arg value="--xml"/>
     123            <arg value="."/>
     124        </exec>
     125        <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
     126        <delete file="REVISION"/>
     127    </target>
     128    <!--
     129    **********************************************************
     130    ** clean - clean up the build environment
     131    **********************************************************
     132    -->
     133    <target name="clean">
     134        <delete dir="${plugin.build.dir}"/>
     135        <delete file="${plugin.jar}"/>
     136    </target>
     137    <!--
     138    **********************************************************
     139    ** install - install the plugin in your local JOSM installation
     140    **********************************************************
     141    -->
     142    <target name="install" depends="dist">
     143        <property environment="env"/>
     144        <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
     145            <and>
     146                <os family="windows"/>
     147            </and>
     148        </condition>
     149        <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
     150    </target>
     151    <!--
     152    ************************** Publishing the plugin ***********************************
     153    -->
     154    <!--
     155        ** extracts the JOSM release for the JOSM version in ../core and saves it in the
     156        ** property ${coreversion.info.entry.revision}
     157        **
     158        -->
     159    <target name="core-info">
     160        <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
     161            <env key="LANG" value="C"/>
     162            <arg value="info"/>
     163            <arg value="--xml"/>
     164            <arg value="../../core"/>
     165        </exec>
     166        <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
     167        <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
     168        <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
     169        <delete file="core.info.xml"/>
     170    </target>
     171    <!--
     172        ** commits the source tree for this plugin
     173        -->
     174    <target name="commit-current">
     175        <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
     176        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     177            <env key="LANG" value="C"/>
     178            <arg value="commit"/>
     179            <arg value="-m '${commit.message}'"/>
     180            <arg value="."/>
     181        </exec>
     182    </target>
     183    <!--
     184        ** updates (svn up) the source tree for this plugin
     185        -->
     186    <target name="update-current">
     187        <echo>Updating plugin source ...</echo>
     188        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     189            <env key="LANG" value="C"/>
     190            <arg value="up"/>
     191            <arg value="."/>
     192        </exec>
     193        <echo>Updating ${plugin.jar} ...</echo>
     194        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     195            <env key="LANG" value="C"/>
     196            <arg value="up"/>
     197            <arg value="../dist/${plugin.jar}"/>
     198        </exec>
     199    </target>
     200    <!--
     201        ** commits the plugin.jar
     202        -->
     203    <target name="commit-dist">
     204        <echo>
     205    ***** Properties of published ${plugin.jar} *****
     206    Commit message    : '${commit.message}'
     207    Plugin-Mainversion: ${plugin.main.version}
     208    JOSM build version: ${coreversion.info.entry.revision}
     209    Plugin-Version    : ${version.entry.commit.revision}
     210    ***** / Properties of published ${plugin.jar} *****
    124211
    125                 <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
    126                         <env key="LANG" value="C"/>
    127                         <arg value="info"/>
    128                         <arg value="--xml"/>
    129                         <arg value="."/>
    130                 </exec>
    131                 <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
    132                 <delete file="REVISION"/>
    133         </target>
    134 
    135         <!--
    136     **********************************************************
    137     ** clean - clean up the build environment
    138     **********************************************************
    139     -->
    140         <target name="clean">
    141                 <delete dir="${plugin.build.dir}"/>
    142                 <delete file="${plugin.jar}"/>
    143         </target>
    144 
    145         <!--
    146     **********************************************************
    147     ** install - install the plugin in your local JOSM installation
    148     **********************************************************
    149     -->
    150         <target name="install" depends="dist">
    151                 <property environment="env"/>
    152                 <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
    153                         <and>
    154                                 <os family="windows"/>
    155                         </and>
    156                 </condition>
    157                 <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
    158         </target>
    159 
    160         <!--
    161         ************************** Publishing the plugin ***********************************
    162         -->
    163         <!--
    164                 ** extracts the JOSM release for the JOSM version in ../core and saves it in the
    165                 ** property ${coreversion.info.entry.revision}
    166                 **
    167                 -->
    168         <target name="core-info">
    169                 <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
    170                         <env key="LANG" value="C"/>
    171                         <arg value="info"/>
    172                         <arg value="--xml"/>
    173                         <arg value="../../core"/>
    174                 </exec>
    175                 <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
    176                 <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
    177                 <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
    178                 <delete file="core.info.xml" />
    179         </target>
    180 
    181         <!--
    182                 ** commits the source tree for this plugin
    183                 -->
    184         <target name="commit-current">
    185                 <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
    186                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    187                         <env key="LANG" value="C"/>
    188                         <arg value="commit"/>
    189                         <arg value="-m '${commit.message}'"/>
    190                         <arg value="."/>
    191                 </exec>
    192         </target>
    193 
    194         <!--
    195                 ** updates (svn up) the source tree for this plugin
    196                 -->
    197         <target name="update-current">
    198                 <echo>Updating plugin source ...</echo>
    199                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    200                         <env key="LANG" value="C"/>
    201                         <arg value="up"/>
    202                         <arg value="."/>
    203                 </exec>
    204                 <echo>Updating ${plugin.jar} ...</echo>
    205                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    206                         <env key="LANG" value="C"/>
    207                         <arg value="up"/>
    208                         <arg value="../dist/${plugin.jar}"/>
    209                 </exec>
    210         </target>
    211 
    212         <!--
    213                 ** commits the plugin.jar
    214                 -->
    215         <target name="commit-dist">
    216                 <echo>
    217         ***** Properties of published ${plugin.jar} *****
    218         Commit message    : '${commit.message}'
    219         Plugin-Mainversion: ${plugin.main.version}
    220         JOSM build version: ${coreversion.info.entry.revision}
    221         Plugin-Version    : ${version.entry.commit.revision}
    222         ***** / Properties of published ${plugin.jar} *****
    223 
    224         Now commiting ${plugin.jar} ...
    225         </echo>
    226                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    227                         <env key="LANG" value="C"/>
    228                         <arg value="-m '${commit.message}'"/>
    229                         <arg value="commit"/>
    230                         <arg value="${plugin.jar}"/>
    231                 </exec>
    232         </target>
    233 
    234         <!-- ** make sure svn is present as a command line tool ** -->
    235         <target name="ensure-svn-present">
    236                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
    237                         <env key="LANG" value="C" />
    238                         <arg value="--version" />
    239                 </exec>
    240                 <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
    241                         <!-- return code not set at all? Most likely svn isn't installed -->
    242                         <condition>
    243                                 <not>
    244                                         <isset property="svn.exit.code" />
    245                                 </not>
    246                         </condition>
    247                 </fail>
    248                 <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
    249                         <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
    250                         <condition>
    251                                 <isfailure code="${svn.exit.code}" />
    252                         </condition>
    253                 </fail>
    254         </target>
    255 
    256         <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
    257         </target>
     212    Now commiting ${plugin.jar} ...
     213    </echo>
     214        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     215            <env key="LANG" value="C"/>
     216            <arg value="-m '${commit.message}'"/>
     217            <arg value="commit"/>
     218            <arg value="${plugin.jar}"/>
     219        </exec>
     220    </target>
     221    <!-- ** make sure svn is present as a command line tool ** -->
     222    <target name="ensure-svn-present">
     223        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
     224            <env key="LANG" value="C"/>
     225            <arg value="--version"/>
     226        </exec>
     227        <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
     228            <!-- return code not set at all? Most likely svn isn't installed -->
     229            <condition>
     230                <not>
     231                    <isset property="svn.exit.code"/>
     232                </not>
     233            </condition>
     234        </fail>
     235        <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
     236            <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
     237            <condition>
     238                <isfailure code="${svn.exit.code}"/>
     239            </condition>
     240        </fail>
     241    </target>
     242    <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
     243    </target>
    258244</project>
  • applications/editors/josm/plugins/download_along/build.xml

    r25190 r26174  
    1 <?xml version="1.0" encoding="UTF-8"?>
     1<?xml version="1.0" encoding="utf-8"?>
    22<!--
    33** This is a template build file for a JOSM  plugin.
     
    2929-->
    3030<project name="download_along" default="dist" basedir=".">
    31 
    32         <!-- enter the SVN commit message -->
    33         <property name="commit.message" value="Changed the constructor signature of the plugin main class" />
    34         <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    35         <property name="plugin.main.version" value="3835" />
    36 
    37         <!--
     31    <!-- enter the SVN commit message -->
     32    <property name="commit.message" value="Changed the constructor signature of the plugin main class"/>
     33    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
     34    <property name="plugin.main.version" value="3835"/>
     35    <!--
    3836      ************************************************
    3937      ** should not be necessary to change the following properties
    4038     -->
    41         <property name="josm"                   location="../../core/dist/josm-custom.jar"/>
    42         <property name="plugin.build.dir"       value="build"/>
    43         <property name="plugin.src.dir"         value="src"/>
    44         <!-- this is the directory where the plugin jar is copied to -->
    45         <property name="plugin.dist.dir"        value="../../dist"/>
    46         <property name="ant.build.javac.target" value="1.5"/>
    47         <property name="plugin.dist.dir"        value="../../dist"/>
    48         <property name="plugin.jar"             value="${plugin.dist.dir}/${ant.project.name}.jar"/>
    49 
    50         <!--
     39    <property name="josm" location="../../core/dist/josm-custom.jar"/>
     40    <property name="plugin.build.dir" value="build"/>
     41    <property name="plugin.src.dir" value="src"/>
     42    <!-- this is the directory where the plugin jar is copied to -->
     43    <property name="plugin.dist.dir" value="../../dist"/>
     44    <property name="ant.build.javac.target" value="1.5"/>
     45    <property name="plugin.dist.dir" value="../../dist"/>
     46    <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/>
     47    <!--
    5148    **********************************************************
    5249    ** init - initializes the build
    5350    **********************************************************
    5451    -->
    55         <target name="init">
    56                 <mkdir dir="${plugin.build.dir}"/>
    57         </target>
    58 
    59         <!--
     52    <target name="init">
     53        <mkdir dir="${plugin.build.dir}"/>
     54    </target>
     55    <!--
    6056    **********************************************************
    6157    ** compile - complies the source tree
    6258    **********************************************************
    6359    -->
    64         <target name="compile" depends="init">
    65                 <echo message="compiling sources for  ${plugin.jar} ... "/>
    66                 <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}">
    67                         <compilerarg value="-Xlint:deprecation"/>
    68                         <compilerarg value="-Xlint:unchecked"/>
    69                 </javac>
    70         </target>
    71 
    72         <!--
     60    <target name="compile" depends="init">
     61        <echo message="compiling sources for  ${plugin.jar} ... "/>
     62        <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}">
     63            <compilerarg value="-Xlint:deprecation"/>
     64            <compilerarg value="-Xlint:unchecked"/>
     65        </javac>
     66    </target>
     67    <!--
    7368    **********************************************************
    7469    ** dist - creates the plugin jar
    7570    **********************************************************
    7671    -->
    77         <target name="dist" depends="compile,revision">
    78                 <echo message="creating ${plugin.jar.name} ... "/>
    79                 <copy todir="${plugin.build.dir}/images">
    80                         <fileset dir="images"/>
    81                 </copy>
    82                 <copy todir="${plugin.build.dir}">
    83                         <fileset dir=".">
    84                                 <include name="README" />
    85                                 <include name="LICENSE" />
    86                         </fileset>
    87                 </copy>
    88                 <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
    89                         <!--
     72    <target name="dist" depends="compile,revision">
     73        <echo message="creating ${plugin.jar.name} ... "/>
     74        <copy todir="${plugin.build.dir}/images">
     75            <fileset dir="images"/>
     76        </copy>
     77        <copy todir="${plugin.build.dir}/data">
     78            <fileset dir="data"/>
     79        </copy>
     80        <copy todir="${plugin.build.dir}">
     81            <fileset dir=".">
     82                <include name="README"/>
     83                <include name="LICENSE"/>
     84            </fileset>
     85        </copy>
     86        <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
     87            <!--
    9088        ************************************************
    9189        ** configure these properties. Most of them will be copied to the plugins
     
    9593        ************************************************
    9694    -->
    97                         <manifest>
    98                                 <attribute name="Author" value="Nakor"/>
    99                                 <attribute name="Plugin-Class" value="org.openstreetmap.josm.plugin.download_along.DownloadAlong"/>
    100                                 <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
    101                                 <attribute name="Plugin-Description" value="Downloads OSM data along a way"/>
    102                                 <attribute name="Plugin-Icon" value="images/download_along.png"/>
    103                                 <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/wiki/JOSM/Plugins/DownloadAlong"/>
    104                                 <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
    105                                 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
    106                         </manifest>
    107                 </jar>
    108         </target>
    109 
    110         <!--
     95            <manifest>
     96                <attribute name="Author" value="Nakor"/>
     97                <attribute name="Plugin-Class" value="org.openstreetmap.josm.plugin.download_along.DownloadAlong"/>
     98                <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
     99                <attribute name="Plugin-Description" value="Downloads OSM data along a way"/>
     100                <attribute name="Plugin-Icon" value="images/download_along.png"/>
     101                <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/wiki/JOSM/Plugins/DownloadAlong"/>
     102                <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
     103                <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
     104            </manifest>
     105        </jar>
     106    </target>
     107    <!--
    111108    **********************************************************
    112109    ** revision - extracts the current revision number for the
     
    115112    **********************************************************
    116113    -->
    117         <target name="revision">
    118 
    119                 <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
    120                         <env key="LANG" value="C"/>
    121                         <arg value="info"/>
    122                         <arg value="--xml"/>
    123                         <arg value="."/>
    124                 </exec>
    125                 <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
    126                 <delete file="REVISION"/>
    127         </target>
    128 
    129         <!--
     114    <target name="revision">
     115        <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
     116            <env key="LANG" value="C"/>
     117            <arg value="info"/>
     118            <arg value="--xml"/>
     119            <arg value="."/>
     120        </exec>
     121        <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
     122        <delete file="REVISION"/>
     123    </target>
     124    <!--
    130125    **********************************************************
    131126    ** clean - clean up the build environment
    132127    **********************************************************
    133128    -->
    134         <target name="clean">
    135                 <delete dir="${plugin.build.dir}"/>
    136                 <delete file="${plugin.jar}"/>
    137         </target>
    138 
    139         <!--
     129    <target name="clean">
     130        <delete dir="${plugin.build.dir}"/>
     131        <delete file="${plugin.jar}"/>
     132    </target>
     133    <!--
    140134    **********************************************************
    141135    ** install - install the plugin in your local JOSM installation
    142136    **********************************************************
    143137    -->
    144         <target name="install" depends="dist">
    145                 <property environment="env"/>
    146                 <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
    147                         <and>
    148                                 <os family="windows"/>
    149                         </and>
    150                 </condition>
    151                 <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
    152         </target>
    153 
    154         <!--
    155         ************************** Publishing the plugin ***********************************
    156         -->
    157         <!--
    158                 ** extracts the JOSM release for the JOSM version in ../core and saves it in the
    159                 ** property ${coreversion.info.entry.revision}
    160                 **
    161                 -->
    162         <target name="core-info">
    163                 <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
    164                         <env key="LANG" value="C"/>
    165                         <arg value="info"/>
    166                         <arg value="--xml"/>
    167                         <arg value="../../core"/>
    168                 </exec>
    169                 <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
    170                 <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
    171                 <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
    172                 <delete file="core.info.xml" />
    173         </target>
    174 
    175         <!--
    176                 ** commits the source tree for this plugin
    177                 -->
    178         <target name="commit-current">
    179                 <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
    180                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    181                         <env key="LANG" value="C"/>
    182                         <arg value="commit"/>
    183                         <arg value="-m '${commit.message}'"/>
    184                         <arg value="."/>
    185                 </exec>
    186         </target>
    187 
    188         <!--
    189                 ** updates (svn up) the source tree for this plugin
    190                 -->
    191         <target name="update-current">
    192                 <echo>Updating plugin source ...</echo>
    193                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    194                         <env key="LANG" value="C"/>
    195                         <arg value="up"/>
    196                         <arg value="."/>
    197                 </exec>
    198                 <echo>Updating ${plugin.jar} ...</echo>
    199                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    200                         <env key="LANG" value="C"/>
    201                         <arg value="up"/>
    202                         <arg value="../dist/${plugin.jar}"/>
    203                 </exec>
    204         </target>
    205 
    206         <!--
    207                 ** commits the plugin.jar
    208                 -->
    209         <target name="commit-dist">
    210                 <echo>
    211         ***** Properties of published ${plugin.jar} *****
    212         Commit message    : '${commit.message}'                                 
    213         Plugin-Mainversion: ${plugin.main.version}
    214         JOSM build version: ${coreversion.info.entry.revision}
    215         Plugin-Version    : ${version.entry.commit.revision}
    216         ***** / Properties of published ${plugin.jar} *****                                     
    217                                                
    218         Now commiting ${plugin.jar} ...
    219         </echo>
    220                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    221                         <env key="LANG" value="C"/>
    222                         <arg value="-m '${commit.message}'"/>
    223                         <arg value="commit"/>
    224                         <arg value="${plugin.jar}"/>
    225                 </exec>
    226         </target>
    227 
    228         <!-- ** make sure svn is present as a command line tool ** -->
    229         <target name="ensure-svn-present">
    230                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
    231                         <env key="LANG" value="C" />
    232                         <arg value="--version" />
    233                 </exec>
    234                 <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
    235                         <!-- return code not set at all? Most likely svn isn't installed -->
    236                         <condition>
    237                                 <not>
    238                                         <isset property="svn.exit.code" />
    239                                 </not>
    240                         </condition>
    241                 </fail>
    242                 <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
    243                         <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
    244                         <condition>
    245                                 <isfailure code="${svn.exit.code}" />
    246                         </condition>
    247                 </fail>
    248         </target>
    249 
    250         <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
    251         </target>
     138    <target name="install" depends="dist">
     139        <property environment="env"/>
     140        <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
     141            <and>
     142                <os family="windows"/>
     143            </and>
     144        </condition>
     145        <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
     146    </target>
     147    <!--
     148    ************************** Publishing the plugin ***********************************
     149    -->
     150    <!--
     151        ** extracts the JOSM release for the JOSM version in ../core and saves it in the
     152        ** property ${coreversion.info.entry.revision}
     153        **
     154        -->
     155    <target name="core-info">
     156        <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
     157            <env key="LANG" value="C"/>
     158            <arg value="info"/>
     159            <arg value="--xml"/>
     160            <arg value="../../core"/>
     161        </exec>
     162        <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
     163        <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
     164        <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
     165        <delete file="core.info.xml"/>
     166    </target>
     167    <!--
     168        ** commits the source tree for this plugin
     169        -->
     170    <target name="commit-current">
     171        <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
     172        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     173            <env key="LANG" value="C"/>
     174            <arg value="commit"/>
     175            <arg value="-m '${commit.message}'"/>
     176            <arg value="."/>
     177        </exec>
     178    </target>
     179    <!--
     180        ** updates (svn up) the source tree for this plugin
     181        -->
     182    <target name="update-current">
     183        <echo>Updating plugin source ...</echo>
     184        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     185            <env key="LANG" value="C"/>
     186            <arg value="up"/>
     187            <arg value="."/>
     188        </exec>
     189        <echo>Updating ${plugin.jar} ...</echo>
     190        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     191            <env key="LANG" value="C"/>
     192            <arg value="up"/>
     193            <arg value="../dist/${plugin.jar}"/>
     194        </exec>
     195    </target>
     196    <!--
     197        ** commits the plugin.jar
     198        -->
     199    <target name="commit-dist">
     200        <echo>
     201    ***** Properties of published ${plugin.jar} *****
     202    Commit message    : '${commit.message}'                 
     203    Plugin-Mainversion: ${plugin.main.version}
     204    JOSM build version: ${coreversion.info.entry.revision}
     205    Plugin-Version    : ${version.entry.commit.revision}
     206    ***** / Properties of published ${plugin.jar} *****                 
     207                       
     208    Now commiting ${plugin.jar} ...
     209    </echo>
     210        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     211            <env key="LANG" value="C"/>
     212            <arg value="-m '${commit.message}'"/>
     213            <arg value="commit"/>
     214            <arg value="${plugin.jar}"/>
     215        </exec>
     216    </target>
     217    <!-- ** make sure svn is present as a command line tool ** -->
     218    <target name="ensure-svn-present">
     219        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
     220            <env key="LANG" value="C"/>
     221            <arg value="--version"/>
     222        </exec>
     223        <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
     224            <!-- return code not set at all? Most likely svn isn't installed -->
     225            <condition>
     226                <not>
     227                    <isset property="svn.exit.code"/>
     228                </not>
     229            </condition>
     230        </fail>
     231        <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
     232            <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
     233            <condition>
     234                <isfailure code="${svn.exit.code}"/>
     235            </condition>
     236        </fail>
     237    </target>
     238    <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
     239    </target>
    252240</project>
  • applications/editors/josm/plugins/editgpx/build.xml

    r25192 r26174  
    1 <?xml version="1.0" encoding="UTF-8"?>
     1<?xml version="1.0" encoding="utf-8"?>
    22<!--
    33** This is the build file for the editgpx plugin
     
    2626-->
    2727<project name="editgpx" default="dist" basedir=".">
    28 
    29 
    30         <property name="commit.message" value="Changed constructor signature of plugin main class" />
    31         <property name="plugin.main.version" value="3835" />
    32 
    33 
    34         <property name="josm"                   location="../../core/dist/josm-custom.jar"/>
    35         <property name="plugin.dist.dir"        value="../../dist"/>
    36         <property name="plugin.build.dir"       value="build"/>
    37         <property name="plugin.jar"             value="${plugin.dist.dir}/${ant.project.name}.jar"/>
    38         <property name="ant.build.javac.target" value="1.5"/>
    39         <target name="init">
    40                 <mkdir dir="${plugin.build.dir}"/>
    41         </target>
    42         <target name="compile" depends="init">
    43                 <echo message="creating ${plugin.jar}"/>
    44                 <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}">
    45                         <compilerarg value="-Xlint:deprecation"/>
    46                         <compilerarg value="-Xlint:unchecked"/>
    47                 </javac>
    48         </target>
    49         <target name="dist" depends="compile,revision">
    50                 <copy todir="${plugin.build.dir}/images">
    51                         <fileset dir="images"/>
    52                 </copy>
    53                 <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
    54                         <manifest>
    55                                 <attribute name="Author" value="Martin Garbe" />
    56                                 <attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.editgpx.EditGpxPlugin" />
    57                                 <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
    58                                 <attribute name="Plugin-Description" value="Allows the user to anonymize timestamps and delete parts of huge GPX tracks very fast." />
    59                                 <attribute name="Plugin-Icon" value="images/mapmode/editgpx_mode.png"/>
    60                                 <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/wiki/JOSM/Plugins/EditGpx" />
    61                                 <attribute name="Plugin-Mainversion" value="${plugin.main.version}" />
    62                                 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
    63                         </manifest>
    64                 </jar>
    65         </target>
    66         <target name="revision">
    67                 <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
    68                         <env key="LANG" value="C"/>
    69                         <arg value="info"/>
    70                         <arg value="--xml"/>
    71                         <arg value="."/>
    72                 </exec>
    73                 <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
    74                 <delete file="REVISION"/>
    75         </target>
    76         <target name="clean">
    77                 <delete dir="${plugin.build.dir}"/>
    78                 <delete file="${plugin.jar}"/>
    79         </target>
    80         <target name="install" depends="dist">
    81                 <property environment="env"/>
    82                 <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
    83                         <and>
    84                                 <os family="windows"/>
    85                         </and>
    86                 </condition>
    87                 <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
    88         </target>
    89 
    90         <!--
    91          ************************** Publishing the plugin ***********************************
    92         -->
    93         <!--
    94         ** extracts the JOSM release for the JOSM version in ../core and saves it in the
    95         ** property ${coreversion.info.entry.revision}
    96         **
    97         -->
    98         <target name="core-info">
    99                 <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
    100                         <env key="LANG" value="C"/>
    101                         <arg value="info"/>
    102                         <arg value="--xml"/>
    103                         <!-- <arg value="../../core"/>-->
    104                         <arg value="../JOSM"/>
    105                 </exec>
    106                 <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
    107                 <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
    108                 <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
    109                 <delete file="core.info.xml" />
    110         </target>
    111 
    112         <!--
    113         ** commits the source tree for this plugin
    114         -->
    115         <target name="commit-current">
    116                 <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
    117                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    118                         <env key="LANG" value="C"/>
    119                         <arg value="commit"/>
    120                         <arg value="-m '${commit.message}'"/>
    121                         <arg value="."/>
    122                 </exec>
    123         </target>
    124 
    125         <!--
    126         ** updates (svn up) the source tree for this plugin
    127         -->
    128         <target name="update-current">
    129                 <echo>Updating plugin source ...</echo>
    130                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    131                         <env key="LANG" value="C"/>
    132                         <arg value="up"/>
    133                         <arg value="."/>
    134                 </exec>
    135                 <echo>Updating ${plugin.jar} ...</echo>
    136                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    137                         <env key="LANG" value="C"/>
    138                         <arg value="up"/>
    139                         <arg value="../dist/${plugin.jar}"/>
    140                 </exec>
    141         </target>
    142 
    143         <!--
    144         ** commits the plugin.jar
    145         -->
    146         <target name="commit-dist">
    147                 <echo>
     28    <property name="commit.message" value="Changed constructor signature of plugin main class"/>
     29    <property name="plugin.main.version" value="3835"/>
     30    <property name="josm" location="../../core/dist/josm-custom.jar"/>
     31    <property name="plugin.dist.dir" value="../../dist"/>
     32    <property name="plugin.build.dir" value="build"/>
     33    <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/>
     34    <property name="ant.build.javac.target" value="1.5"/>
     35    <target name="init">
     36        <mkdir dir="${plugin.build.dir}"/>
     37    </target>
     38    <target name="compile" depends="init">
     39        <echo message="creating ${plugin.jar}"/>
     40        <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}">
     41            <compilerarg value="-Xlint:deprecation"/>
     42            <compilerarg value="-Xlint:unchecked"/>
     43        </javac>
     44    </target>
     45    <target name="dist" depends="compile,revision">
     46        <copy todir="${plugin.build.dir}/images">
     47            <fileset dir="images"/>
     48        </copy>
     49        <copy todir="${plugin.build.dir}/data">
     50            <fileset dir="data"/>
     51        </copy>
     52        <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
     53            <manifest>
     54                <attribute name="Author" value="Martin Garbe"/>
     55                <attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.editgpx.EditGpxPlugin"/>
     56                <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
     57                <attribute name="Plugin-Description" value="Allows the user to anonymize timestamps and delete parts of huge GPX tracks very fast."/>
     58                <attribute name="Plugin-Icon" value="images/mapmode/editgpx_mode.png"/>
     59                <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/wiki/JOSM/Plugins/EditGpx"/>
     60                <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
     61                <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
     62            </manifest>
     63        </jar>
     64    </target>
     65    <target name="revision">
     66        <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
     67            <env key="LANG" value="C"/>
     68            <arg value="info"/>
     69            <arg value="--xml"/>
     70            <arg value="."/>
     71        </exec>
     72        <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
     73        <delete file="REVISION"/>
     74    </target>
     75    <target name="clean">
     76        <delete dir="${plugin.build.dir}"/>
     77        <delete file="${plugin.jar}"/>
     78    </target>
     79    <target name="install" depends="dist">
     80        <property environment="env"/>
     81        <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
     82            <and>
     83                <os family="windows"/>
     84            </and>
     85        </condition>
     86        <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
     87    </target>
     88    <!--
     89     ************************** Publishing the plugin ***********************************
     90    -->
     91    <!--
     92    ** extracts the JOSM release for the JOSM version in ../core and saves it in the
     93    ** property ${coreversion.info.entry.revision}
     94    **
     95    -->
     96    <target name="core-info">
     97        <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
     98            <env key="LANG" value="C"/>
     99            <arg value="info"/>
     100            <arg value="--xml"/>
     101            <!-- <arg value="../../core"/>-->
     102            <arg value="../JOSM"/>
     103        </exec>
     104        <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
     105        <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
     106        <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
     107        <delete file="core.info.xml"/>
     108    </target>
     109    <!--
     110    ** commits the source tree for this plugin
     111    -->
     112    <target name="commit-current">
     113        <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
     114        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     115            <env key="LANG" value="C"/>
     116            <arg value="commit"/>
     117            <arg value="-m '${commit.message}'"/>
     118            <arg value="."/>
     119        </exec>
     120    </target>
     121    <!--
     122    ** updates (svn up) the source tree for this plugin
     123    -->
     124    <target name="update-current">
     125        <echo>Updating plugin source ...</echo>
     126        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     127            <env key="LANG" value="C"/>
     128            <arg value="up"/>
     129            <arg value="."/>
     130        </exec>
     131        <echo>Updating ${plugin.jar} ...</echo>
     132        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     133            <env key="LANG" value="C"/>
     134            <arg value="up"/>
     135            <arg value="../dist/${plugin.jar}"/>
     136        </exec>
     137    </target>
     138    <!--
     139    ** commits the plugin.jar
     140    -->
     141    <target name="commit-dist">
     142        <echo>
    148143***** Properties of published ${plugin.jar} *****
    149144Commit message    : '${commit.message}'
     
    155150Now commiting ${plugin.jar} ...
    156151</echo>
    157                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    158                         <env key="LANG" value="C"/>
    159                         <arg value="-m '${commit.message}'"/>
    160                         <arg value="commit"/>
    161                         <arg value="${plugin.jar}"/>
    162                 </exec>
    163         </target>
    164 
    165         <!-- ** make sure svn is present as a command line tool ** -->
    166         <target name="ensure-svn-present">
    167                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
    168                         <env key="LANG" value="C" />
    169                         <arg value="--version" />
    170                 </exec>
    171                 <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
    172                         <!-- return code not set at all? Most likely svn isn't installed -->
    173                         <condition>
    174                                 <not>
    175                                         <isset property="svn.exit.code" />
    176                                 </not>
    177                         </condition>
    178                 </fail>
    179                 <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
    180                         <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
    181                         <condition>
    182                                 <isfailure code="${svn.exit.code}" />
    183                         </condition>
    184                 </fail>
    185         </target>
    186 
    187         <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
    188         </target>
     152        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     153            <env key="LANG" value="C"/>
     154            <arg value="-m '${commit.message}'"/>
     155            <arg value="commit"/>
     156            <arg value="${plugin.jar}"/>
     157        </exec>
     158    </target>
     159    <!-- ** make sure svn is present as a command line tool ** -->
     160    <target name="ensure-svn-present">
     161        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
     162            <env key="LANG" value="C"/>
     163            <arg value="--version"/>
     164        </exec>
     165        <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
     166            <!-- return code not set at all? Most likely svn isn't installed -->
     167            <condition>
     168                <not>
     169                    <isset property="svn.exit.code"/>
     170                </not>
     171            </condition>
     172        </fail>
     173        <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
     174            <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
     175            <condition>
     176                <isfailure code="${svn.exit.code}"/>
     177            </condition>
     178        </fail>
     179    </target>
     180    <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
     181    </target>
    189182</project>
  • applications/editors/josm/plugins/epsg31287/build.xml

    r25262 r26174  
    1 <?xml version="1.0" encoding="UTF-8"?>
     1<?xml version="1.0" encoding="utf-8"?>
    22<!--
    33** This is a template build file for a JOSM  plugin.
     
    2929-->
    3030<project name="epsg31287" default="dist" basedir=".">
    31 
    3231    <!-- read build.properties for local settings -->
    33     <property file="build.properties" />
     32    <property file="build.properties"/>
    3433    <!-- enter the SVN command file name -->
    35     <property name="svn" value="svn" />
     34    <property name="svn" value="svn"/>
    3635    <!-- enter the SVN commit message -->
    37     <property name="commit.message" value="fixed proj4 Parameters (thanks to Hetzi + Mikael Rittri)" />
     36    <property name="commit.message" value="fixed proj4 Parameters (thanks to Hetzi + Mikael Rittri)"/>
    3837    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    39     <property name="plugin.main.version" value="3872" />
    40 
    41 
     38    <property name="plugin.main.version" value="3872"/>
    4239    <!--
    4340      ************************************************
    4441      ** should not be necessary to change the following properties
    4542     -->
    46     <property name="josm"                   location="../../core/dist/josm-custom.jar"/>
    47     <property name="plugin.build.dir"       value="build"/>
    48     <property name="plugin.src.dir"         value="src"/>
     43    <property name="josm" location="../../core/dist/josm-custom.jar"/>
     44    <property name="plugin.build.dir" value="build"/>
     45    <property name="plugin.src.dir" value="src"/>
    4946    <!-- this is the directory where the plugin jar is copied to -->
    50     <property name="plugin.dist.dir"        value="../../dist"/>
     47    <property name="plugin.dist.dir" value="../../dist"/>
    5148    <property name="ant.build.javac.target" value="1.5"/>
    52     <property name="plugin.dist.dir"        value="../../dist"/>
    53     <property name="plugin.jar"             value="${plugin.dist.dir}/${ant.project.name}.jar"/>
    54 
     49    <property name="plugin.dist.dir" value="../../dist"/>
     50    <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/>
    5551    <!--
    5652    **********************************************************
     
    6157        <mkdir dir="${plugin.build.dir}"/>
    6258    </target>
    63 
    6459    <!--
    6560    **********************************************************
     
    7469        </javac>
    7570    </target>
    76 
    7771    <!--
    7872    **********************************************************
     
    8882            <fileset dir="images"/>
    8983        </copy>
     84        <copy todir="${plugin.build.dir}/data">
     85            <fileset dir="data"/>
     86        </copy>
    9087        <copy todir="${plugin.build.dir}">
    9188            <fileset dir=".">
    92                 <include name="README" />
    93                 <include name="LICENSE" />
     89                <include name="README"/>
     90                <include name="LICENSE"/>
    9491            </fileset>
    9592        </copy>
    9693        <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
    97                 <!-- <zipfileset src="lib/javaproj-1.0.6.jar" /> -->
     94            <!-- <zipfileset src="lib/javaproj-1.0.6.jar" /> -->
    9895            <!--
    9996        ************************************************
     
    112109                <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
    113110                <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
    114                 <!-- <attribute name="Plugin-Version" value="0.3"/> -->
     111                <!-- <attribute name="Plugin-Version" value="0.3"/> -->
    115112            </manifest>
    116113        </jar>
    117114    </target>
    118 
    119115    <!--
    120116    **********************************************************
     
    125121    -->
    126122    <target name="revision">
    127 
    128123        <exec append="false" output="REVISION" executable="${svn}" failifexecutionfails="false">
    129124            <env key="LANG" value="C"/>
     
    135130        <delete file="REVISION"/>
    136131    </target>
    137 
    138132    <!--
    139133    **********************************************************
     
    145139        <delete file="${plugin.jar}"/>
    146140    </target>
    147 
    148141    <!--
    149142    **********************************************************
     
    160153        <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
    161154    </target>
    162 
    163 
    164155    <!--
    165156    ************************** Publishing the plugin ***********************************
     
    180171        <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
    181172        <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
    182         <delete file="core.info.xml" />
    183     </target>
    184 
     173        <delete file="core.info.xml"/>
     174    </target>
    185175    <!--
    186176        ** commits the source tree for this plugin
     
    193183            <arg value="-m '${commit.message}'"/>
    194184            <arg value="."/>
    195                 <arg value="${svn.username_arg}"/>
    196                 <arg value="${svn.username}"/>
    197                 <arg value="${svn.password_arg}"/>
    198                 <arg value="${svn.password}"/>
    199         </exec>
    200     </target>
    201 
     185            <arg value="${svn.username_arg}"/>
     186            <arg value="${svn.username}"/>
     187            <arg value="${svn.password_arg}"/>
     188            <arg value="${svn.password}"/>
     189        </exec>
     190    </target>
    202191    <!--
    203192        ** updates (svn up) the source tree for this plugin
     
    217206        </exec>
    218207    </target>
    219 
    220208    <!--
    221209        ** commits the plugin.jar
     
    237225            <arg value="commit"/>
    238226            <arg value="${plugin.jar}"/>
    239                 <arg value="${svn.username_arg}"/>
    240                 <arg value="${svn.username}"/>
    241                 <arg value="${svn.password_arg}"/>
    242                 <arg value="${svn.password}"/>
    243         </exec>
    244     </target>
    245 
     227            <arg value="${svn.username_arg}"/>
     228            <arg value="${svn.username}"/>
     229            <arg value="${svn.password_arg}"/>
     230            <arg value="${svn.password}"/>
     231        </exec>
     232    </target>
    246233    <!-- ** make sure svn is present as a command line tool ** -->
    247234    <target name="ensure-svn-present">
    248235        <exec append="true" output="svn.log" executable="${svn}" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
    249             <env key="LANG" value="C" />
    250             <arg value="--version" />
     236            <env key="LANG" value="C"/>
     237            <arg value="--version"/>
    251238        </exec>
    252239        <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
     
    254241            <condition>
    255242                <not>
    256                     <isset property="svn.exit.code" />
     243                    <isset property="svn.exit.code"/>
    257244                </not>
    258245            </condition>
     
    261248            <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
    262249            <condition>
    263                 <isfailure code="${svn.exit.code}" />
     250                <isfailure code="${svn.exit.code}"/>
    264251            </condition>
    265252        </fail>
    266253    </target>
    267 
    268254    <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
    269255    </target>
  • applications/editors/josm/plugins/ext_tools/build.xml

    r25933 r26174  
    1 <?xml version="1.0" encoding="UTF-8"?>
     1<?xml version="1.0" encoding="utf-8"?>
    22<!--
    33** This is a template build file for a JOSM  plugin.
     
    2929-->
    3030<project name="ext_tools" default="dist" basedir=".">
    31 
    32         <!-- enter the SVN commit message -->
    33         <property name="commit.message" value="show error if script cannot be executed" />
    34         <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    35         <property name="plugin.main.version" value="4065" />
    36 
    37 
    38         <!--
     31    <!-- enter the SVN commit message -->
     32    <property name="commit.message" value="show error if script cannot be executed"/>
     33    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
     34    <property name="plugin.main.version" value="4065"/>
     35    <!--
    3936      ************************************************
    4037      ** should not be necessary to change the following properties
    4138     -->
    42         <property name="josm"                   location="../../core/dist/josm-custom.jar"/>
    43         <property name="plugin.build.dir"       value="build"/>
    44         <property name="plugin.src.dir"         value="src"/>
    45         <!-- this is the directory where the plugin jar is copied to -->
    46         <property name="plugin.dist.dir"        value="../../dist"/>
    47         <property name="ant.build.javac.target" value="1.5"/>
    48         <property name="plugin.dist.dir"        value="../../dist"/>
    49         <property name="plugin.jar"             value="${plugin.dist.dir}/${ant.project.name}.jar"/>
    50 
    51         <!--
     39    <property name="josm" location="../../core/dist/josm-custom.jar"/>
     40    <property name="plugin.build.dir" value="build"/>
     41    <property name="plugin.src.dir" value="src"/>
     42    <!-- this is the directory where the plugin jar is copied to -->
     43    <property name="plugin.dist.dir" value="../../dist"/>
     44    <property name="ant.build.javac.target" value="1.5"/>
     45    <property name="plugin.dist.dir" value="../../dist"/>
     46    <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/>
     47    <!--
    5248    **********************************************************
    5349    ** init - initializes the build
    5450    **********************************************************
    5551    -->
    56         <target name="init">
    57                 <mkdir dir="${plugin.build.dir}"/>
    58         </target>
    59 
    60         <!--
     52    <target name="init">
     53        <mkdir dir="${plugin.build.dir}"/>
     54    </target>
     55    <!--
    6156    **********************************************************
    6257    ** compile - complies the source tree
    6358    **********************************************************
    6459    -->
    65         <target name="compile" depends="init">
    66                 <echo message="compiling sources for  ${plugin.jar} ... "/>
    67                 <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}">
    68                         <compilerarg value="-Xlint:deprecation"/>
    69                         <compilerarg value="-Xlint:unchecked"/>
    70                 </javac>
    71         </target>
    72 
    73         <!--
     60    <target name="compile" depends="init">
     61        <echo message="compiling sources for  ${plugin.jar} ... "/>
     62        <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}">
     63            <compilerarg value="-Xlint:deprecation"/>
     64            <compilerarg value="-Xlint:unchecked"/>
     65        </javac>
     66    </target>
     67    <!--
    7468    **********************************************************
    7569    ** dist - creates the plugin jar
    7670    **********************************************************
    7771    -->
    78         <target name="dist" depends="compile,revision">
    79                 <echo message="creating ${ant.project.name}.jar ... "/>
    80                 <copy todir="${plugin.build.dir}/resources">
    81                         <fileset dir="resources"/>
    82                 </copy>
    83                 <copy todir="${plugin.build.dir}/images">
    84                         <fileset dir="images"/>
    85                 </copy>
    86                 <copy todir="${plugin.build.dir}">
    87                         <fileset dir=".">
    88                                 <include name="README" />
    89                                 <include name="LICENSE" />
    90                         </fileset>
    91                 </copy>
    92                 <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
    93                         <!--
     72    <target name="dist" depends="compile,revision">
     73        <echo message="creating ${ant.project.name}.jar ... "/>
     74        <copy todir="${plugin.build.dir}/resources">
     75            <fileset dir="resources"/>
     76        </copy>
     77        <copy todir="${plugin.build.dir}/images">
     78            <fileset dir="images"/>
     79        </copy>
     80        <copy todir="${plugin.build.dir}/data">
     81            <fileset dir="data"/>
     82        </copy>
     83        <copy todir="${plugin.build.dir}">
     84            <fileset dir=".">
     85                <include name="README"/>
     86                <include name="LICENSE"/>
     87            </fileset>
     88        </copy>
     89        <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
     90            <!--
    9491        ************************************************
    9592        ** configure these properties. Most of them will be copied to the plugins
     
    9996        ************************************************
    10097    -->
    101                         <manifest>
    102                                 <attribute name="Author" value="Upliner"/>
    103                                 <attribute name="Plugin-Class" value="ext_tools.ExtToolsPlugin"/>
    104                                 <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
    105                                 <attribute name="Plugin-Description" value="Use external scripts in JOSM"/>
    106                                 <attribute name="Plugin-Icon" value="images/ext.png"/>
    107                                 <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/wiki/JOSM/Plugins/ExtTools"/>
    108                                 <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
    109                                 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
    110                         </manifest>
    111                 </jar>
    112         </target>
    113 
    114         <!--
     98            <manifest>
     99                <attribute name="Author" value="Upliner"/>
     100                <attribute name="Plugin-Class" value="ext_tools.ExtToolsPlugin"/>
     101                <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
     102                <attribute name="Plugin-Description" value="Use external scripts in JOSM"/>
     103                <attribute name="Plugin-Icon" value="images/ext.png"/>
     104                <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/wiki/JOSM/Plugins/ExtTools"/>
     105                <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
     106                <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
     107            </manifest>
     108        </jar>
     109    </target>
     110    <!--
    115111    **********************************************************
    116112    ** revision - extracts the current revision number for the
     
    119115    **********************************************************
    120116    -->
    121         <target name="revision">
     117    <target name="revision">
     118        <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
     119            <env key="LANG" value="C"/>
     120            <arg value="info"/>
     121            <arg value="--xml"/>
     122            <arg value="."/>
     123        </exec>
     124        <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
     125        <delete file="REVISION"/>
     126    </target>
     127    <!--
     128    **********************************************************
     129    ** clean - clean up the build environment
     130    **********************************************************
     131    -->
     132    <target name="clean">
     133        <delete dir="${plugin.build.dir}"/>
     134        <delete file="${plugin.jar}"/>
     135    </target>
     136    <!--
     137    **********************************************************
     138    ** install - install the plugin in your local JOSM installation
     139    **********************************************************
     140    -->
     141    <target name="install" depends="dist">
     142        <property environment="env"/>
     143        <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
     144            <and>
     145                <os family="windows"/>
     146            </and>
     147        </condition>
     148        <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
     149    </target>
     150    <!--
     151    ************************** Publishing the plugin ***********************************
     152    -->
     153    <!--
     154        ** extracts the JOSM release for the JOSM version in ../core and saves it in the
     155        ** property ${coreversion.info.entry.revision}
     156        **
     157        -->
     158    <target name="core-info">
     159        <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
     160            <env key="LANG" value="C"/>
     161            <arg value="info"/>
     162            <arg value="--xml"/>
     163            <arg value="../../core"/>
     164        </exec>
     165        <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
     166        <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
     167        <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
     168        <delete file="core.info.xml"/>
     169    </target>
     170    <!--
     171        ** commits the source tree for this plugin
     172        -->
     173    <target name="commit-current">
     174        <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
     175        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     176            <env key="LANG" value="C"/>
     177            <arg value="commit"/>
     178            <arg value="-m '${commit.message}'"/>
     179            <arg value="."/>
     180        </exec>
     181    </target>
     182    <!--
     183        ** updates (svn up) the source tree for this plugin
     184        -->
     185    <target name="update-current">
     186        <echo>Updating plugin source ...</echo>
     187        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     188            <env key="LANG" value="C"/>
     189            <arg value="up"/>
     190            <arg value="."/>
     191        </exec>
     192        <echo>Updating ${plugin.jar} ...</echo>
     193        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     194            <env key="LANG" value="C"/>
     195            <arg value="up"/>
     196            <arg value="../dist/${plugin.jar}"/>
     197        </exec>
     198    </target>
     199    <!--
     200        ** commits the plugin.jar
     201        -->
     202    <target name="commit-dist">
     203        <echo>
     204    ***** Properties of published ${plugin.jar} *****
     205    Commit message    : '${commit.message}'
     206    Plugin-Mainversion: ${plugin.main.version}
     207    JOSM build version: ${coreversion.info.entry.revision}
     208    Plugin-Version    : ${version.entry.commit.revision}
     209    ***** / Properties of published ${plugin.jar} *****
    122210
    123                 <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
    124                         <env key="LANG" value="C"/>
    125                         <arg value="info"/>
    126                         <arg value="--xml"/>
    127                         <arg value="."/>
    128                 </exec>
    129                 <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
    130                 <delete file="REVISION"/>
    131         </target>
    132 
    133         <!--
    134     **********************************************************
    135     ** clean - clean up the build environment
    136     **********************************************************
    137     -->
    138         <target name="clean">
    139                 <delete dir="${plugin.build.dir}"/>
    140                 <delete file="${plugin.jar}"/>
    141         </target>
    142 
    143         <!--
    144     **********************************************************
    145     ** install - install the plugin in your local JOSM installation
    146     **********************************************************
    147     -->
    148         <target name="install" depends="dist">
    149                 <property environment="env"/>
    150                 <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
    151                         <and>
    152                                 <os family="windows"/>
    153                         </and>
    154                 </condition>
    155                 <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
    156         </target>
    157 
    158 
    159         <!--
    160         ************************** Publishing the plugin ***********************************
    161         -->
    162         <!--
    163                 ** extracts the JOSM release for the JOSM version in ../core and saves it in the
    164                 ** property ${coreversion.info.entry.revision}
    165                 **
    166                 -->
    167         <target name="core-info">
    168                 <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
    169                         <env key="LANG" value="C"/>
    170                         <arg value="info"/>
    171                         <arg value="--xml"/>
    172                         <arg value="../../core"/>
    173                 </exec>
    174                 <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
    175                 <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
    176                 <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
    177                 <delete file="core.info.xml" />
    178         </target>
    179 
    180         <!--
    181                 ** commits the source tree for this plugin
    182                 -->
    183         <target name="commit-current">
    184                 <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
    185                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    186                         <env key="LANG" value="C"/>
    187                         <arg value="commit"/>
    188                         <arg value="-m '${commit.message}'"/>
    189                         <arg value="."/>
    190                 </exec>
    191         </target>
    192 
    193         <!--
    194                 ** updates (svn up) the source tree for this plugin
    195                 -->
    196         <target name="update-current">
    197                 <echo>Updating plugin source ...</echo>
    198                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    199                         <env key="LANG" value="C"/>
    200                         <arg value="up"/>
    201                         <arg value="."/>
    202                 </exec>
    203                 <echo>Updating ${plugin.jar} ...</echo>
    204                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    205                         <env key="LANG" value="C"/>
    206                         <arg value="up"/>
    207                         <arg value="../dist/${plugin.jar}"/>
    208                 </exec>
    209         </target>
    210 
    211         <!--
    212                 ** commits the plugin.jar
    213                 -->
    214         <target name="commit-dist">
    215                 <echo>
    216         ***** Properties of published ${plugin.jar} *****
    217         Commit message    : '${commit.message}'
    218         Plugin-Mainversion: ${plugin.main.version}
    219         JOSM build version: ${coreversion.info.entry.revision}
    220         Plugin-Version    : ${version.entry.commit.revision}
    221         ***** / Properties of published ${plugin.jar} *****
    222 
    223         Now commiting ${plugin.jar} ...
    224         </echo>
    225                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    226                         <env key="LANG" value="C"/>
    227                         <arg value="-m '${commit.message}'"/>
    228                         <arg value="commit"/>
    229                         <arg value="${plugin.jar}"/>
    230                 </exec>
    231         </target>
    232 
    233         <!-- ** make sure svn is present as a command line tool ** -->
    234         <target name="ensure-svn-present">
    235                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
    236                         <env key="LANG" value="C" />
    237                         <arg value="--version" />
    238                 </exec>
    239                 <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
    240                         <!-- return code not set at all? Most likely svn isn't installed -->
    241                         <condition>
    242                                 <not>
    243                                         <isset property="svn.exit.code" />
    244                                 </not>
    245                         </condition>
    246                 </fail>
    247                 <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
    248                         <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
    249                         <condition>
    250                                 <isfailure code="${svn.exit.code}" />
    251                         </condition>
    252                 </fail>
    253         </target>
    254 
    255         <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
    256         </target>
     211    Now commiting ${plugin.jar} ...
     212    </echo>
     213        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     214            <env key="LANG" value="C"/>
     215            <arg value="-m '${commit.message}'"/>
     216            <arg value="commit"/>
     217            <arg value="${plugin.jar}"/>
     218        </exec>
     219    </target>
     220    <!-- ** make sure svn is present as a command line tool ** -->
     221    <target name="ensure-svn-present">
     222        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
     223            <env key="LANG" value="C"/>
     224            <arg value="--version"/>
     225        </exec>
     226        <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
     227            <!-- return code not set at all? Most likely svn isn't installed -->
     228            <condition>
     229                <not>
     230                    <isset property="svn.exit.code"/>
     231                </not>
     232            </condition>
     233        </fail>
     234        <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
     235            <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
     236            <condition>
     237                <isfailure code="${svn.exit.code}"/>
     238            </condition>
     239        </fail>
     240    </target>
     241    <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
     242    </target>
    257243</project>
  • applications/editors/josm/plugins/globalsat/build.xml

    r25192 r26174  
    1 <?xml version="1.0" encoding="UTF-8"?>
     1<?xml version="1.0" encoding="utf-8"?>
    22<!--
    33** This is the build file for the globalsat  plugin.
     
    2929-->
    3030<project name="globalsat" default="dist" basedir=".">
     31    <!-- enter the SVN commit message -->
     32    <property name="commit.message" value="Changed constructor signature of plugin main class"/>
     33    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
     34    <property name="plugin.main.version" value="3835"/>
     35    <property name="josm" location="../../core/dist/josm-custom.jar"/>
     36    <property name="plugin.dist.dir" value="../../dist"/>
     37    <property name="plugin.build.dir" value="build"/>
     38    <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/>
     39    <property name="ant.build.javac.target" value="1.5"/>
     40    <property name="RXTX" location="./libs/RXTXcomm.jar"/>
     41    <target name="init">
     42        <mkdir dir="${plugin.build.dir}"/>
     43    </target>
     44    <target name="compile" depends="init">
     45        <echo message="creating ${plugin.jar}"/>
     46        <javac srcdir="src" debug="true" destdir="${plugin.build.dir}">
     47            <compilerarg value="-Xlint:deprecation"/>
     48            <compilerarg value="-Xlint:unchecked"/>
     49            <classpath>
     50                <pathelement location="${josm}"/>
     51                <pathelement location="${RXTX}"/>
     52            </classpath>
     53        </javac>
     54    </target>
     55    <target name="dist" depends="compile,revision">
     56        <unjar dest="${plugin.build.dir}" src="${RXTX}"/>
     57        <copy todir="${plugin.build.dir}/images">
     58            <fileset dir="images"/>
     59        </copy>
     60        <copy todir="${plugin.build.dir}/data">
     61            <fileset dir="data"/>
     62        </copy>
     63        <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
     64            <manifest>
     65                <attribute name="Author" value="Raphael Mack"/>
     66                <attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.globalsat.GlobalsatPlugin"/>
     67                <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
     68                <attribute name="Plugin-Description" value="Download GPS points from Globalsat dg100 data logger directly in JOSM."/>
     69                <attribute name="Plugin-Icon" value="images/globalsatImport.png"/>
     70                <attribute name="Plugin-Link" value="http://www.raphael-mack.de/josm-globalsat-gpx-import-plugin/"/>
     71                <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
     72                <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
     73            </manifest>
     74        </jar>
     75    </target>
     76    <target name="revision">
     77        <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
     78            <env key="LANG" value="C"/>
     79            <arg value="info"/>
     80            <arg value="--xml"/>
     81            <arg value="."/>
     82        </exec>
     83        <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
     84        <delete file="REVISION"/>
     85    </target>
     86    <target name="clean">
     87        <delete dir="${plugin.build.dir}"/>
     88        <delete file="${plugin.jar}"/>
     89    </target>
     90    <target name="install" depends="dist">
     91        <property environment="env"/>
     92        <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
     93            <and>
     94                <os family="windows"/>
     95            </and>
     96        </condition>
     97        <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
     98    </target>
     99    <!--
     100        ************************** Publishing the plugin ***********************************
     101        -->
     102    <!--
     103            ** extracts the JOSM release for the JOSM version in ../core and saves it in the
     104            ** property ${coreversion.info.entry.revision}
     105            **
     106            -->
     107    <target name="core-info">
     108        <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
     109            <env key="LANG" value="C"/>
     110            <arg value="info"/>
     111            <arg value="--xml"/>
     112            <arg value="../../core"/>
     113        </exec>
     114        <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
     115        <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
     116        <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
     117        <delete file="core.info.xml"/>
     118    </target>
     119    <!--
     120            ** commits the source tree for this plugin
     121            -->
     122    <target name="commit-current">
     123        <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
     124        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     125            <env key="LANG" value="C"/>
     126            <arg value="commit"/>
     127            <arg value="-m '${commit.message}'"/>
     128            <arg value="."/>
     129        </exec>
     130    </target>
     131    <!--
     132            ** updates (svn up) the source tree for this plugin
     133            -->
     134    <target name="update-current">
     135        <echo>Updating plugin source ...</echo>
     136        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     137            <env key="LANG" value="C"/>
     138            <arg value="up"/>
     139            <arg value="."/>
     140        </exec>
     141        <echo>Updating ${plugin.jar} ...</echo>
     142        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     143            <env key="LANG" value="C"/>
     144            <arg value="up"/>
     145            <arg value="../dist/${plugin.jar}"/>
     146        </exec>
     147    </target>
     148    <!--
     149            ** commits the plugin.jar
     150            -->
     151    <target name="commit-dist">
     152        <echo>
     153        ***** Properties of published ${plugin.jar} *****
     154        Commit message    : '${commit.message}'
     155        Plugin-Mainversion: ${plugin.main.version}
     156        JOSM build version: ${coreversion.info.entry.revision}
     157        Plugin-Version    : ${version.entry.commit.revision}
     158        ***** / Properties of published ${plugin.jar} *****
    31159
    32         <!-- enter the SVN commit message -->
    33         <property name="commit.message" value="Changed constructor signature of plugin main class" />
    34         <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    35         <property name="plugin.main.version" value="3835" />
    36 
    37         <property name="josm"                   location="../../core/dist/josm-custom.jar"/>
    38         <property name="plugin.dist.dir"        value="../../dist"/>
    39         <property name="plugin.build.dir"       value="build"/>
    40         <property name="plugin.jar"             value="${plugin.dist.dir}/${ant.project.name}.jar"/>
    41         <property name="ant.build.javac.target" value="1.5"/>
    42         <property name="RXTX"                   location="./libs/RXTXcomm.jar"/>
    43         <target name="init">
    44                 <mkdir dir="${plugin.build.dir}"/>
    45         </target>
    46         <target name="compile" depends="init">
    47                 <echo message="creating ${plugin.jar}"/>
    48                 <javac srcdir="src" debug="true" destdir="${plugin.build.dir}">
    49                         <compilerarg value="-Xlint:deprecation"/>
    50                         <compilerarg value="-Xlint:unchecked"/>
    51                         <classpath>
    52                                 <pathelement location="${josm}"/>
    53                                 <pathelement location="${RXTX}"/>
    54                         </classpath>
    55                 </javac>
    56         </target>
    57         <target name="dist" depends="compile,revision">
    58                 <unjar dest="${plugin.build.dir}" src="${RXTX}"/>
    59                 <copy todir="${plugin.build.dir}/images">
    60                         <fileset dir="images"/>
    61                 </copy>
    62                 <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
    63                         <manifest>
    64                                 <attribute name="Author" value="Raphael Mack"/>
    65                                 <attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.globalsat.GlobalsatPlugin"/>
    66                                 <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
    67                                 <attribute name="Plugin-Description" value="Download GPS points from Globalsat dg100 data logger directly in JOSM."/>
    68                                 <attribute name="Plugin-Icon" value="images/globalsatImport.png"/>
    69                                 <attribute name="Plugin-Link" value="http://www.raphael-mack.de/josm-globalsat-gpx-import-plugin/"/>
    70                                 <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
    71                                 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
    72                         </manifest>
    73                 </jar>
    74         </target>
    75         <target name="revision">
    76                 <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
    77                         <env key="LANG" value="C"/>
    78                         <arg value="info"/>
    79                         <arg value="--xml"/>
    80                         <arg value="."/>
    81                 </exec>
    82                 <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
    83                 <delete file="REVISION"/>
    84         </target>
    85         <target name="clean">
    86                 <delete dir="${plugin.build.dir}"/>
    87                 <delete file="${plugin.jar}"/>
    88         </target>
    89         <target name="install" depends="dist">
    90                 <property environment="env"/>
    91                 <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
    92                         <and>
    93                                 <os family="windows"/>
    94                         </and>
    95                 </condition>
    96                 <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
    97         </target>
    98 
    99         <!--
    100                 ************************** Publishing the plugin ***********************************
    101                 -->
    102         <!--
    103                         ** extracts the JOSM release for the JOSM version in ../core and saves it in the
    104                         ** property ${coreversion.info.entry.revision}
    105                         **
    106                         -->
    107         <target name="core-info">
    108                 <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
    109                         <env key="LANG" value="C"/>
    110                         <arg value="info"/>
    111                         <arg value="--xml"/>
    112                         <arg value="../../core"/>
    113                 </exec>
    114                 <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
    115                 <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
    116                 <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
    117                 <delete file="core.info.xml" />
    118         </target>
    119 
    120         <!--
    121                         ** commits the source tree for this plugin
    122                         -->
    123         <target name="commit-current">
    124                 <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
    125                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    126                         <env key="LANG" value="C"/>
    127                         <arg value="commit"/>
    128                         <arg value="-m '${commit.message}'"/>
    129                         <arg value="."/>
    130                 </exec>
    131         </target>
    132 
    133         <!--
    134                         ** updates (svn up) the source tree for this plugin
    135                         -->
    136         <target name="update-current">
    137                 <echo>Updating plugin source ...</echo>
    138                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    139                         <env key="LANG" value="C"/>
    140                         <arg value="up"/>
    141                         <arg value="."/>
    142                 </exec>
    143                 <echo>Updating ${plugin.jar} ...</echo>
    144                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    145                         <env key="LANG" value="C"/>
    146                         <arg value="up"/>
    147                         <arg value="../dist/${plugin.jar}"/>
    148                 </exec>
    149         </target>
    150 
    151         <!--
    152                         ** commits the plugin.jar
    153                         -->
    154         <target name="commit-dist">
    155                 <echo>
    156                 ***** Properties of published ${plugin.jar} *****
    157                 Commit message    : '${commit.message}'
    158                 Plugin-Mainversion: ${plugin.main.version}
    159                 JOSM build version: ${coreversion.info.entry.revision}
    160                 Plugin-Version    : ${version.entry.commit.revision}
    161                 ***** / Properties of published ${plugin.jar} *****
    162 
    163                 Now commiting ${plugin.jar} ...
    164                 </echo>
    165                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    166                         <env key="LANG" value="C"/>
    167                         <arg value="-m '${commit.message}'"/>
    168                         <arg value="commit"/>
    169                         <arg value="${plugin.jar}"/>
    170                 </exec>
    171         </target>
    172 
    173         <!-- ** make sure svn is present as a command line tool ** -->
    174         <target name="ensure-svn-present">
    175                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
    176                         <env key="LANG" value="C" />
    177                         <arg value="--version" />
    178                 </exec>
    179                 <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
    180                         <!-- return code not set at all? Most likely svn isn't installed -->
    181                         <condition>
    182                                 <not>
    183                                         <isset property="svn.exit.code" />
    184                                 </not>
    185                         </condition>
    186                 </fail>
    187                 <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
    188                         <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
    189                         <condition>
    190                                 <isfailure code="${svn.exit.code}" />
    191                         </condition>
    192                 </fail>
    193         </target>
    194 
    195         <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
    196         </target>
     160        Now commiting ${plugin.jar} ...
     161        </echo>
     162        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     163            <env key="LANG" value="C"/>
     164            <arg value="-m '${commit.message}'"/>
     165            <arg value="commit"/>
     166            <arg value="${plugin.jar}"/>
     167        </exec>
     168    </target>
     169    <!-- ** make sure svn is present as a command line tool ** -->
     170    <target name="ensure-svn-present">
     171        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
     172            <env key="LANG" value="C"/>
     173            <arg value="--version"/>
     174        </exec>
     175        <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
     176            <!-- return code not set at all? Most likely svn isn't installed -->
     177            <condition>
     178                <not>
     179                    <isset property="svn.exit.code"/>
     180                </not>
     181            </condition>
     182        </fail>
     183        <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
     184            <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
     185            <condition>
     186                <isfailure code="${svn.exit.code}"/>
     187            </condition>
     188        </fail>
     189    </target>
     190    <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
     191    </target>
    197192</project>
  • applications/editors/josm/plugins/gpxfilter/build.xml

    r25456 r26174  
    1 <?xml version="1.0" encoding="UTF-8"?>
     1<?xml version="1.0" encoding="utf-8"?>
    22<!--
    33** This is a template build file for a JOSM  plugin.
     
    2929-->
    3030<project name="gpxfilter" default="dist" basedir=".">
    31 
    3231    <!-- enter the SVN commit message -->
    33     <property name="commit.message" value="Commit message" />
     32    <property name="commit.message" value="Commit message"/>
    3433    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    35     <property name="plugin.main.version" value="3835" />
    36 
    37 
     34    <property name="plugin.main.version" value="3835"/>
    3835    <!--
    3936      ************************************************
    4037      ** should not be necessary to change the following properties
    4138     -->
    42     <property name="josm"                   location="../../core/dist/josm-custom.jar"/>
    43     <property name="plugin.build.dir"       value="build"/>
    44     <property name="plugin.src.dir"         value="src"/>
     39    <property name="josm" location="../../core/dist/josm-custom.jar"/>
     40    <property name="plugin.build.dir" value="build"/>
     41    <property name="plugin.src.dir" value="src"/>
    4542    <!-- this is the directory where the plugin jar is copied to -->
    46     <property name="plugin.dist.dir"        value="../../dist"/>
     43    <property name="plugin.dist.dir" value="../../dist"/>
    4744    <property name="ant.build.javac.target" value="1.5"/>
    48     <property name="plugin.dist.dir"        value="../../dist"/>
    49     <property name="plugin.jar"             value="${plugin.dist.dir}/${ant.project.name}.jar"/>
    50 
     45    <property name="plugin.dist.dir" value="../../dist"/>
     46    <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/>
    5147    <!--
    5248    **********************************************************
     
    5753        <mkdir dir="${plugin.build.dir}"/>
    5854    </target>
    59 
    6055    <!--
    6156    **********************************************************
     
    7065        </javac>
    7166    </target>
    72 
    7367    <!--
    7468    **********************************************************
     
    8478            <fileset dir="images"/>
    8579        </copy>
     80        <copy todir="${plugin.build.dir}/data">
     81            <fileset dir="data"/>
     82        </copy>
    8683        <copy todir="${plugin.build.dir}">
    8784            <fileset dir=".">
    88                 <include name="README" />
    89                 <include name="LICENSE" />
     85                <include name="README"/>
     86                <include name="LICENSE"/>
    9087            </fileset>
    9188        </copy>
     
    110107        </jar>
    111108    </target>
    112 
    113109    <!--
    114110    **********************************************************
     
    119115    -->
    120116    <target name="revision">
    121 
    122117        <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
    123118            <env key="LANG" value="C"/>
     
    129124        <delete file="REVISION"/>
    130125    </target>
    131 
    132126    <!--
    133127    **********************************************************
     
    139133        <delete file="${plugin.jar}"/>
    140134    </target>
    141 
    142135    <!--
    143136    **********************************************************
     
    154147        <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
    155148    </target>
    156 
    157 
    158149    <!--
    159150    ************************** Publishing the plugin ***********************************
     
    174165        <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
    175166        <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
    176         <delete file="core.info.xml" />
    177     </target>
    178 
     167        <delete file="core.info.xml"/>
     168    </target>
    179169    <!--
    180170        ** commits the source tree for this plugin
     
    189179        </exec>
    190180    </target>
    191 
    192181    <!--
    193182        ** updates (svn up) the source tree for this plugin
     
    207196        </exec>
    208197    </target>
    209 
    210198    <!--
    211199        ** commits the plugin.jar
     
    229217        </exec>
    230218    </target>
    231 
    232219    <!-- ** make sure svn is present as a command line tool ** -->
    233220    <target name="ensure-svn-present">
    234221        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
    235             <env key="LANG" value="C" />
    236             <arg value="--version" />
     222            <env key="LANG" value="C"/>
     223            <arg value="--version"/>
    237224        </exec>
    238225        <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
     
    240227            <condition>
    241228                <not>
    242                     <isset property="svn.exit.code" />
     229                    <isset property="svn.exit.code"/>
    243230                </not>
    244231            </condition>
     
    247234            <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
    248235            <condition>
    249                 <isfailure code="${svn.exit.code}" />
     236                <isfailure code="${svn.exit.code}"/>
    250237            </condition>
    251238        </fail>
    252239    </target>
    253 
    254240    <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
    255241    </target>
  • applications/editors/josm/plugins/graphview/build.xml

    r25199 r26174  
    1 <?xml version="1.0" encoding="UTF-8"?>
     1<?xml version="1.0" encoding="utf-8"?>
    22<!--
    33** This is the build file for the graphview plugin
     
    2626-->
    2727<project name="graphview" default="dist" basedir=".">
    28 
    29         <property name="commit.message" value="option to change graph colors; closes ticket 5523 in JOSM Trac" />
    30         <property name="plugin.main.version" value="3835" />
    31 
    32     <property name="josm"                   location="../../core/dist/josm-custom.jar"/>
    33     <property name="plugin.build.dir"       value="build"/>
    34     <property name="plugin.src.dir"         value="src"/>
     28    <property name="commit.message" value="option to change graph colors; closes ticket 5523 in JOSM Trac"/>
     29    <property name="plugin.main.version" value="4126"/>
     30    <property name="josm" location="../../core/dist/josm-custom.jar"/>
     31    <property name="plugin.build.dir" value="build"/>
     32    <property name="plugin.src.dir" value="src"/>
    3533    <!-- this is the directory where the plugin jar is copied to -->
    36     <property name="plugin.dist.dir"        value="../../dist"/>
     34    <property name="plugin.dist.dir" value="../../dist"/>
    3735    <property name="ant.build.javac.target" value="1.5"/>
    38     <property name="plugin.dist.dir"        value="../../dist"/>
    39     <property name="plugin.jar"             value="${plugin.dist.dir}/${ant.project.name}.jar"/>
    40 
     36    <property name="plugin.dist.dir" value="../../dist"/>
     37    <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/>
    4138    <!--
    4239    **********************************************************
     
    4744        <mkdir dir="${plugin.build.dir}"/>
    4845    </target>
    49 
    5046    <!--
    5147    **********************************************************
     
    6056        </javac>
    6157    </target>
    62 
    6358    <!--
    6459    **********************************************************
     
    7166            <fileset dir="images"/>
    7267        </copy>
     68        <copy todir="${plugin.build.dir}/data">
     69            <fileset dir="data"/>
     70        </copy>
    7371        <copy todir="${plugin.build.dir}/files">
    7472            <fileset dir="files"/>
     
    7674        <copy todir="${plugin.build.dir}">
    7775            <fileset dir=".">
    78                 <include name="LICENSE" />
     76                <include name="LICENSE"/>
    7977            </fileset>
    8078        </copy>
     
    9290        </jar>
    9391    </target>
    94 
    9592    <!--
    9693    **********************************************************
     
    10198    -->
    10299    <target name="revision">
    103 
    104100        <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
    105101            <env key="LANG" value="C"/>
     
    111107        <delete file="REVISION"/>
    112108    </target>
    113 
    114109    <!--
    115110    **********************************************************
     
    121116        <delete file="${plugin.jar}"/>
    122117    </target>
    123 
    124118    <!--
    125119    **********************************************************
     
    136130        <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
    137131    </target>
     132    <!--
     133         ************************** Publishing the plugin ***********************************
     134        -->
     135    <!--
     136        ** extracts the JOSM release for the JOSM version in ../core and saves it in the
     137        ** property ${coreversion.info.entry.revision}
     138        **
     139        -->
     140    <target name="core-info">
     141        <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
     142            <env key="LANG" value="C"/>
     143            <arg value="info"/>
     144            <arg value="--xml"/>
     145            <arg value="../../core"/>
     146        </exec>
     147        <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
     148        <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
     149        <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
     150        <delete file="core.info.xml"/>
     151    </target>
     152    <!--
     153        ** commits the source tree for this plugin
     154        -->
     155    <target name="commit-current">
     156        <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
     157        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     158            <env key="LANG" value="C"/>
     159            <arg value="commit"/>
     160            <arg value="-m '${commit.message}'"/>
     161            <arg value="."/>
     162        </exec>
     163    </target>
     164    <!--
     165        ** updates (svn up) the source tree for this plugin
     166        -->
     167    <target name="update-current">
     168        <echo>Updating plugin source ...</echo>
     169        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     170            <env key="LANG" value="C"/>
     171            <arg value="up"/>
     172            <arg value="."/>
     173        </exec>
     174        <echo>Updating ${plugin.jar} ...</echo>
     175        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     176            <env key="LANG" value="C"/>
     177            <arg value="up"/>
     178            <arg value="../dist/${plugin.jar}"/>
     179        </exec>
     180    </target>
     181    <!--
     182        ** commits the plugin.jar
     183        -->
     184    <target name="commit-dist">
     185        <echo>
     186    ***** Properties of published ${plugin.jar} *****
     187    Commit message    : '${commit.message}'
     188    Plugin-Mainversion: ${plugin.main.version}
     189    JOSM build version: ${coreversion.info.entry.revision}
     190    Plugin-Version    : ${version.entry.commit.revision}
     191    ***** / Properties of published ${plugin.jar} *****
    138192
    139 
    140         <!--
    141                  ************************** Publishing the plugin ***********************************
    142                 -->
    143                 <!--
    144                 ** extracts the JOSM release for the JOSM version in ../core and saves it in the
    145                 ** property ${coreversion.info.entry.revision}
    146                 **
    147                 -->
    148                 <target name="core-info">
    149                         <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
    150                                 <env key="LANG" value="C"/>
    151                                 <arg value="info"/>
    152                                 <arg value="--xml"/>
    153                                 <arg value="../../core"/>
    154                         </exec>
    155                         <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
    156                         <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
    157                         <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
    158                         <delete file="core.info.xml" />
    159                 </target>
    160 
    161                 <!--
    162                 ** commits the source tree for this plugin
    163                 -->
    164                 <target name="commit-current">
    165                         <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
    166                         <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    167                                 <env key="LANG" value="C"/>
    168                                 <arg value="commit"/>
    169                                 <arg value="-m '${commit.message}'"/>
    170                                 <arg value="."/>
    171                         </exec>
    172                 </target>
    173 
    174                 <!--
    175                 ** updates (svn up) the source tree for this plugin
    176                 -->
    177                 <target name="update-current">
    178                         <echo>Updating plugin source ...</echo>
    179                         <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    180                                 <env key="LANG" value="C"/>
    181                                 <arg value="up"/>
    182                                 <arg value="."/>
    183                         </exec>
    184                         <echo>Updating ${plugin.jar} ...</echo>
    185                         <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    186                                 <env key="LANG" value="C"/>
    187                                 <arg value="up"/>
    188                                 <arg value="../dist/${plugin.jar}"/>
    189                         </exec>
    190                 </target>
    191 
    192                 <!--
    193                 ** commits the plugin.jar
    194                 -->
    195                 <target name="commit-dist">
    196                         <echo>
    197         ***** Properties of published ${plugin.jar} *****
    198         Commit message    : '${commit.message}'
    199         Plugin-Mainversion: ${plugin.main.version}
    200         JOSM build version: ${coreversion.info.entry.revision}
    201         Plugin-Version    : ${version.entry.commit.revision}
    202         ***** / Properties of published ${plugin.jar} *****
    203 
    204         Now commiting ${plugin.jar} ...
    205         </echo>
    206                         <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    207                                 <env key="LANG" value="C"/>
    208                                 <arg value="-m '${commit.message}'"/>
    209                                 <arg value="commit"/>
    210                                 <arg value="${plugin.jar}"/>
    211                         </exec>
    212                 </target>
    213 
    214                 <!-- ** make sure svn is present as a command line tool ** -->
    215                 <target name="ensure-svn-present">
    216                         <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
    217                                 <env key="LANG" value="C" />
    218                                 <arg value="--version" />
    219                         </exec>
    220                         <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
    221                                 <!-- return code not set at all? Most likely svn isn't installed -->
    222                                 <condition>
    223                                         <not>
    224                                                 <isset property="svn.exit.code" />
    225                                         </not>
    226                                 </condition>
    227                         </fail>
    228                         <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
    229                                 <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
    230                                 <condition>
    231                                         <isfailure code="${svn.exit.code}" />
    232                                 </condition>
    233                         </fail>
    234                 </target>
    235 
    236                 <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
    237                 </target>
     193    Now commiting ${plugin.jar} ...
     194    </echo>
     195        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     196            <env key="LANG" value="C"/>
     197            <arg value="-m '${commit.message}'"/>
     198            <arg value="commit"/>
     199            <arg value="${plugin.jar}"/>
     200        </exec>
     201    </target>
     202    <!-- ** make sure svn is present as a command line tool ** -->
     203    <target name="ensure-svn-present">
     204        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
     205            <env key="LANG" value="C"/>
     206            <arg value="--version"/>
     207        </exec>
     208        <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
     209            <!-- return code not set at all? Most likely svn isn't installed -->
     210            <condition>
     211                <not>
     212                    <isset property="svn.exit.code"/>
     213                </not>
     214            </condition>
     215        </fail>
     216        <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
     217            <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
     218            <condition>
     219                <isfailure code="${svn.exit.code}"/>
     220            </condition>
     221        </fail>
     222    </target>
     223    <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
     224        </target>
    238225</project>
  • applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/core/access/AccessRulesetReader.java

    r23189 r26174  
    11package org.openstreetmap.josm.plugins.graphview.core.access;
     2
     3import static org.openstreetmap.josm.tools.I18n.tr;
    24
    35import java.io.IOException;
     
    120122
    121123                if (currentSection != Section.NONE) {
    122                     throw new SAXException("classes element below root child level");
     124                    throw new SAXException(tr("Classes element below root child level"));
    123125                }
    124126
     
    130132
    131133                if (currentSection != Section.CLASSES) {
    132                     throw new SAXException("class element (" + className + ") outside classes element");
     134                    throw new SAXException(tr("Class element ({0}) outside classes element", className));
    133135                } else if (className == null) {
    134                     throw new SAXException("class element without name");
     136                    throw new SAXException(tr("Class element without name"));
    135137                }
    136138
     
    144146
    145147                if (currentSection != Section.NONE) {
    146                     throw new SAXException("classes element below root child level");
     148                    throw new SAXException(tr("Classes element below root child level"));
    147149                }
    148150
     
    154156                    baseTags.add(readTag(attributes));
    155157                } else {
    156                     throw new SAXException("tag element outside basetag and implication elements");
     158                    throw new SAXException(tr("Tag element outside basetag and implication elements"));
    157159                }
    158160
     
    160162
    161163                if (currentSection != Section.NONE) {
    162                     throw new SAXException("implications element below root child level");
     164                    throw new SAXException(tr("Implications element below root child level"));
    163165                }
    164166
     
    176178
    177179            if (key == null) {
    178                 throw new SAXException("tag without key");
     180                throw new SAXException(tr("Tag without key"));
    179181            } else if (value == null) {
    180                 throw new SAXException("tag without value (key is " + key + ")");
     182                throw new SAXException(tr("Tag without value (key is {0})", key));
    181183            }
    182184
     
    195197
    196198                if (currentSection != Section.CLASSES) {
    197                     throw new SAXException("closed classes while it wasn't open");
     199                    throw new SAXException(tr("Closed classes while it was not open"));
    198200                } else if (currentAccessClass != null) {
    199                     throw new SAXException("closed classes element before all class elements were closed");
     201                    throw new SAXException(tr("Closed classes element before all class elements were closed"));
    200202                }
    201203
     
    205207
    206208                if (currentAccessClass == null) {
    207                     throw new SAXException("closed class element while none was open");
     209                    throw new SAXException(tr("Closed class element while none was open"));
    208210                }
    209211
     
    213215
    214216                if (currentSection != Section.BASETAGS) {
    215                     throw new SAXException("closed basetags while it wasn't open");
     217                    throw new SAXException(tr("Closed basetags while it was not open"));
    216218                }
    217219
     
    221223
    222224                if (currentSection != Section.IMPLICATIONS) {
    223                     throw new SAXException("closed implications while it wasn't open");
     225                    throw new SAXException(tr("Closed implications while it was not open"));
    224226                }
    225227
  • applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/core/access/ImplicationXMLReader.java

    r23189 r26174  
    11package org.openstreetmap.josm.plugins.graphview.core.access;
     2
     3import static org.openstreetmap.josm.tools.I18n.tr;
    24
    35import java.util.ArrayList;
     
    6769                if ("tag".equals(name)) {
    6870                    if (tagOpen) {
    69                         throw new SAXException("tag element inside other tag element");
     71                        throw new SAXException(tr("Tag element inside other tag element"));
    7072                    }
    7173                    currentImpliedTags.add(readTag(attributes));
     
    7880
    7981        //all vaild paths end with return; reaching this indicates an invalid tag
    80         throw new SAXException("invalid opening xml tag <" + name + "> in state " + state);
     82        throw new SAXException(tr("Invalid opening xml tag <{0}> in state {1}", name, state));
    8183
    8284    }
     
    9193                if (name.equals("condition")) {
    9294                    if (!currentConditionReader.isFinished()) {
    93                         throw new SAXException("condition isn't finished at </condition> tag");
     95                        throw new SAXException(tr("Condition isn't finished at </condition> tag"));
    9496                    } else {
    9597                        currentCondition = currentConditionReader.getCondition();
     
    110112                } else if (name.equals("tag")) {
    111113                    if (!tagOpen) {
    112                         throw new SAXException("closing tag element that was not open");
     114                        throw new SAXException(tr("Closing tag element that was not open"));
    113115                    }
    114116                    tagOpen = false;
     
    131133
    132134        //all vaild paths end with return; reaching this indicates an invalid tag
    133         throw new SAXException("invalid closing xml tag </" + name + "> in state " + state);
     135        throw new SAXException(tr("Invalid closing xml tag </{0}> in state {1}", name, state));
    134136
    135137    }
     
    138140
    139141        if (state != State.BEFORE_IMPLICATION) {
    140             throw new SAXException("some tags not been closed; now in state " + state);
     142            throw new SAXException(tr("Some tags not been closed; now in state {0}", state));
    141143        } else {
    142144            return new ArrayList<Implication>(implications);
     
    150152
    151153        if (key == null) {
    152             throw new SAXException("tag without key");
     154            throw new SAXException(tr("Tag without key"));
    153155        } else if (value == null) {
    154             throw new SAXException("tag without value (key is " + key + ")");
     156            throw new SAXException(tr("Tag without value (key is {0})", key));
    155157        }
    156158
     
    163165
    164166        if (key == null) {
    165             throw new SAXException("key element without attribute k");
     167            throw new SAXException(tr("Key element without attribute k"));
    166168        }
    167169
     
    185187
    186188            if (finished) {
    187                 throw new SAXException("condition is already finished at <" + name + ">");
     189                throw new SAXException(tr("Condition is already finished at <{0}>", name));
    188190            }
    189191
     
    203205                    condition = TagConditionLogic.key(readKey(attributes));
    204206                } else if (!("or".equals(name)) && !("and".equals(name)) && !("not".equals(name))) {
    205                     throw new SAXException("unknown tag for condition: " + name);
     207                    throw new SAXException(tr("Unknown tag for condition: {0}", name));
    206208                }
    207209
     
    210212
    211213                if ("tag".equals(openingName) || "key".equals(openingName)) {
    212                     throw new SAXException("element must not have childs: " + openingName);
     214                    throw new SAXException(tr("Element must not have childs: {0}", openingName));
    213215                }
    214216
     
    224226
    225227            if (finished) {
    226                 throw new SAXException("condition is already finished at </" + name + ">");
     228                throw new SAXException(tr("Condition is already finished at </{0}>", name));
    227229            }
    228230
     
    250252                            condition = TagConditionLogic.and(childConditions);
    251253                        } else {
    252                             throw new SAXException("<and> needs at least one child");
     254                            throw new SAXException(tr("<and> needs at least one child"));
    253255                        }
    254256                    } else if ("or".equals(openingName)) {
     
    256258                            condition = TagConditionLogic.or(childConditions);
    257259                        } else {
    258                             throw new SAXException("<or> needs at least one child");
     260                            throw new SAXException(tr("<or> needs at least one child"));
    259261                        }
    260262                    } else if ("not".equals(openingName)) {
     
    262264                            condition = TagConditionLogic.not(childConditions.get(0));
    263265                        } else {
    264                             throw new SAXException("<not> needs at least one child");
     266                            throw new SAXException(tr("<not> needs at least one child"));
    265267                        }
    266268                    }
     
    269271
    270272                } else {
    271                     throw new SAXException("wrong closing tag " + name +
    272                             " (</" + openingName + "> expected");
     273                    throw new SAXException(tr("Wrong closing tag {0} (</{1}> expected)", name, openingName));
    273274                }
    274275
     
    283284        public TagCondition getCondition() {
    284285            if (!finished) {
    285                 throw new IllegalStateException("condition " + openingName + " not yet finished");
     286                throw new IllegalStateException(tr("Condition {0} not yet finished", openingName));
    286287            } else {
    287288                assert condition != null;
  • applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/core/graph/ConnectorEvaluationGroup.java

    r23189 r26174  
    11package org.openstreetmap.josm.plugins.graphview.core.graph;
     2
     3import static org.openstreetmap.josm.tools.I18n.tr;
    24
    35import java.util.ArrayList;
     
    6062        assert targetNode != null && borderNodes.contains(targetNode);
    6163
    62         if (!evaluated) { throw new IllegalStateException("group not yet evaluated"); }
     64        if (!evaluated) { throw new IllegalStateException(tr("Group not yet evaluated")); }
    6365
    6466        int inboundIndex = borderNodes.indexOf(startNode);
  • applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/core/graph/JunctionEvaluationGroup.java

    r23189 r26174  
    11package org.openstreetmap.josm.plugins.graphview.core.graph;
     2
     3import static org.openstreetmap.josm.tools.I18n.tr;
    24
    35import java.util.ArrayList;
     
    3638     */
    3739    public Collection<Segment> getInboundSegments() {
    38         if (!evaluated) { throw new IllegalStateException("group not yet evaluated"); }
     40        if (!evaluated) { throw new IllegalStateException(tr("Group not yet evaluated")); }
    3941        return inboundSegments;
    4042    }
     
    4749     */
    4850    public Collection<Segment> getOutboundSegments() {
    49         if (!evaluated) { throw new IllegalStateException("group not yet evaluated"); }
     51        if (!evaluated) { throw new IllegalStateException(tr("Group not yet evaluated")); }
    5052        return outboundSegments;
    5153    }
     
    6668        assert outboundSegment != null && outboundSegments.contains(outboundSegment);
    6769
    68         if (!evaluated) { throw new IllegalStateException("group not yet evaluated"); }
     70        if (!evaluated) { throw new IllegalStateException(tr("Group not yet evaluated")); }
    6971
    7072        int inboundIndex = inboundSegments.indexOf(inboundSegment);
  • applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/core/property/RoadValueLimit.java

    r23189 r26174  
    6767                case MINIMUM: return vehicleValue >= (Float) propertyValue;
    6868                case MAXIMUM: return vehicleValue <= (Float) propertyValue;
    69                 default:      throw new Error("unhandled LimitType");
     69                default:      throw new Error("Unhandled LimitType");
    7070            }
    7171        } else {
  • applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/core/util/TagConditionLogic.java

    r23189 r26174  
    11package org.openstreetmap.josm.plugins.graphview.core.util;
     2
     3import static org.openstreetmap.josm.tools.I18n.tr;
    24
    35import java.util.Collection;
     
    8890    public static TagCondition and(final Collection<TagCondition> conditions) {
    8991        if (conditions.size() == 0) {
    90             throw new IllegalArgumentException("collection must contain at least one condition");
     92            throw new IllegalArgumentException(tr("Collection must contain at least one condition"));
    9193        }
    9294        return new TagCondition() {
     
    155157    public static TagCondition or(final Collection<TagCondition> conditions) {
    156158        if (conditions.size() == 0) {
    157             throw new IllegalArgumentException("collection must contain at least one condition");
     159            throw new IllegalArgumentException(tr("Collection must contain at least one condition"));
    158160        }
    159161        return new TagCondition() {
  • applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/plugin/GraphViewPlugin.java

    r23189 r26174  
    11package org.openstreetmap.josm.plugins.graphview.plugin;
     2
     3import static org.openstreetmap.josm.tools.I18n.tr;
    24
    35import java.io.File;
     
    9294
    9395                if (accessRuleset == null) {
    94                     JOptionPane.showMessageDialog(Main.parent, "No ruleset has been selected!", "No ruleset", JOptionPane.ERROR_MESSAGE);
     96                    JOptionPane.showMessageDialog(Main.parent, tr("No ruleset has been selected!"), tr("No ruleset"), JOptionPane.ERROR_MESSAGE);
    9597                } else {
    9698                    transitionStructure.setAccessParametersAndRuleset(preferences.getCurrentParameterBookmark(), accessRuleset);
     
    103105
    104106                if (accessRuleset == null) {
    105                     JOptionPane.showMessageDialog(Main.parent, "No ruleset has been selected!",
    106                             "No ruleset", JOptionPane.ERROR_MESSAGE);
     107                    JOptionPane.showMessageDialog(Main.parent, tr("No ruleset has been selected!"),
     108                            tr("No ruleset"), JOptionPane.ERROR_MESSAGE);
    107109                } else {
    108110
     
    126128
    127129        } catch (AccessRulesetSyntaxException e) {
    128             JOptionPane.showMessageDialog(Main.parent, "syntax exception in access ruleset:\n" + e);
     130            JOptionPane.showMessageDialog(Main.parent, tr("Syntax exception in access ruleset:\n{0}", e));
    129131            e.printStackTrace();
    130132        } catch (FileNotFoundException e) {
    131             JOptionPane.showMessageDialog(Main.parent, "file not found:\n" + e);
     133            JOptionPane.showMessageDialog(Main.parent, tr("File not found:\n{0}", e));
    132134            e.printStackTrace();
    133135        } catch (IOException e) {
    134             JOptionPane.showMessageDialog(Main.parent, "problem when accessing a file:\n" + e);
     136            JOptionPane.showMessageDialog(Main.parent, tr("Problem when accessing a file:\n{0}", e));
    135137            e.printStackTrace();
    136138        }
     
    148150
    149151                if (accessRuleset == null) {
    150                     JOptionPane.showMessageDialog(Main.parent, "No ruleset has been selected!",
    151                             "No ruleset", JOptionPane.ERROR_MESSAGE);
     152                    JOptionPane.showMessageDialog(Main.parent, tr("No ruleset has been selected!"),
     153                            tr("No ruleset"), JOptionPane.ERROR_MESSAGE);
    152154                } else {
    153155                    transitionStructure.setAccessParametersAndRuleset(
     
    159161
    160162        } catch (AccessRulesetSyntaxException e) {
    161             JOptionPane.showMessageDialog(Main.parent, "syntax exception in access ruleset:\n" + e);
     163            JOptionPane.showMessageDialog(Main.parent, tr("Syntax exception in access ruleset:\n{0}", e));
    162164            e.printStackTrace();
    163165        } catch (FileNotFoundException e) {
    164             JOptionPane.showMessageDialog(Main.parent, "file not found:\n" + e);
     166            JOptionPane.showMessageDialog(Main.parent, tr("File not found:\n", e));
    165167            e.printStackTrace();
    166168        } catch (IOException e) {
    167             JOptionPane.showMessageDialog(Main.parent, "problem when accessing a file:\n" + e);
     169            JOptionPane.showMessageDialog(Main.parent, tr("Problem when accessing a file:\n{0}", e));
    168170            e.printStackTrace();
    169171        }
     
    206208                rulesetInputStream = rulesetURL.openStream();
    207209            } else {
    208                 throw new FileNotFoundException("couldn't find built-in ruleset " + ruleset);
     210                throw new FileNotFoundException(tr("Couldn't find built-in ruleset {0}", ruleset));
    209211            }
    210212
  • applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/plugin/dialogs/AccessParameterDialog.java

    r23189 r26174  
    11package org.openstreetmap.josm.plugins.graphview.plugin.dialogs;
     2
     3import static org.openstreetmap.josm.tools.I18n.tr;
    24
    35import static org.openstreetmap.josm.plugins.graphview.core.property.VehiclePropertyTypes.MAX_INCLINE_DOWN;
     
    5052    static {
    5153        FLOAT_PROPERTIES = new LinkedHashMap<VehiclePropertyType<Float>, String>();
    52         FLOAT_PROPERTIES.put(VehiclePropertyTypes.HEIGHT, "height (m)");
    53         FLOAT_PROPERTIES.put(VehiclePropertyTypes.WIDTH, "width (m)");
    54         FLOAT_PROPERTIES.put(VehiclePropertyTypes.LENGTH, "length (m)");
    55         FLOAT_PROPERTIES.put(VehiclePropertyTypes.SPEED, "speed (km/h)");
    56         FLOAT_PROPERTIES.put(VehiclePropertyTypes.WEIGHT, "weight (t)");
    57         FLOAT_PROPERTIES.put(VehiclePropertyTypes.AXLELOAD, "axleload (t)");
     54        FLOAT_PROPERTIES.put(VehiclePropertyTypes.HEIGHT, tr("height (m)"));
     55        FLOAT_PROPERTIES.put(VehiclePropertyTypes.WIDTH, tr("width (m)"));
     56        FLOAT_PROPERTIES.put(VehiclePropertyTypes.LENGTH, tr("length (m)"));
     57        FLOAT_PROPERTIES.put(VehiclePropertyTypes.SPEED, tr("speed (km/h)"));
     58        FLOAT_PROPERTIES.put(VehiclePropertyTypes.WEIGHT, tr("weight (t)"));
     59        FLOAT_PROPERTIES.put(VehiclePropertyTypes.AXLELOAD, tr("axleload (t)"));
    5860    }
    5961
     
    6769        public BookmarkNamePanel(String initialName) {
    6870            super();
    69             this.setBorder(BorderFactory.createTitledBorder("bookmark name"));
     71            this.setBorder(BorderFactory.createTitledBorder(tr("Bookmark name")));
    7072
    7173            this.setLayout(new BoxLayout(this, BoxLayout.X_AXIS));
     
    8183
    8284            if (existingBookmarkNames.contains(name)) {
    83                 JOptionPane.showMessageDialog(this, "Bookmark name already exists!");
     85                JOptionPane.showMessageDialog(this, tr("Bookmark name already exists!"));
    8486                return null;
    8587            }
     
    8789            for (char nameChar : name.toCharArray()) {
    8890                if (FORBIDDEN_CHARS.contains(nameChar)) {
    89                     JOptionPane.showMessageDialog(this, "Bookmark name must not contain '" +
    90                             nameChar + "'!");
     91                    JOptionPane.showMessageDialog(this, tr("Bookmark name must not contain ''{0}''!", nameChar));
    9192                    return null;
    9293                }
     
    103104        public AccessClassPanel(PreferenceAccessParameters initialParameters) {
    104105            super();
    105             this.setBorder(BorderFactory.createTitledBorder("access class"));
     106            this.setBorder(BorderFactory.createTitledBorder(tr("Access class")));
    106107
    107108            this.setLayout(new BoxLayout(this, BoxLayout.X_AXIS));
     
    118119            for (char nameChar : name.toCharArray()) {
    119120                if (FORBIDDEN_CHARS.contains(nameChar)) {
    120                     JOptionPane.showMessageDialog(this, "Access class must not contain '" +
    121                             nameChar + "'!");
     121                    JOptionPane.showMessageDialog(this, tr("Access class must not contain ''{0}''!", nameChar));
    122122                    return null;
    123123                }
     
    137137        public AccessTypesPanel(PreferenceAccessParameters initialParameters) {
    138138            super();
    139             this.setBorder(BorderFactory.createTitledBorder("access types"));
     139            this.setBorder(BorderFactory.createTitledBorder(tr("Access types")));
    140140
    141141            this.setLayout(
     
    174174        public VehiclePropertiesPanel(PreferenceAccessParameters initialParameters) {
    175175            super();
    176             this.setBorder(BorderFactory.createTitledBorder("vehicle properties"));
     176            this.setBorder(BorderFactory.createTitledBorder(tr("Vehicle properties")));
    177177
    178178            this.setLayout(new GridLayout(((COLS-1 + FLOAT_PROPERTIES.size()) / COLS),
     
    223223        public RoadQualityPanel(PreferenceAccessParameters initialParameters) {
    224224            super();
    225             this.setBorder(BorderFactory.createTitledBorder("road requirements"));
     225            this.setBorder(BorderFactory.createTitledBorder(tr("Road requirements")));
    226226
    227227
     
    230230            /* incline up */
    231231            {
    232                 JLabel inclineUpLabel = new JLabel("max. incline up (%, pos.)");
    233                 inclineUpLabel.setToolTipText("maximum incline the vehicle can go up");
     232                JLabel inclineUpLabel = new JLabel(tr("Max. incline up (%, pos.)"));
     233                inclineUpLabel.setToolTipText(tr("Maximum incline the vehicle can go up"));
    234234                this.add(inclineUpLabel);
    235235
     
    241241                    inclineUpTextField.setText(vehiclePropertyString);
    242242                }
    243                 inclineUpTextField.setToolTipText("maximum incline the vehicle can go up");
     243                inclineUpTextField.setToolTipText(tr("Maximum incline the vehicle can go up"));
    244244
    245245                this.add(inclineUpTextField);
     
    248248            /* incline down */
    249249            {
    250                 JLabel inclineDownLabel = new JLabel("max. incline down (%, pos.)");
    251                 inclineDownLabel.setToolTipText("maximum incline the vehicle can go down");
     250                JLabel inclineDownLabel = new JLabel(tr("Max. incline down (%, pos.)"));
     251                inclineDownLabel.setToolTipText(tr("Maximum incline the vehicle can go down"));
    252252                this.add(inclineDownLabel);
    253253
     
    259259                    inclineDownTextField.setText(vehiclePropertyString);
    260260                }
    261                 inclineDownTextField.setToolTipText("maximum incline the vehicle can go down");
     261                inclineDownTextField.setToolTipText(tr("Maximum incline the vehicle can go down"));
    262262
    263263                this.add(inclineDownTextField);
     
    266266            /* surface */
    267267            {
    268                 JLabel surfaceLabel = new JLabel("surface blacklist");
    269                 surfaceLabel.setToolTipText("list of surfaces the vehicle cannot use, "
    270                         + "values are separated by semicolons (;)");
     268                JLabel surfaceLabel = new JLabel(tr("Surface blacklist"));
     269                surfaceLabel.setToolTipText(tr("List of surfaces the vehicle cannot use, "
     270                        + "values are separated by semicolons (;)"));
    271271                this.add(surfaceLabel);
    272272
     
    280280                }
    281281
    282                 surfaceTextField.setToolTipText("list of surfaces the vehicle cannot use, "
    283                         + "values are separated by semicolons (;)");
     282                surfaceTextField.setToolTipText(tr("List of surfaces the vehicle cannot use, "
     283                        + "values are separated by semicolons (;)"));
    284284
    285285                this.add(surfaceTextField);
     
    288288            /* tracktype */
    289289            {
    290                 JLabel tracktypeLabel = new JLabel("max. tracktype grade");
    291                 tracktypeLabel.setToolTipText("worst tracktype (1-5) the vehicle can still use,"
    292                         + " 0 for none");
     290                JLabel tracktypeLabel = new JLabel(tr("max. tracktype grade"));
     291                tracktypeLabel.setToolTipText(tr("Worst tracktype (1-5) the vehicle can still use,"
     292                        + " 0 for none"));
    293293                this.add(tracktypeLabel);
    294294
     
    300300                    tracktypeTextField.setText(vehiclePropertyString);
    301301                }
    302                 tracktypeTextField.setToolTipText("worst tracktype (1-5) the vehicle can still use,"
    303                         + " 0 for none");
     302                tracktypeTextField.setToolTipText(tr("Worst tracktype (1-5) the vehicle can still use,"
     303                        + " 0 for none"));
    304304
    305305                this.add(tracktypeTextField);
     
    343343            new BoxLayout(this, BoxLayout.X_AXIS);
    344344
    345             JButton okButton = new JButton(existingBookmark?"Change bookmark":"Create bookmark");
     345            JButton okButton = new JButton(existingBookmark?tr("Change bookmark"):tr("Create bookmark"));
    346346            okButton.addActionListener(new ActionListener() {
    347347                public void actionPerformed(ActionEvent e) {
     
    358358            this.add(okButton);
    359359
    360             JButton cancelButton = new JButton("Cancel");
     360            JButton cancelButton = new JButton(tr("Cancel"));
    361361            cancelButton.addActionListener(new ActionListener() {
    362362                public void actionPerformed(ActionEvent e) {
     
    384384            Collection<String> existingBookmarkNames,
    385385            PreferenceAccessParameters initialAccessParameters, BookmarkAction okAction) {
    386         super(owner, "edit access parameters", true);
     386        super(owner, tr("Edit access parameters"), true);
    387387
    388388        this.existingBookmark = existingBookmark;
  • applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/plugin/dialogs/GraphViewDialog.java

    r23189 r26174  
    11package org.openstreetmap.josm.plugins.graphview.plugin.dialogs;
     2
     3import static org.openstreetmap.josm.tools.I18n.tr;
    24
    35import java.awt.BorderLayout;
     
    6567    public GraphViewDialog(final GraphViewPlugin plugin) {
    6668
    67         super("Graph View Dialog", "graphview",
    68                 "Open the dialog for graph view configuration.", (Shortcut)null, HEIGHT);
     69        super(tr("Graph View Dialog"), "graphview",
     70                tr("Open the dialog for graph view configuration."), (Shortcut)null, HEIGHT);
    6971
    7072        this.preferences = GraphViewPreferences.getInstance();
     
    7375        availableColorSchemes = new LinkedHashMap<String, ColorScheme>();
    7476
    75         availableColorSchemes.put("default",
     77        availableColorSchemes.put(tr("default"),
    7678                new PreferencesColorScheme(preferences));
    77         availableColorSchemes.put("end nodes",
     79        availableColorSchemes.put(tr("end nodes"),
    7880                new EndNodeColorScheme(Color.GRAY, Color.RED, Color.GRAY));
    79         availableColorSchemes.put("maxspeed",
     81        availableColorSchemes.put(tr("maxspeed"),
    8082                new MaxspeedColorScheme());
    81         availableColorSchemes.put("maxweight",
     83        availableColorSchemes.put(tr("maxweight"),
    8284                new MaxweightColorScheme());
    83         availableColorSchemes.put("maxheight",
     85        availableColorSchemes.put(tr("maxheight"),
    8486                new MaxheightColorScheme());
    85         availableColorSchemes.put("incline",
     87        availableColorSchemes.put(tr("incline"),
    8688                new InclineColorScheme());
    8789
     
    103105        /* create ruleset label and combo box */
    104106        {
    105             JLabel rulesetLabel = new JLabel("ruleset:");
     107            JLabel rulesetLabel = new JLabel(tr("Ruleset:"));
    106108            gbcLabel.gridy = 0;
    107109            selectionLayout.setConstraints(rulesetLabel, gbcLabel);
     
    117119        /* create bookmark label and combo box */
    118120        {
    119             JLabel bookmarkLabel = new JLabel("parameters:");
     121            JLabel bookmarkLabel = new JLabel(tr("Parameters:"));
    120122            gbcLabel.gridy = 1;
    121123            selectionLayout.setConstraints(bookmarkLabel, gbcLabel);
     
    131133        /* create color scheme label and combo box */
    132134        {
    133             JLabel colorSchemeLabel = new JLabel("coloring:");
     135            JLabel colorSchemeLabel = new JLabel(tr("Coloring:"));
    134136            gbcLabel.gridy = 2;
    135137            selectionLayout.setConstraints(colorSchemeLabel, gbcLabel);
     
    154156
    155157        JPanel buttonPanel = new JPanel();
    156         JButton showLayerButton = new JButton("create/update graph");
     158        JButton showLayerButton = new JButton(tr("Create/update graph"));
    157159        showLayerButton.addActionListener(new ActionListener() {
    158160            public void actionPerformed(ActionEvent e) {
  • applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/plugin/dialogs/GraphViewPreferenceEditor.java

    r23434 r26174  
    11package org.openstreetmap.josm.plugins.graphview.plugin.dialogs;
     2
     3import static org.openstreetmap.josm.tools.I18n.tr;
    24
    35import java.awt.Color;
     
    5961        readPreferences();
    6062
    61         preferencePanel = gui.createPreferenceTab("graphview", "Graphview",
    62         "Settings for the Graphview plugin that visualizes routing graphs.");
     63        preferencePanel = gui.createPreferenceTab("graphview", tr("Graphview"),
     64        tr("Settings for the Graphview plugin that visualizes routing graphs."));
    6365
    6466        JPanel mainPanel = createMainPanel();
     
    123125
    124126        JPanel rulesetPanel = new JPanel();
    125         rulesetPanel.setBorder(BorderFactory.createTitledBorder("ruleset"));
     127        rulesetPanel.setBorder(BorderFactory.createTitledBorder(tr("Ruleset")));
    126128        rulesetPanel.setLayout(new BoxLayout(rulesetPanel, BoxLayout.Y_AXIS));
    127129
    128         internalRulesetCheckBox = new JCheckBox("use built-in rulesets");
     130        internalRulesetCheckBox = new JCheckBox(tr("Use built-in rulesets"));
    129131        internalRulesetCheckBox.setSelected(GraphViewPreferences.getInstance().getUseInternalRulesets());
    130132        internalRulesetCheckBox.addActionListener(internalRulesetActionListener);
    131133        rulesetPanel.add(internalRulesetCheckBox);
    132134
    133         rulesetFolderLabel = new JLabel("external ruleset directory:");
     135        rulesetFolderLabel = new JLabel(tr("Wxternal ruleset directory:"));
    134136        rulesetPanel.add(rulesetFolderLabel);
    135137
     
    139141        rulesetPanel.add(rulesetFolderTextField);
    140142
    141         selectRulesetFolderButton = new JButton("select directory");
     143        selectRulesetFolderButton = new JButton(tr("Select directory"));
    142144        selectRulesetFolderButton.addActionListener(selectRulesetFolderActionListener);
    143145        rulesetPanel.add(selectRulesetFolderButton);
     
    151153
    152154        JPanel vehiclePanel = new JPanel();
    153         vehiclePanel.setBorder(BorderFactory.createTitledBorder("vehicle"));
     155        vehiclePanel.setBorder(BorderFactory.createTitledBorder(tr("Vehicle")));
    154156        vehiclePanel.setLayout(new BoxLayout(vehiclePanel, BoxLayout.Y_AXIS));
    155157
     
    160162        buttonPanel.setLayout(new BoxLayout(buttonPanel, BoxLayout.X_AXIS));
    161163
    162         JButton createButton = new JButton("create");
     164        JButton createButton = new JButton(tr("Create"));
    163165        createButton.addActionListener(createVehicleActionListener);
    164166        buttonPanel.add(createButton);
    165167
    166         editBookmarkButton = new JButton("edit");
     168        editBookmarkButton = new JButton(tr("Edit"));
    167169        editBookmarkButton.addActionListener(editVehicleActionListener);
    168170        buttonPanel.add(editBookmarkButton);
    169171
    170         deleteBookmarkButton = new JButton("delete");
     172        deleteBookmarkButton = new JButton(tr("Delete"));
    171173        deleteBookmarkButton.addActionListener(deleteVehicleActionListener);
    172174        buttonPanel.add(deleteBookmarkButton);
    173175
    174         JButton restoreDefaultsButton = new JButton("restore defaults");
     176        JButton restoreDefaultsButton = new JButton(tr("Restore defaults"));
    175177        restoreDefaultsButton.addActionListener(restoreVehicleDefaultsActionListener);
    176178        buttonPanel.add(restoreDefaultsButton);
     
    184186       
    185187        JPanel visualizationPanel = new JPanel();
    186         visualizationPanel.setBorder(BorderFactory.createTitledBorder("visualization"));
     188        visualizationPanel.setBorder(BorderFactory.createTitledBorder(tr("Visualization")));
    187189        visualizationPanel.setLayout(new BoxLayout(visualizationPanel, BoxLayout.Y_AXIS));
    188190       
    189         separateDirectionsCheckBox = new JCheckBox("draw directions separately");
     191        separateDirectionsCheckBox = new JCheckBox(tr("Draw directions separately"));
    190192        separateDirectionsCheckBox.setSelected(GraphViewPreferences.getInstance().getSeparateDirections());
    191193        visualizationPanel.add(separateDirectionsCheckBox);
     
    198200                Color nodeColor = GraphViewPreferences.getInstance().getNodeColor();
    199201               
    200                 nodeColorButton = new JButton("node color");
     202                nodeColorButton = new JButton(tr("Node color"));
    201203                nodeColorButton.addActionListener(chooseNodeColorActionListener);
    202204                colorPanel.add(nodeColorButton);
     
    207209                Color segmentColor = GraphViewPreferences.getInstance().getSegmentColor();
    208210               
    209                 segmentColorButton = new JButton("arrow color");
     211                segmentColorButton = new JButton(tr("Arrow color"));
    210212                segmentColorButton.addActionListener(chooseSegmentColorActionListener);
    211213                colorPanel.add(segmentColorButton);
     
    280282                    null,
    281283                    false,
    282                     "new bookmark",
     284                    tr("New bookmark"),
    283285                    parameterBookmarks.keySet(),
    284286                    defaultBookmarkParameters,
     
    337339                int userChoice = JOptionPane.showConfirmDialog(
    338340                        preferencePanel,
    339                         "Really delete \"" + selectedBookmarkName + "\"?",
    340                         "Bookmark deletion",
     341                        tr("Really delete \"{0}\"?", selectedBookmarkName),
     342                        tr("Bookmark deletion"),
    341343                        JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE);
    342344
     
    355357            int userChoice = JOptionPane.showConfirmDialog(
    356358                    preferencePanel,
    357                     "Really restore default bookmarks?\n"
    358                     + "All manually added or edited bookmarks will be lost!",
    359                     "Bookmark reset",
     359                    tr("Really restore default bookmarks?\n"
     360                    + "All manually added or edited bookmarks will be lost!"),
     361                    tr("Bookmark reset"),
    360362                    JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE);
    361363
     
    374376               
    375377                Color selectedColor = JColorChooser.showDialog(
    376                                 preferencePanel, "Choose node color", nodeColorField.getBackground());
     378                                preferencePanel, tr("Choose node color"), nodeColorField.getBackground());
    377379               
    378380                if (selectedColor != null) {
     
    387389               
    388390                Color selectedColor = JColorChooser.showDialog(
    389                                 preferencePanel, "Choose arrow color", segmentColorField.getBackground());
     391                                preferencePanel, tr("Choose arrow color"), segmentColorField.getBackground());
    390392               
    391393                if (selectedColor != null) {
  • applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/plugin/layer/GraphViewLayer.java

    r23434 r26174  
    11package org.openstreetmap.josm.plugins.graphview.plugin.layer;
     2
     3import static org.openstreetmap.josm.tools.I18n.tr;
    24
    35import java.awt.BasicStroke;
     
    251253    private Point getNodePoint(LatLonCoords coords, MapView mv) {
    252254        LatLon latLon = new LatLon(coords.getLat(), coords.getLon());
    253         EastNorth eastNorth = Main.proj.latlon2eastNorth(latLon);
     255        EastNorth eastNorth = Main.getProjection().latlon2eastNorth(latLon);
    254256        return mv.getPoint(eastNorth);
    255257    }
     
    300302    @Override
    301303    public String getToolTipText() {
    302         return "routing graph calculated by the GraphView plugin";
     304        return tr("Routing graph calculated by the GraphView plugin");
    303305    }
    304306
    305307    @Override
    306308    public void mergeFrom(Layer from) {
    307         throw new AssertionError("GraphView layer is not mergable");
     309        throw new AssertionError(tr("GraphView layer is not mergable"));
    308310    }
    309311
  • applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/plugin/preferences/GraphViewPreferences.java

    r23434 r26174  
    11package org.openstreetmap.josm.plugins.graphview.plugin.preferences;
     2
     3import static org.openstreetmap.josm.tools.I18n.marktr;
    24
    35import static org.openstreetmap.josm.plugins.graphview.core.property.VehiclePropertyTypes.AXLELOAD;
     
    216218        currentInternalRuleset = null;
    217219
    218         nodeColor = Color.WHITE;
    219         segmentColor = Color.WHITE;
    220220        currentColorScheme = new PreferencesColorScheme(this);
    221221
     
    244244        }
    245245
    246         Main.pref.put("graphview.defaultNodeColor", createColorString(nodeColor));
    247         Main.pref.put("graphview.defaultSegmentColor", createColorString(segmentColor));
     246        Main.pref.putColor(marktr("GraphView default node"), nodeColor);
     247        Main.pref.putColor(marktr("Graphview default segment"), segmentColor);
    248248
    249249        Main.pref.put("graphview.separateDirections", separateDirections);
     
    289289        }
    290290
    291         if (Main.pref.hasKey("graphview.defaultNodeColor")) {
    292             Color color = parseColorString(Main.pref.get("graphview.defaultNodeColor"));
    293             if (color != null) {
    294                 nodeColor = color;
    295             }
    296         }
    297         if (Main.pref.hasKey("graphview.defaultSegmentColor")) {
    298             Color color = parseColorString(Main.pref.get("graphview.defaultSegmentColor"));
    299             if (color != null) {
    300                 segmentColor = color;
    301             }
    302         }
    303 
     291        nodeColor = Main.pref.getColor(marktr("GraphView default node"), Color.white);
     292        segmentColor = Main.pref.getColor(marktr("Graphview default segment"), Color.white);
    304293        separateDirections = Main.pref.getBoolean("graphview.separateDirections", false);
    305294
     
    471460        }
    472461    }
    473 
    474     private static final Pattern COLOR_PATTERN =
    475         Pattern.compile("^(\\d{1,3}),\\s*(\\d{1,3}),\\s*(\\d{1,3})$");
    476     private String createColorString(Color color) {
    477         return color.getRed() + ", " + color.getGreen() + ", " + color.getBlue();
    478     }
    479 
    480     private Color parseColorString(String string) {
    481         Matcher matcher = COLOR_PATTERN.matcher(string);
    482         if (!matcher.matches()) {
    483             return null;
    484         } else {
    485             int r = Integer.parseInt(matcher.group(1));
    486             int g = Integer.parseInt(matcher.group(2));
    487             int b = Integer.parseInt(matcher.group(3));
    488             return new Color(r, g, b);
    489         }
    490     }
    491 
    492462}
  • applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/plugin/preferences/VehiclePropertyStringParser.java

    r23189 r26174  
    11package org.openstreetmap.josm.plugins.graphview.plugin.preferences;
     2
     3import static org.openstreetmap.josm.tools.I18n.tr;
    24
    35import java.security.InvalidParameterException;
     
    3133
    3234    public static final String ERROR_WEIGHT =
    33         "Weights must be given as positive decimal numbers with unit \"t\" or without unit.";
     35        tr("Weights must be given as positive decimal numbers with unit \"t\" or without unit.");
    3436    public static final String ERROR_LENGTH =
    35         "Lengths must be given as positive decimal numbers with unit \"m\", \"km\", \"mi\"" +
    36         " or without unit.\nAlternatively, the format FEET' INCHES\" can be used.";
     37        tr("Lengths must be given as positive decimal numbers with unit \"m\", \"km\", \"mi\"" +
     38        " or without unit.\nAlternatively, the format FEET' INCHES\" can be used.");
    3739    public static final String ERROR_SPEED =
    38         "Speeds should be given as numbers without unit or "
    39         + "as numbers followed by \"mph\".";
     40        tr("Speeds should be given as numbers without unit or "
     41        + "as numbers followed by \"mph\".");
    4042    public static final String ERROR_INCLINE =
    41         "Inclines must be given as positive decimal numbers with followed by \"%\".";
     43        tr("Inclines must be given as positive decimal numbers with followed by \"%\".");
    4244    public static final String ERROR_TRACKTYPE =
    43         "Tracktype grades must be given as integers between 0 and 5.";
     45        tr("Tracktype grades must be given as integers between 0 and 5.");
    4446    public static final String ERROR_SURFACE =
    45         "Surface values must not contain any of the following characters: ',' '{' '}' '=' '|";
     47        tr("Surface values must not contain any of the following characters: ',' '{' '}' '=' '|");
    4648
    4749    private static final List<Character> FORBIDDEN_SURFACE_CHARS =
     
    145147
    146148        } else {
    147             throw new InvalidParameterException("unknown property type: " + propertyType);
     149            throw new InvalidParameterException("Unknown property type: " + propertyType);
    148150        }
    149151
  • applications/editors/josm/plugins/imageryadjust/build.xml

    r25199 r26174  
    1 <?xml version="1.0" encoding="UTF-8"?>
     1<?xml version="1.0" encoding="utf-8"?>
    22<!--
    33** This is a template build file for a JOSM  plugin.
     
    2929-->
    3030<project name="imageryadjust" default="dist" basedir=".">
    31 
    3231    <!-- enter the SVN commit message -->
    33     <property name="commit.message" value="Commit message" />
     32    <property name="commit.message" value="Commit message"/>
    3433    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    35     <property name="plugin.main.version" value="3835" />
    36 
    37 
     34    <property name="plugin.main.version" value="3835"/>
    3835    <!--
    3936      ************************************************
    4037      ** should not be necessary to change the following properties
    4138     -->
    42     <property name="josm"                   location="../../core/dist/josm-custom.jar"/>
    43     <property name="plugin.build.dir"       value="build"/>
    44     <property name="plugin.src.dir"         value="src"/>
     39    <property name="josm" location="../../core/dist/josm-custom.jar"/>
     40    <property name="plugin.build.dir" value="build"/>
     41    <property name="plugin.src.dir" value="src"/>
    4542    <!-- this is the directory where the plugin jar is copied to -->
    46     <property name="plugin.dist.dir"        value="../../dist"/>
     43    <property name="plugin.dist.dir" value="../../dist"/>
    4744    <property name="ant.build.javac.target" value="1.5"/>
    48     <property name="plugin.dist.dir"        value="../../dist"/>
    49     <property name="plugin.jar"             value="${plugin.dist.dir}/${ant.project.name}.jar"/>
    50 
     45    <property name="plugin.dist.dir" value="../../dist"/>
     46    <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/>
    5147    <!--
    5248    **********************************************************
     
    5753        <mkdir dir="${plugin.build.dir}"/>
    5854    </target>
    59 
    6055    <!--
    6156    **********************************************************
     
    7065        </javac>
    7166    </target>
    72 
    7367    <!--
    7468    **********************************************************
     
    8478            <fileset dir="images"/>
    8579        </copy>
     80        <copy todir="${plugin.build.dir}/data">
     81            <fileset dir="data"/>
     82        </copy>
    8683        <copy todir="${plugin.build.dir}">
    8784            <fileset dir=".">
    88                 <include name="README" />
    89                 <include name="LICENSE" />
     85                <include name="README"/>
     86                <include name="LICENSE"/>
    9087            </fileset>
    9188        </copy>
     
    111108        </jar>
    112109    </target>
    113 
    114110    <!--
    115111    **********************************************************
     
    120116    -->
    121117    <target name="revision">
    122 
    123118        <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
    124119            <env key="LANG" value="C"/>
     
    130125        <delete file="REVISION"/>
    131126    </target>
    132 
    133127    <!--
    134128    **********************************************************
     
    140134        <delete file="${plugin.jar}"/>
    141135    </target>
    142 
    143136    <!--
    144137    **********************************************************
     
    155148        <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
    156149    </target>
    157 
    158 
    159150    <!--
    160151    ************************** Publishing the plugin ***********************************
     
    175166        <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
    176167        <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
    177         <delete file="core.info.xml" />
    178     </target>
    179 
     168        <delete file="core.info.xml"/>
     169    </target>
    180170    <!--
    181171        ** commits the source tree for this plugin
     
    190180        </exec>
    191181    </target>
    192 
    193182    <!--
    194183        ** updates (svn up) the source tree for this plugin
     
    208197        </exec>
    209198    </target>
    210 
    211199    <!--
    212200        ** commits the plugin.jar
     
    230218        </exec>
    231219    </target>
    232 
    233220    <!-- ** make sure svn is present as a command line tool ** -->
    234221    <target name="ensure-svn-present">
    235222        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
    236             <env key="LANG" value="C" />
    237             <arg value="--version" />
     223            <env key="LANG" value="C"/>
     224            <arg value="--version"/>
    238225        </exec>
    239226        <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
     
    241228            <condition>
    242229                <not>
    243                     <isset property="svn.exit.code" />
     230                    <isset property="svn.exit.code"/>
    244231                </not>
    245232            </condition>
     
    248235            <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
    249236            <condition>
    250                 <isfailure code="${svn.exit.code}" />
     237                <isfailure code="${svn.exit.code}"/>
    251238            </condition>
    252239        </fail>
    253240    </target>
    254 
    255241    <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
    256242    </target>
  • applications/editors/josm/plugins/imagewaypoint/build.xml

    r25192 r26174  
    1 <?xml version="1.0" encoding="UTF-8"?>
     1<?xml version="1.0" encoding="utf-8"?>
    22<!--
    33** This is the build file for the ImageWayPoint plugin.
     
    2929-->
    3030<project name="ImageWayPoint" default="dist" basedir=".">
     31    <!-- enter the SVN commit message -->
     32    <property name="commit.message" value="Updated the constructor signature of the plugin main class"/>
     33    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
     34    <property name="plugin.main.version" value="3835"/>
     35    <property name="josm" location="../../core/dist/josm-custom.jar"/>
     36    <property name="plugin.dist.dir" value="../../dist"/>
     37    <property name="plugin.build.dir" value="build"/>
     38    <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/>
     39    <property name="ant.build.javac.target" value="1.5"/>
     40    <target name="init">
     41        <mkdir dir="${plugin.build.dir}"/>
     42    </target>
     43    <target name="compile" depends="init">
     44        <echo message="creating ${plugin.jar}"/>
     45        <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}">
     46            <compilerarg value="-Xlint:deprecation"/>
     47            <compilerarg value="-Xlint:unchecked"/>
     48        </javac>
     49    </target>
     50    <target name="dist" depends="compile,revision">
     51        <copy todir="${plugin.build.dir}/images">
     52            <fileset dir="images"/>
     53        </copy>
     54        <copy todir="${plugin.build.dir}/data">
     55            <fileset dir="data"/>
     56        </copy>
     57        <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
     58            <manifest>
     59                <attribute name="Author" value="Flint"/>
     60                <attribute name="Plugin-Class" value="org.insignificant.josm.plugins.imagewaypoint.ImageWayPointPlugin"/>
     61                <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
     62                <attribute name="Plugin-Description" value="Another plugin to match images to the waypoints in a GPX file. A match is made when the 'name', 'cmt' or 'desc' attribute of a waypoint tag matches the filename of an image."/>
     63                <attribute name="Plugin-Early" value="false"/>
     64                <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
     65                <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
     66            </manifest>
     67        </jar>
     68    </target>
     69    <target name="revision">
     70        <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
     71            <env key="LANG" value="C"/>
     72            <arg value="info"/>
     73            <arg value="--xml"/>
     74            <arg value="."/>
     75        </exec>
     76        <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
     77        <delete file="REVISION"/>
     78    </target>
     79    <target name="clean">
     80        <delete dir="${plugin.build.dir}"/>
     81        <delete file="${plugin.jar}"/>
     82    </target>
     83    <target name="install" depends="dist">
     84        <property environment="env"/>
     85        <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
     86            <and>
     87                <os family="windows"/>
     88            </and>
     89        </condition>
     90        <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
     91    </target>
     92    <!--
     93    ************************** Publishing the plugin ***********************************
     94    -->
     95    <!--
     96        ** extracts the JOSM release for the JOSM version in ../core and saves it in the
     97        ** property ${coreversion.info.entry.revision}
     98        **
     99        -->
     100    <target name="core-info">
     101        <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
     102            <env key="LANG" value="C"/>
     103            <arg value="info"/>
     104            <arg value="--xml"/>
     105            <arg value="../../core"/>
     106        </exec>
     107        <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
     108        <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
     109        <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
     110        <delete file="core.info.xml"/>
     111    </target>
     112    <!--
     113        ** commits the source tree for this plugin
     114        -->
     115    <target name="commit-current">
     116        <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
     117        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     118            <env key="LANG" value="C"/>
     119            <arg value="commit"/>
     120            <arg value="-m '${commit.message}'"/>
     121            <arg value="."/>
     122        </exec>
     123    </target>
     124    <!--
     125        ** updates (svn up) the source tree for this plugin
     126        -->
     127    <target name="update-current">
     128        <echo>Updating plugin source ...</echo>
     129        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     130            <env key="LANG" value="C"/>
     131            <arg value="up"/>
     132            <arg value="."/>
     133        </exec>
     134        <echo>Updating ${plugin.jar} ...</echo>
     135        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     136            <env key="LANG" value="C"/>
     137            <arg value="up"/>
     138            <arg value="../dist/${plugin.jar}"/>
     139        </exec>
     140    </target>
     141    <!--
     142        ** commits the plugin.jar
     143        -->
     144    <target name="commit-dist">
     145        <echo>
     146    ***** Properties of published ${plugin.jar} *****
     147    Commit message    : '${commit.message}'
     148    Plugin-Mainversion: ${plugin.main.version}
     149    JOSM build version: ${coreversion.info.entry.revision}
     150    Plugin-Version    : ${version.entry.commit.revision}
     151    ***** / Properties of published ${plugin.jar} *****
    31152
    32         <!-- enter the SVN commit message -->
    33         <property name="commit.message" value="Updated the constructor signature of the plugin main class" />
    34         <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    35         <property name="plugin.main.version" value="3835" />
    36 
    37         <property name="josm"                   location="../../core/dist/josm-custom.jar"/>
    38         <property name="plugin.dist.dir"        value="../../dist"/>
    39         <property name="plugin.build.dir"       value="build"/>
    40         <property name="plugin.jar"             value="${plugin.dist.dir}/${ant.project.name}.jar"/>
    41         <property name="ant.build.javac.target" value="1.5"/>
    42         <target name="init">
    43                 <mkdir dir="${plugin.build.dir}"/>
    44         </target>
    45         <target name="compile" depends="init">
    46                 <echo message="creating ${plugin.jar}"/>
    47                 <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}">
    48                         <compilerarg value="-Xlint:deprecation"/>
    49                         <compilerarg value="-Xlint:unchecked"/>
    50                 </javac>
    51         </target>
    52         <target name="dist" depends="compile,revision">
    53                 <copy todir="${plugin.build.dir}/images">
    54                         <fileset dir="images"/>
    55                 </copy>
    56                 <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
    57                         <manifest>
    58                                 <attribute name="Author" value="Flint"/>
    59                                 <attribute name="Plugin-Class" value="org.insignificant.josm.plugins.imagewaypoint.ImageWayPointPlugin"/>
    60                                 <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
    61                                 <attribute name="Plugin-Description" value="Another plugin to match images to the waypoints in a GPX file. A match is made when the 'name', 'cmt' or 'desc' attribute of a waypoint tag matches the filename of an image."/>
    62                                 <attribute name="Plugin-Early" value="false"/>
    63                                 <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
    64                                 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
    65                         </manifest>
    66                 </jar>
    67         </target>
    68         <target name="revision">
    69                 <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
    70                         <env key="LANG" value="C"/>
    71                         <arg value="info"/>
    72                         <arg value="--xml"/>
    73                         <arg value="."/>
    74                 </exec>
    75                 <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
    76                 <delete file="REVISION"/>
    77         </target>
    78         <target name="clean">
    79                 <delete dir="${plugin.build.dir}"/>
    80                 <delete file="${plugin.jar}"/>
    81         </target>
    82         <target name="install" depends="dist">
    83                 <property environment="env"/>
    84                 <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
    85                         <and>
    86                                 <os family="windows"/>
    87                         </and>
    88                 </condition>
    89                 <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
    90         </target>
    91 
    92         <!--
    93         ************************** Publishing the plugin ***********************************
    94         -->
    95         <!--
    96                 ** extracts the JOSM release for the JOSM version in ../core and saves it in the
    97                 ** property ${coreversion.info.entry.revision}
    98                 **
    99                 -->
    100         <target name="core-info">
    101                 <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
    102                         <env key="LANG" value="C"/>
    103                         <arg value="info"/>
    104                         <arg value="--xml"/>
    105                         <arg value="../../core"/>
    106                 </exec>
    107                 <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
    108                 <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
    109                 <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
    110                 <delete file="core.info.xml" />
    111         </target>
    112 
    113         <!--
    114                 ** commits the source tree for this plugin
    115                 -->
    116         <target name="commit-current">
    117                 <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
    118                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    119                         <env key="LANG" value="C"/>
    120                         <arg value="commit"/>
    121                         <arg value="-m '${commit.message}'"/>
    122                         <arg value="."/>
    123                 </exec>
    124         </target>
    125 
    126         <!--
    127                 ** updates (svn up) the source tree for this plugin
    128                 -->
    129         <target name="update-current">
    130                 <echo>Updating plugin source ...</echo>
    131                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    132                         <env key="LANG" value="C"/>
    133                         <arg value="up"/>
    134                         <arg value="."/>
    135                 </exec>
    136                 <echo>Updating ${plugin.jar} ...</echo>
    137                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    138                         <env key="LANG" value="C"/>
    139                         <arg value="up"/>
    140                         <arg value="../dist/${plugin.jar}"/>
    141                 </exec>
    142         </target>
    143 
    144         <!--
    145                 ** commits the plugin.jar
    146                 -->
    147         <target name="commit-dist">
    148                 <echo>
    149         ***** Properties of published ${plugin.jar} *****
    150         Commit message    : '${commit.message}'
    151         Plugin-Mainversion: ${plugin.main.version}
    152         JOSM build version: ${coreversion.info.entry.revision}
    153         Plugin-Version    : ${version.entry.commit.revision}
    154         ***** / Properties of published ${plugin.jar} *****
    155 
    156         Now commiting ${plugin.jar} ...
    157         </echo>
    158                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    159                         <env key="LANG" value="C"/>
    160                         <arg value="-m '${commit.message}'"/>
    161                         <arg value="commit"/>
    162                         <arg value="${plugin.jar}"/>
    163                 </exec>
    164         </target>
    165 
    166         <!-- ** make sure svn is present as a command line tool ** -->
    167         <target name="ensure-svn-present">
    168                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
    169                         <env key="LANG" value="C" />
    170                         <arg value="--version" />
    171                 </exec>
    172                 <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
    173                         <!-- return code not set at all? Most likely svn isn't installed -->
    174                         <condition>
    175                                 <not>
    176                                         <isset property="svn.exit.code" />
    177                                 </not>
    178                         </condition>
    179                 </fail>
    180                 <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
    181                         <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
    182                         <condition>
    183                                 <isfailure code="${svn.exit.code}" />
    184                         </condition>
    185                 </fail>
    186         </target>
    187 
    188         <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
    189         </target>
     153    Now commiting ${plugin.jar} ...
     154    </echo>
     155        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     156            <env key="LANG" value="C"/>
     157            <arg value="-m '${commit.message}'"/>
     158            <arg value="commit"/>
     159            <arg value="${plugin.jar}"/>
     160        </exec>
     161    </target>
     162    <!-- ** make sure svn is present as a command line tool ** -->
     163    <target name="ensure-svn-present">
     164        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
     165            <env key="LANG" value="C"/>
     166            <arg value="--version"/>
     167        </exec>
     168        <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
     169            <!-- return code not set at all? Most likely svn isn't installed -->
     170            <condition>
     171                <not>
     172                    <isset property="svn.exit.code"/>
     173                </not>
     174            </condition>
     175        </fail>
     176        <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
     177            <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
     178            <condition>
     179                <isfailure code="${svn.exit.code}"/>
     180            </condition>
     181        </fail>
     182    </target>
     183    <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
     184    </target>
    190185</project>
  • applications/editors/josm/plugins/importvec/build.xml

    r25469 r26174  
    1 <?xml version="1.0" encoding="UTF-8"?>
     1<?xml version="1.0" encoding="utf-8"?>
    22<!--
    33** This is a template build file for a JOSM  plugin.
     
    2929-->
    3030<project name="importvec" default="dist" basedir=".">
    31 
    3231    <!-- enter the SVN commit message -->
    33     <property name="commit.message" value="Commit message" />
     32    <property name="commit.message" value="Commit message"/>
    3433    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    35     <property name="plugin.main.version" value="3922" />
    36 
    37 
     34    <property name="plugin.main.version" value="3922"/>
    3835    <!--
    3936      ************************************************
    4037      ** should not be necessary to change the following properties
    4138     -->
    42     <property name="josm"                   location="../../core/dist/josm-custom.jar"/>
    43     <property name="plugin.build.dir"       value="build"/>
    44     <property name="plugin.src.dir"         value="src"/>
     39    <property name="josm" location="../../core/dist/josm-custom.jar"/>
     40    <property name="plugin.build.dir" value="build"/>
     41    <property name="plugin.src.dir" value="src"/>
    4542    <!-- this is the directory where the plugin jar is copied to -->
    46     <property name="plugin.dist.dir"        value="../../dist"/>
     43    <property name="plugin.dist.dir" value="../../dist"/>
    4744    <property name="ant.build.javac.target" value="1.5"/>
    48     <property name="plugin.dist.dir"        value="../../dist"/>
    49     <property name="plugin.jar"             value="${plugin.dist.dir}/${ant.project.name}.jar"/>
    50 
     45    <property name="plugin.dist.dir" value="../../dist"/>
     46    <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/>
    5147    <!--
    5248    **********************************************************
     
    5753        <mkdir dir="${plugin.build.dir}"/>
    5854    </target>
    59 
    6055    <!--
    6156    **********************************************************
     
    7065        </javac>
    7166    </target>
    72 
    7367    <!--
    7468    **********************************************************
     
    8478            <fileset dir="images"/>
    8579        </copy>
     80        <copy todir="${plugin.build.dir}/data">
     81            <fileset dir="data"/>
     82        </copy>
    8683        <copy todir="${plugin.build.dir}">
    8784            <fileset dir=".">
    88                 <include name="README" />
    89                 <include name="LICENSE" />
     85                <include name="README"/>
     86                <include name="LICENSE"/>
    9087            </fileset>
    9188        </copy>
     
    111108        </jar>
    112109    </target>
    113 
    114110    <!--
    115111    **********************************************************
     
    120116    -->
    121117    <target name="revision">
    122 
    123118        <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
    124119            <env key="LANG" value="C"/>
     
    130125        <delete file="REVISION"/>
    131126    </target>
    132 
    133127    <!--
    134128    **********************************************************
     
    140134        <delete file="${plugin.jar}"/>
    141135    </target>
    142 
    143136    <!--
    144137    **********************************************************
     
    155148        <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
    156149    </target>
    157 
    158 
    159150    <!--
    160151    ************************** Publishing the plugin ***********************************
     
    175166        <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
    176167        <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
    177         <delete file="core.info.xml" />
    178     </target>
    179 
     168        <delete file="core.info.xml"/>
     169    </target>
    180170    <!--
    181171        ** commits the source tree for this plugin
     
    190180        </exec>
    191181    </target>
    192 
    193182    <!--
    194183        ** updates (svn up) the source tree for this plugin
     
    208197        </exec>
    209198    </target>
    210 
    211199    <!--
    212200        ** commits the plugin.jar
     
    230218        </exec>
    231219    </target>
    232 
    233220    <!-- ** make sure svn is present as a command line tool ** -->
    234221    <target name="ensure-svn-present">
    235222        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
    236             <env key="LANG" value="C" />
    237             <arg value="--version" />
     223            <env key="LANG" value="C"/>
     224            <arg value="--version"/>
    238225        </exec>
    239226        <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
     
    241228            <condition>
    242229                <not>
    243                     <isset property="svn.exit.code" />
     230                    <isset property="svn.exit.code"/>
    244231                </not>
    245232            </condition>
     
    248235            <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
    249236            <condition>
    250                 <isfailure code="${svn.exit.code}" />
     237                <isfailure code="${svn.exit.code}"/>
    251238            </condition>
    252239        </fail>
    253240    </target>
    254 
    255241    <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
    256242    </target>
  • applications/editors/josm/plugins/irsrectify/build.xml

    r25199 r26174  
    1 <?xml version="1.0" encoding="UTF-8"?>
     1<?xml version="1.0" encoding="utf-8"?>
    22<!--
    33** This is a template build file for a JOSM  plugin.
     
    2929-->
    3030<project name="irsrectify" default="dist" basedir=".">
    31 
    3231    <!-- enter the SVN commit message -->
    33     <property name="commit.message" value="New plugin - irsrectify" />
     32    <property name="commit.message" value="New plugin - irsrectify"/>
    3433    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    35     <property name="plugin.main.version" value="3835" />
    36 
    37 
     34    <property name="plugin.main.version" value="3835"/>
    3835    <!--
    3936      ************************************************
    4037      ** should not be necessary to change the following properties
    4138     -->
    42     <property name="josm"                   location="../../core/dist/josm-custom.jar" />
    43     <property name="plugin.build.dir"       value="build"/>
    44     <property name="plugin.src.dir"         value="src"/>
     39    <property name="josm" location="../../core/dist/josm-custom.jar"/>
     40    <property name="plugin.build.dir" value="build"/>
     41    <property name="plugin.src.dir" value="src"/>
    4542    <!-- this is the directory where the plugin jar is copied to -->
    46     <property name="plugin.dist.dir"        value="../../dist"/>
     43    <property name="plugin.dist.dir" value="../../dist"/>
    4744    <property name="ant.build.javac.target" value="1.5"/>
    48     <property name="plugin.dist.dir"        value="../../dist"/>
    49     <property name="plugin.jar"             value="${plugin.dist.dir}/${ant.project.name}.jar"/>
    50 
     45    <property name="plugin.dist.dir" value="../../dist"/>
     46    <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/>
    5147    <!--
    5248    **********************************************************
     
    5753        <mkdir dir="${plugin.build.dir}"/>
    5854    </target>
    59 
    6055    <!--
    6156    **********************************************************
     
    7065        </javac>
    7166    </target>
    72 
    7367    <!--
    7468    **********************************************************
     
    8175            <fileset dir="images"/>
    8276        </copy>
     77        <copy todir="${plugin.build.dir}/data">
     78            <fileset dir="data"/>
     79        </copy>
    8380        <copy todir="${plugin.build.dir}">
    8481            <fileset dir=".">
    85                 <include name="README" />
    86                 <include name="LICENSE" />
     82                <include name="README"/>
     83                <include name="LICENSE"/>
    8784            </fileset>
    8885        </copy>
     
    109106        </jar>
    110107    </target>
    111 
    112108    <!--
    113109    **********************************************************
     
    118114    -->
    119115    <target name="revision">
    120 
    121116        <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
    122117            <env key="LANG" value="C"/>
     
    128123        <delete file="REVISION"/>
    129124    </target>
    130 
    131125    <!--
    132126    **********************************************************
     
    138132        <delete file="${plugin.jar}"/>
    139133    </target>
    140 
    141134    <!--
    142135    **********************************************************
     
    153146        <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
    154147    </target>
    155 
    156 
    157148    <!--
    158149    ************************** Publishing the plugin ***********************************
     
    173164        <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
    174165        <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
    175         <delete file="core.info.xml" />
    176     </target>
    177 
     166        <delete file="core.info.xml"/>
     167    </target>
    178168    <!--
    179169        ** commits the source tree for this plugin
     
    188178        </exec>
    189179    </target>
    190 
    191180    <!--
    192181        ** updates (svn up) the source tree for this plugin
     
    206195        </exec>
    207196    </target>
    208 
    209197    <!--
    210198        ** commits the plugin.jar
     
    228216        </exec>
    229217    </target>
    230 
    231218    <!-- ** make sure svn is present as a command line tool ** -->
    232219    <target name="ensure-svn-present">
    233220        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
    234             <env key="LANG" value="C" />
    235             <arg value="--version" />
     221            <env key="LANG" value="C"/>
     222            <arg value="--version"/>
    236223        </exec>
    237224        <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
     
    239226            <condition>
    240227                <not>
    241                     <isset property="svn.exit.code" />
     228                    <isset property="svn.exit.code"/>
    242229                </not>
    243230            </condition>
     
    246233            <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
    247234            <condition>
    248                 <isfailure code="${svn.exit.code}" />
     235                <isfailure code="${svn.exit.code}"/>
    249236            </condition>
    250237        </fail>
    251238    </target>
    252 
    253239    <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
    254240    </target>
  • applications/editors/josm/plugins/junctionchecking/build.xml

    r25501 r26174  
    1 <?xml version="1.0" encoding="UTF-8"?>
     1<?xml version="1.0" encoding="utf-8"?>
    22<!--
    33** This is the build file for the junctionchecking plugin
     
    2626-->
    2727<project name="junctionchecking" default="dist" basedir=".">
    28 
    29         <property name="commit.message" value="Changed the constructor signature of the plugin main class" />
    30         <property name="plugin.main.version" value="3751" />
    31 
    32         <property name="josm" location="../../core/dist/josm-custom.jar" />
    33         <property name="plugin.build.dir" value="build" />
    34         <property name="plugin.src.dir" value="src" />
    35         <!-- this is the directory where the plugin jar is copied to -->
    36         <property name="plugin.dist.dir" value="../../dist" />
    37         <property name="ant.build.javac.target" value="1.5" />
    38         <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar" />
    39 
    40         <!--
     28    <property name="commit.message" value="Changed the constructor signature of the plugin main class"/>
     29    <property name="plugin.main.version" value="3751"/>
     30    <property name="josm" location="../../core/dist/josm-custom.jar"/>
     31    <property name="plugin.build.dir" value="build"/>
     32    <property name="plugin.src.dir" value="src"/>
     33    <!-- this is the directory where the plugin jar is copied to -->
     34    <property name="plugin.dist.dir" value="../../dist"/>
     35    <property name="ant.build.javac.target" value="1.5"/>
     36    <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/>
     37    <!--
    4138    **********************************************************
    4239    ** init - initializes the build
    4340    **********************************************************
    4441    -->
    45         <target name="init">
    46                 <mkdir dir="${plugin.build.dir}" />
    47         </target>
    48 
    49         <!--
     42    <target name="init">
     43        <mkdir dir="${plugin.build.dir}"/>
     44    </target>
     45    <!--
    5046    **********************************************************
    5147    ** compile - complies the source tree
    5248    **********************************************************
    5349    -->
    54         <target name="compile" depends="init">
    55                 <echo message="compiling sources for  ${plugin.jar} ... " />
    56                 <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}">
    57                         <compilerarg value="-Xlint:deprecation" />
    58                         <compilerarg value="-Xlint:unchecked" />
    59                 </javac>
    60         </target>
    61 
    62         <!--
     50    <target name="compile" depends="init">
     51        <echo message="compiling sources for  ${plugin.jar} ... "/>
     52        <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}">
     53            <compilerarg value="-Xlint:deprecation"/>
     54            <compilerarg value="-Xlint:unchecked"/>
     55        </javac>
     56    </target>
     57    <!--
    6358    **********************************************************
    6459    ** dist - creates the plugin jar
    6560    **********************************************************
    6661    -->
    67         <!-- <target name="dist" depends="compile,revision">
    68     -->
    69         <target name="dist" depends="compile, revision">
    70                 <echo message="creating ${plugin.jar} ... " />
    71                 <copy todir="${plugin.build.dir}/resources">
    72                         <fileset dir="resources" />
    73                 </copy>
    74                 <copy todir="${plugin.build.dir}/images">
    75                         <fileset dir="images" />
    76                 </copy>
    77                 <copy todir="${plugin.build.dir}">
    78                         <fileset dir=".">
    79                                 <include name="LICENSE" />
    80                                 <include name="README" />
    81                         </fileset>
    82                 </copy>
    83                 <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
    84                         <manifest>
    85                                 <attribute name="Author" value="Jörg Possin" />
    86                                 <attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.JunctionChecker.JunctionCheckerPlugin" />
    87                                 <attribute name="Plugin-Date" value="${version.entry.commit.date}" />
    88                                 <attribute name="Plugin-Description" value="creates a channel digraph and checks a subset of channels if it is a junction or searches in a subset of channels for junctions" />
    89                                 <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/index.php/JOSM/Plugins/JunctionChecking" />
    90                                 <attribute name="Plugin-Mainversion" value="${plugin.main.version}" />
    91                                 <attribute name="Plugin-Version" value="${version.entry.commit.revision}" />
    92                                 <attribute name="Plugin-Icon" value="images/dialogs/junctionchecker.png" />
    93                                 <attribute name="Class-Path" value="resources/" />
    94                                 <attribute name="Main-Class" value="org.openstreetmap.josm.plugins.JunctionChecker.commandlineinterface.CLI" />
    95                         </manifest>
    96                 </jar>
    97         </target>
    98 
    99         <!--
     62    <!-- <target name="dist" depends="compile,revision">
     63    -->
     64    <target name="dist" depends="compile, revision">
     65        <echo message="creating ${plugin.jar} ... "/>
     66        <copy todir="${plugin.build.dir}/resources">
     67            <fileset dir="resources"/>
     68        </copy>
     69        <copy todir="${plugin.build.dir}/images">
     70            <fileset dir="images"/>
     71        </copy>
     72        <copy todir="${plugin.build.dir}/data">
     73            <fileset dir="data"/>
     74        </copy>
     75        <copy todir="${plugin.build.dir}">
     76            <fileset dir=".">
     77                <include name="LICENSE"/>
     78                <include name="README"/>
     79            </fileset>
     80        </copy>
     81        <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
     82            <manifest>
     83                <attribute name="Author" value="Jörg Possin"/>
     84                <attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.JunctionChecker.JunctionCheckerPlugin"/>
     85                <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
     86                <attribute name="Plugin-Description" value="creates a channel digraph and checks a subset of channels if it is a junction or searches in a subset of channels for junctions"/>
     87                <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/index.php/JOSM/Plugins/JunctionChecking"/>
     88                <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
     89                <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
     90                <attribute name="Plugin-Icon" value="images/dialogs/junctionchecker.png"/>
     91                <attribute name="Class-Path" value="resources/"/>
     92                <attribute name="Main-Class" value="org.openstreetmap.josm.plugins.JunctionChecker.commandlineinterface.CLI"/>
     93            </manifest>
     94        </jar>
     95    </target>
     96    <!--
    10097    **********************************************************
    10198    ** revision - extracts the current revision number for the
     
    104101    **********************************************************
    105102    -->
    106          <target name="revision">
    107 
     103    <target name="revision">
    108104        <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
    109105            <env key="LANG" value="C"/>
     
    115111        <delete file="REVISION"/>
    116112    </target>
    117 
    118         <!--
     113    <!--
    119114    **********************************************************
    120115    ** clean - clean up the build environment
    121116    **********************************************************
    122117    -->
    123         <target name="clean">
    124         <delete dir="${plugin.build.dir}"/>
    125                 <delete file="${plugin.jar}" />
    126         </target>
    127 
    128         <!--
     118    <target name="clean">
     119        <delete dir="${plugin.build.dir}"/>
     120        <delete file="${plugin.jar}"/>
     121    </target>
     122    <!--
    129123    **********************************************************
    130124    ** install - install the plugin in your local JOSM installation
    131125    **********************************************************
    132126    -->
    133         <target name="install" depends="dist">
    134                 <property environment="env" />
    135                 <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
    136                         <and>
    137                                 <os family="windows" />
    138                         </and>
    139                 </condition>
    140                 <copy file="${plugin.jar}" todir="${josm.plugins.dir}" />
    141         </target>
    142 
    143 
    144         <!--
    145                  ************************** Publishing the plugin ***********************************
    146                 -->
    147         <!--
    148                 ** extracts the JOSM release for the JOSM version in ../core and saves it in the
    149                 ** property ${coreversion.info.entry.revision}
    150                 **
    151                 -->
    152         <target name="core-info">
    153                 <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
    154                         <env key="LANG" value="C" />
    155                         <arg value="info" />
    156                         <arg value="--xml" />
    157                         <arg value="../../core" />
    158                 </exec>
    159                 <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true" />
    160                 <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
    161                 <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
    162                 <delete file="core.info.xml" />
    163         </target>
    164 
    165         <!--
    166                 ** commits the source tree for this plugin
    167                 -->
    168         <target name="commit-current">
    169                 <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
    170                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    171                         <env key="LANG" value="C" />
    172                         <arg value="commit" />
    173                         <arg value="-m '${commit.message}'" />
    174                         <arg value="." />
    175                 </exec>
    176         </target>
    177 
    178         <!--
    179                 ** updates (svn up) the source tree for this plugin
    180                 -->
    181         <target name="update-current">
    182                 <echo>Updating plugin source ...</echo>
    183                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    184                         <env key="LANG" value="C" />
    185                         <arg value="up" />
    186                         <arg value="." />
    187                 </exec>
    188                 <echo>Updating ${plugin.jar} ...</echo>
    189                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    190                         <env key="LANG" value="C" />
    191                         <arg value="up" />
    192                         <arg value="../dist/${plugin.jar}" />
    193                 </exec>
    194         </target>
    195 
    196         <!--
    197                 ** commits the plugin.jar
    198                 -->
    199         <target name="commit-dist">
    200                 <echo>
    201         ***** Properties of published ${plugin.jar} *****
    202         Commit message    : '${commit.message}'                                 
    203         Plugin-Mainversion: ${plugin.main.version}
    204         JOSM build version: ${coreversion.info.entry.revision}
    205         Plugin-Version    : ${version.entry.commit.revision}
    206         ***** / Properties of published ${plugin.jar} *****                                     
    207                                                
    208         Now commiting ${plugin.jar} ...
    209         </echo>
    210                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    211                         <env key="LANG" value="C" />
    212                         <arg value="-m '${commit.message}'" />
    213                         <arg value="commit" />
    214                         <arg value="${plugin.jar}" />
    215                 </exec>
    216         </target>
    217 
    218         <!-- ** make sure svn is present as a command line tool ** -->
    219         <target name="ensure-svn-present">
    220                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
    221                         <env key="LANG" value="C" />
    222                         <arg value="--version" />
    223                 </exec>
    224                 <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
    225                         <!-- return code not set at all? Most likely svn isn't installed -->
    226                         <condition>
    227                                 <not>
    228                                         <isset property="svn.exit.code" />
    229                                 </not>
    230                         </condition>
    231                 </fail>
    232                 <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
    233                         <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
    234                         <condition>
    235                                 <isfailure code="${svn.exit.code}" />
    236                         </condition>
    237                 </fail>
    238         </target>
    239 
    240         <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
    241         </target>
     127    <target name="install" depends="dist">
     128        <property environment="env"/>
     129        <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
     130            <and>
     131                <os family="windows"/>
     132            </and>
     133        </condition>
     134        <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
     135    </target>
     136    <!--
     137         ************************** Publishing the plugin ***********************************
     138        -->
     139    <!--
     140        ** extracts the JOSM release for the JOSM version in ../core and saves it in the
     141        ** property ${coreversion.info.entry.revision}
     142        **
     143        -->
     144    <target name="core-info">
     145        <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
     146            <env key="LANG" value="C"/>
     147            <arg value="info"/>
     148            <arg value="--xml"/>
     149            <arg value="../../core"/>
     150        </exec>
     151        <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
     152        <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
     153        <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
     154        <delete file="core.info.xml"/>
     155    </target>
     156    <!--
     157        ** commits the source tree for this plugin
     158        -->
     159    <target name="commit-current">
     160        <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
     161        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     162            <env key="LANG" value="C"/>
     163            <arg value="commit"/>
     164            <arg value="-m '${commit.message}'"/>
     165            <arg value="."/>
     166        </exec>
     167    </target>
     168    <!--
     169        ** updates (svn up) the source tree for this plugin
     170        -->
     171    <target name="update-current">
     172        <echo>Updating plugin source ...</echo>
     173        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     174            <env key="LANG" value="C"/>
     175            <arg value="up"/>
     176            <arg value="."/>
     177        </exec>
     178        <echo>Updating ${plugin.jar} ...</echo>
     179        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     180            <env key="LANG" value="C"/>
     181            <arg value="up"/>
     182            <arg value="../dist/${plugin.jar}"/>
     183        </exec>
     184    </target>
     185    <!--
     186        ** commits the plugin.jar
     187        -->
     188    <target name="commit-dist">
     189        <echo>
     190    ***** Properties of published ${plugin.jar} *****
     191    Commit message    : '${commit.message}'                 
     192    Plugin-Mainversion: ${plugin.main.version}
     193    JOSM build version: ${coreversion.info.entry.revision}
     194    Plugin-Version    : ${version.entry.commit.revision}
     195    ***** / Properties of published ${plugin.jar} *****                 
     196                       
     197    Now commiting ${plugin.jar} ...
     198    </echo>
     199        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     200            <env key="LANG" value="C"/>
     201            <arg value="-m '${commit.message}'"/>
     202            <arg value="commit"/>
     203            <arg value="${plugin.jar}"/>
     204        </exec>
     205    </target>
     206    <!-- ** make sure svn is present as a command line tool ** -->
     207    <target name="ensure-svn-present">
     208        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
     209            <env key="LANG" value="C"/>
     210            <arg value="--version"/>
     211        </exec>
     212        <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
     213            <!-- return code not set at all? Most likely svn isn't installed -->
     214            <condition>
     215                <not>
     216                    <isset property="svn.exit.code"/>
     217                </not>
     218            </condition>
     219        </fail>
     220        <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
     221            <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
     222            <condition>
     223                <isfailure code="${svn.exit.code}"/>
     224            </condition>
     225        </fail>
     226    </target>
     227    <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
     228    </target>
    242229</project>
  • applications/editors/josm/plugins/lakewalker/build.xml

    r25192 r26174  
    1 <?xml version="1.0" encoding="UTF-8"?>
     1<?xml version="1.0" encoding="utf-8"?>
    22<!--
    33** This is the build file for the lakewalker plugin
     
    2626-->
    2727<project name="lakewalker" default="dist" basedir=".">
    28 
    29         <property name="commit.message" value="Changed the constructor signature of the plugin main class" />
    30         <property name="plugin.main.version" value="3835" />
    31 
    32         <property name="josm"                   location="../../core/dist/josm-custom.jar"/>
    33         <property name="plugin.dist.dir"        value="../../dist"/>
    34         <property name="plugin.build.dir"       value="build"/>
    35         <property name="plugin.jar"             value="${plugin.dist.dir}/${ant.project.name}.jar"/>
    36         <property name="ant.build.javac.target" value="1.5"/>
    37         <target name="init">
    38                 <mkdir dir="${plugin.build.dir}"/>
    39         </target>
    40         <target name="compile" depends="init">
    41                 <echo message="creating ${plugin.jar}"/>
    42                 <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}">
    43                         <compilerarg value="-Xlint:deprecation"/>
    44                         <compilerarg value="-Xlint:unchecked"/>
    45                 </javac>
    46         </target>
    47         <target name="dist" depends="compile,revision">
    48                 <copy todir="${plugin.build.dir}/images">
    49                         <fileset dir="images"/>
    50                 </copy>
    51                 <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
    52                         <manifest>
    53                                 <attribute name="Author" value="Brent Easton, Jason Reid"/>
    54                                 <attribute name="Main-Class" value="org.openstreetmap.josm.plugins.lakewalker.LakewalkerApp"/>
    55                                 <attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.lakewalker.LakewalkerPlugin" />
    56                                 <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
    57                                 <attribute name="Plugin-Description" value="Helps vectorizing WMS images." />
    58                                 <attribute name="Plugin-Icon" value="images/lakewalker-sml.png"/>
    59                                 <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
    60                                 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
    61                         </manifest>
    62                 </jar>
    63         </target>
    64         <target name="revision">
    65                 <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
    66                         <env key="LANG" value="C"/>
    67                         <arg value="info"/>
    68                         <arg value="--xml"/>
    69                         <arg value="."/>
    70                 </exec>
    71                 <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
    72                 <delete file="REVISION"/>
    73         </target>
    74         <target name="clean">
    75                 <delete dir="${plugin.build.dir}"/>
    76                 <delete file="${plugin.jar}"/>
    77         </target>
    78         <target name="install" depends="dist">
    79                 <property environment="env"/>
    80                 <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
    81                         <and>
    82                                 <os family="windows"/>
    83                         </and>
    84                 </condition>
    85                 <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
    86         </target>
    87 
    88         <!--
    89                  ************************** Publishing the plugin ***********************************
    90                 -->
    91         <!--
    92                 ** extracts the JOSM release for the JOSM version in ../core and saves it in the
    93                 ** property ${coreversion.info.entry.revision}
    94                 **
    95                 -->
    96         <target name="core-info">
    97                 <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
    98                         <env key="LANG" value="C"/>
    99                         <arg value="info"/>
    100                         <arg value="--xml"/>
    101                         <arg value="../../core"/>
    102                 </exec>
    103                 <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
    104                 <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
    105                 <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
    106                 <delete file="core.info.xml" />
    107         </target>
    108 
    109         <!--
    110                 ** commits the source tree for this plugin
    111                 -->
    112         <target name="commit-current">
    113                 <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
    114                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    115                         <env key="LANG" value="C"/>
    116                         <arg value="commit"/>
    117                         <arg value="-m '${commit.message}'"/>
    118                         <arg value="."/>
    119                 </exec>
    120         </target>
    121 
    122         <!--
    123                 ** updates (svn up) the source tree for this plugin
    124                 -->
    125         <target name="update-current">
    126                 <echo>Updating plugin source ...</echo>
    127                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    128                         <env key="LANG" value="C"/>
    129                         <arg value="up"/>
    130                         <arg value="."/>
    131                 </exec>
    132                 <echo>Updating ${plugin.jar} ...</echo>
    133                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    134                         <env key="LANG" value="C"/>
    135                         <arg value="up"/>
    136                         <arg value="../dist/${plugin.jar}"/>
    137                 </exec>
    138         </target>
    139 
    140         <!--
    141                 ** commits the plugin.jar
    142                 -->
    143         <target name="commit-dist">
    144                 <echo>
    145         ***** Properties of published ${plugin.jar} *****
    146         Commit message    : '${commit.message}'                                 
    147         Plugin-Mainversion: ${plugin.main.version}
    148         JOSM build version: ${coreversion.info.entry.revision}
    149         Plugin-Version    : ${version.entry.commit.revision}
    150         ***** / Properties of published ${plugin.jar} *****                                     
    151                                                
    152         Now commiting ${plugin.jar} ...
    153         </echo>
    154                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    155                         <env key="LANG" value="C"/>
    156                         <arg value="-m '${commit.message}'"/>
    157                         <arg value="commit"/>
    158                         <arg value="${plugin.jar}"/>
    159                 </exec>
    160         </target>
    161 
    162         <!-- ** make sure svn is present as a command line tool ** -->
    163         <target name="ensure-svn-present">
    164                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
    165                         <env key="LANG" value="C" />
    166                         <arg value="--version" />
    167                 </exec>
    168                 <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
    169                         <!-- return code not set at all? Most likely svn isn't installed -->
    170                         <condition>
    171                                 <not>
    172                                         <isset property="svn.exit.code" />
    173                                 </not>
    174                         </condition>
    175                 </fail>
    176                 <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
    177                         <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
    178                         <condition>
    179                                 <isfailure code="${svn.exit.code}" />
    180                         </condition>
    181                 </fail>
    182         </target>
    183 
    184         <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
    185         </target>
     28    <property name="commit.message" value="Changed the constructor signature of the plugin main class"/>
     29    <property name="plugin.main.version" value="3835"/>
     30    <property name="josm" location="../../core/dist/josm-custom.jar"/>
     31    <property name="plugin.dist.dir" value="../../dist"/>
     32    <property name="plugin.build.dir" value="build"/>
     33    <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/>
     34    <property name="ant.build.javac.target" value="1.5"/>
     35    <target name="init">
     36        <mkdir dir="${plugin.build.dir}"/>
     37    </target>
     38    <target name="compile" depends="init">
     39        <echo message="creating ${plugin.jar}"/>
     40        <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}">
     41            <compilerarg value="-Xlint:deprecation"/>
     42            <compilerarg value="-Xlint:unchecked"/>
     43        </javac>
     44    </target>
     45    <target name="dist" depends="compile,revision">
     46        <copy todir="${plugin.build.dir}/images">
     47            <fileset dir="images"/>
     48        </copy>
     49        <copy todir="${plugin.build.dir}/data">
     50            <fileset dir="data"/>
     51        </copy>
     52        <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
     53            <manifest>
     54                <attribute name="Author" value="Brent Easton, Jason Reid"/>
     55                <attribute name="Main-Class" value="org.openstreetmap.josm.plugins.lakewalker.LakewalkerApp"/>
     56                <attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.lakewalker.LakewalkerPlugin"/>
     57                <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
     58                <attribute name="Plugin-Description" value="Helps vectorizing WMS images."/>
     59                <attribute name="Plugin-Icon" value="images/lakewalker-sml.png"/>
     60                <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
     61                <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
     62            </manifest>
     63        </jar>
     64    </target>
     65    <target name="revision">
     66        <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
     67            <env key="LANG" value="C"/>
     68            <arg value="info"/>
     69            <arg value="--xml"/>
     70            <arg value="."/>
     71        </exec>
     72        <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
     73        <delete file="REVISION"/>
     74    </target>
     75    <target name="clean">
     76        <delete dir="${plugin.build.dir}"/>
     77        <delete file="${plugin.jar}"/>
     78    </target>
     79    <target name="install" depends="dist">
     80        <property environment="env"/>
     81        <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
     82            <and>
     83                <os family="windows"/>
     84            </and>
     85        </condition>
     86        <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
     87    </target>
     88    <!--
     89         ************************** Publishing the plugin ***********************************
     90        -->
     91    <!--
     92        ** extracts the JOSM release for the JOSM version in ../core and saves it in the
     93        ** property ${coreversion.info.entry.revision}
     94        **
     95        -->
     96    <target name="core-info">
     97        <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
     98            <env key="LANG" value="C"/>
     99            <arg value="info"/>
     100            <arg value="--xml"/>
     101            <arg value="../../core"/>
     102        </exec>
     103        <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
     104        <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
     105        <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
     106        <delete file="core.info.xml"/>
     107    </target>
     108    <!--
     109        ** commits the source tree for this plugin
     110        -->
     111    <target name="commit-current">
     112        <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
     113        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     114            <env key="LANG" value="C"/>
     115            <arg value="commit"/>
     116            <arg value="-m '${commit.message}'"/>
     117            <arg value="."/>
     118        </exec>
     119    </target>
     120    <!--
     121        ** updates (svn up) the source tree for this plugin
     122        -->
     123    <target name="update-current">
     124        <echo>Updating plugin source ...</echo>
     125        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     126            <env key="LANG" value="C"/>
     127            <arg value="up"/>
     128            <arg value="."/>
     129        </exec>
     130        <echo>Updating ${plugin.jar} ...</echo>
     131        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     132            <env key="LANG" value="C"/>
     133            <arg value="up"/>
     134            <arg value="../dist/${plugin.jar}"/>
     135        </exec>
     136    </target>
     137    <!--
     138        ** commits the plugin.jar
     139        -->
     140    <target name="commit-dist">
     141        <echo>
     142    ***** Properties of published ${plugin.jar} *****
     143    Commit message    : '${commit.message}'                 
     144    Plugin-Mainversion: ${plugin.main.version}
     145    JOSM build version: ${coreversion.info.entry.revision}
     146    Plugin-Version    : ${version.entry.commit.revision}
     147    ***** / Properties of published ${plugin.jar} *****                 
     148                       
     149    Now commiting ${plugin.jar} ...
     150    </echo>
     151        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     152            <env key="LANG" value="C"/>
     153            <arg value="-m '${commit.message}'"/>
     154            <arg value="commit"/>
     155            <arg value="${plugin.jar}"/>
     156        </exec>
     157    </target>
     158    <!-- ** make sure svn is present as a command line tool ** -->
     159    <target name="ensure-svn-present">
     160        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
     161            <env key="LANG" value="C"/>
     162            <arg value="--version"/>
     163        </exec>
     164        <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
     165            <!-- return code not set at all? Most likely svn isn't installed -->
     166            <condition>
     167                <not>
     168                    <isset property="svn.exit.code"/>
     169                </not>
     170            </condition>
     171        </fail>
     172        <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
     173            <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
     174            <condition>
     175                <isfailure code="${svn.exit.code}"/>
     176            </condition>
     177        </fail>
     178    </target>
     179    <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
     180    </target>
    186181</project>
  • applications/editors/josm/plugins/licensechange/build.xml

    r25955 r26174  
    1 remove this line if you want to build the plugin
    2 <?xml version="1.0" encoding="UTF-8"?>
     1<?xml version="1.0" encoding="utf-8"?>
    32<!--
    43** This is the build.xml for the licensechange plugin
     
    2322-->
    2423<project name="licensechange" default="dist" basedir=".">
    25 
    26         <!--
    27           ** update before publishing
    28         -->
    29         <property name="commit.message" value="" />
    30         <property name="plugin.main.version" value="4076" />
    31 
    32 
    33         <property name="josm"                   location="../../core/dist/josm-custom.jar"/>
    34         <property name="plugin.dist.dir"        value="../../dist"/>
    35         <property name="plugin.build.dir"       value="build"/>
    36         <property name="plugin.jar"             value="${plugin.dist.dir}/${ant.project.name}.jar"/>
    37         <property name="ant.build.javac.target" value="1.5"/>
    38         <target name="init">
    39                 <mkdir dir="${plugin.build.dir}"/>
    40         </target>
    41         <target name="compile" depends="init">
    42                 <echo message="creating ${plugin.jar}"/>
    43                 <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}">
    44                         <compilerarg value="-Xlint:deprecation"/>
    45                         <compilerarg value="-Xlint:unchecked"/>
    46                 </javac>
    47         </target>
    48         <target name="dist" depends="compile,revision">
    49                 <copy todir="${plugin.build.dir}/images">
    50                         <fileset dir="images"/>
    51                 </copy>
    52                 <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
    53                         <manifest>
    54                                 <attribute name="Author" value="Frederik Ramm"/>
    55                                 <attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.licensechange.LicenseChangePlugin"/>
    56                                 <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
    57                                 <attribute name="Plugin-Description" value="Checks if all users contributing to an object have agreed to the license change." />
    58                                 <attribute name="Plugin-Icon" value="images/licensechange.png"/>
    59                                 <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/index.php/JOSM/Plugins/LicenseChange"/>
    60                                 <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
    61                                 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
    62                         </manifest>
    63                 </jar>
    64         </target>
    65         <target name="revision">
    66                 <exec append="false" error="/dev/null" output="REVISION" executable="svn" failifexecutionfails="false">
    67                         <env key="LANG" value="C"/>
    68                         <arg value="info"/>
    69                         <arg value="--xml"/>
    70                         <arg value="."/>
    71                 </exec>
    72                 <!--<xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>-->
    73                 <delete file="REVISION"/>
    74         </target>
    75         <target name="clean">
    76                 <delete dir="${plugin.build.dir}"/>
    77                 <delete file="${plugin.jar}"/>
    78         </target>
    79         <target name="install" depends="dist">
    80                 <property environment="env"/>
    81                 <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
    82                         <and>
    83                                 <os family="windows"/>
    84                         </and>
    85                 </condition>
    86                 <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
    87         </target>
    88 
    89         <!--
    90          ************************** Publishing the plugin ***********************************
    91         -->
    92         <!--
    93         ** extracts the JOSM release for the JOSM version in ../core and saves it in the
    94         ** property ${coreversion.info.entry.revision}
    95         **
    96         -->
    97         <target name="core-info">
    98                 <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
    99                         <env key="LANG" value="C"/>
    100                         <arg value="info"/>
    101                         <arg value="--xml"/>
    102                         <arg value="../../core"/>
    103                 </exec>
    104                 <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
    105                 <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
    106                 <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
    107                 <delete file="core.info.xml" />
    108         </target>
    109 
    110         <!--
    111         ** commits the source tree for this plugin
    112         -->
    113         <target name="commit-current">
    114                 <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
    115                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    116                         <env key="LANG" value="C"/>
    117                         <arg value="-m '${commit.message}'"/>
    118                         <arg value="commit"/>
    119                         <arg value="."/>
    120                 </exec>
    121         </target>
    122 
    123         <!--
    124         ** updates (svn up) the source tree for this plugin
    125         -->
    126         <target name="update-current">
    127                 <echo>Updating plugin source ...</echo>
    128                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    129                         <env key="LANG" value="C"/>
    130                         <arg value="up"/>
    131                         <arg value="."/>
    132                 </exec>
    133                 <echo>Updating ${plugin.jar} ...</echo>
    134                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    135                         <env key="LANG" value="C"/>
    136                         <arg value="up"/>
    137                         <arg value="../dist/${plugin.jar}"/>
    138                 </exec>
    139         </target>
    140 
    141         <!--
    142         ** commits the plugin.jar
    143         -->
    144         <target name="commit-dist">
    145                 <echo>
     24    <!--
     25      ** update before publishing
     26    -->
     27    <property name="commit.message" value=""/>
     28    <property name="plugin.main.version" value="4076"/>
     29    <property name="josm" location="../../core/dist/josm-custom.jar"/>
     30    <property name="plugin.dist.dir" value="../../dist"/>
     31    <property name="plugin.build.dir" value="build"/>
     32    <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/>
     33    <property name="ant.build.javac.target" value="1.5"/>
     34    <target name="init">
     35        <mkdir dir="${plugin.build.dir}"/>
     36    </target>
     37    <target name="compile" depends="init">
     38        <echo message="creating ${plugin.jar}"/>
     39        <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}">
     40            <compilerarg value="-Xlint:deprecation"/>
     41            <compilerarg value="-Xlint:unchecked"/>
     42        </javac>
     43    </target>
     44    <target name="dist" depends="compile,revision">
     45        <copy todir="${plugin.build.dir}/images">
     46            <fileset dir="images"/>
     47        </copy>
     48        <copy todir="${plugin.build.dir}/data">
     49            <fileset dir="data"/>
     50        </copy>
     51        <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
     52            <manifest>
     53                <attribute name="Author" value="Frederik Ramm"/>
     54                <attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.licensechange.LicenseChangePlugin"/>
     55                <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
     56                <attribute name="Plugin-Description" value="Checks if all users contributing to an object have agreed to the license change."/>
     57                <attribute name="Plugin-Icon" value="images/licensechange.png"/>
     58                <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/index.php/JOSM/Plugins/LicenseChange"/>
     59                <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
     60                <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
     61            </manifest>
     62        </jar>
     63    </target>
     64    <target name="revision">
     65        <exec append="false" error="/dev/null" output="REVISION" executable="svn" failifexecutionfails="false">
     66            <env key="LANG" value="C"/>
     67            <arg value="info"/>
     68            <arg value="--xml"/>
     69            <arg value="."/>
     70        </exec>
     71        <!--<xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>-->
     72        <delete file="REVISION"/>
     73    </target>
     74    <target name="clean">
     75        <delete dir="${plugin.build.dir}"/>
     76        <delete file="${plugin.jar}"/>
     77    </target>
     78    <target name="install" depends="dist">
     79        <property environment="env"/>
     80        <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
     81            <and>
     82                <os family="windows"/>
     83            </and>
     84        </condition>
     85        <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
     86    </target>
     87    <!--
     88     ************************** Publishing the plugin ***********************************
     89    -->
     90    <!--
     91    ** extracts the JOSM release for the JOSM version in ../core and saves it in the
     92    ** property ${coreversion.info.entry.revision}
     93    **
     94    -->
     95    <target name="core-info">
     96        <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
     97            <env key="LANG" value="C"/>
     98            <arg value="info"/>
     99            <arg value="--xml"/>
     100            <arg value="../../core"/>
     101        </exec>
     102        <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
     103        <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
     104        <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
     105        <delete file="core.info.xml"/>
     106    </target>
     107    <!--
     108    ** commits the source tree for this plugin
     109    -->
     110    <target name="commit-current">
     111        <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
     112        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     113            <env key="LANG" value="C"/>
     114            <arg value="-m '${commit.message}'"/>
     115            <arg value="commit"/>
     116            <arg value="."/>
     117        </exec>
     118    </target>
     119    <!--
     120    ** updates (svn up) the source tree for this plugin
     121    -->
     122    <target name="update-current">
     123        <echo>Updating plugin source ...</echo>
     124        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     125            <env key="LANG" value="C"/>
     126            <arg value="up"/>
     127            <arg value="."/>
     128        </exec>
     129        <echo>Updating ${plugin.jar} ...</echo>
     130        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     131            <env key="LANG" value="C"/>
     132            <arg value="up"/>
     133            <arg value="../dist/${plugin.jar}"/>
     134        </exec>
     135    </target>
     136    <!--
     137    ** commits the plugin.jar
     138    -->
     139    <target name="commit-dist">
     140        <echo>
    146141***** Properties of published ${plugin.jar} *****
    147142Commit message    : '${commit.message}'
     
    153148Now commiting ${plugin.jar} ...
    154149</echo>
    155                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    156                         <env key="LANG" value="C"/>
    157                         <arg value="-m '${commit.message}'"/>
    158                         <arg value="commit"/>
    159                         <arg value="${plugin.jar}"/>
    160                 </exec>
    161         </target>
    162 
    163         <!-- ** make sure svn is present as a command line tool ** -->
    164         <target name="ensure-svn-present">
    165                 <exec append="true" output="svn.log" executable="svn" failonerror="false" resultproperty="svn.exit.code">
    166                         <env key="LANG" value="C" />
    167                         <arg value="--version" />
    168                 </exec>
    169                 <fail message="Fatal: command 'svn' not found. Please make sure svn is installed on your system.">
    170                         <condition>
    171                                 <isfailure code="${svn.exit.code}" />
    172                         </condition>
    173                 </fail>
    174         </target>
    175 
    176         <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
    177         </target>
     150        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     151            <env key="LANG" value="C"/>
     152            <arg value="-m '${commit.message}'"/>
     153            <arg value="commit"/>
     154            <arg value="${plugin.jar}"/>
     155        </exec>
     156    </target>
     157    <!-- ** make sure svn is present as a command line tool ** -->
     158    <target name="ensure-svn-present">
     159        <exec append="true" output="svn.log" executable="svn" failonerror="false" resultproperty="svn.exit.code">
     160            <env key="LANG" value="C"/>
     161            <arg value="--version"/>
     162        </exec>
     163        <fail message="Fatal: command 'svn' not found. Please make sure svn is installed on your system.">
     164            <condition>
     165                <isfailure code="${svn.exit.code}"/>
     166            </condition>
     167        </fail>
     168    </target>
     169    <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
     170    </target>
    178171</project>
  • applications/editors/josm/plugins/livegps/build.xml

    r25192 r26174  
    1 <?xml version="1.0" encoding="UTF-8"?>
     1<?xml version="1.0" encoding="utf-8"?>
    22<!--
    33** This is the build file for the livegps plugin
     
    2626-->
    2727<project name="livegps" default="dist" basedir=".">
     28    <property name="commit.message" value="Changed the constructor signature of the plugin main class"/>
     29    <property name="plugin.main.version" value="3835"/>
     30    <property name="josm" location="../../core/dist/josm-custom.jar"/>
     31    <property name="plugin.dist.dir" value="../../dist"/>
     32    <property name="plugin.build.dir" value="build"/>
     33    <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/>
     34    <property name="ant.build.javac.target" value="1.5"/>
     35    <target name="init">
     36        <mkdir dir="${plugin.build.dir}"/>
     37    </target>
     38    <target name="compile" depends="init">
     39        <echo message="creating ${plugin.jar}"/>
     40        <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}">
     41            <compilerarg value="-Xlint:deprecation"/>
     42            <compilerarg value="-Xlint:unchecked"/>
     43        </javac>
     44    </target>
     45    <target name="dist" depends="compile,revision">
     46        <copy todir="${plugin.build.dir}/images">
     47            <fileset dir="images"/>
     48        </copy>
     49        <copy todir="${plugin.build.dir}/data">
     50            <fileset dir="data"/>
     51        </copy>
     52        <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
     53            <manifest>
     54                <attribute name="Author" value="Frederik Ramm"/>
     55                <attribute name="Plugin-Class" value="livegps.LiveGpsPlugin"/>
     56                <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
     57                <attribute name="Plugin-Description" value="Support live GPS input (moving dot) through a connection to gpsd server."/>
     58                <attribute name="Plugin-Icon" value="images/dialogs/livegps.png"/>
     59                <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/index.php/JOSM/Plugins/LiveGPS"/>
     60                <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
     61                <attribute name="Plugin-Stage" value="50"/>
     62                <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
     63            </manifest>
     64        </jar>
     65    </target>
     66    <target name="revision">
     67        <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
     68            <env key="LANG" value="C"/>
     69            <arg value="info"/>
     70            <arg value="--xml"/>
     71            <arg value="."/>
     72        </exec>
     73        <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
     74        <delete file="REVISION"/>
     75    </target>
     76    <target name="clean">
     77        <delete dir="${plugin.build.dir}"/>
     78        <delete file="${plugin.jar}"/>
     79    </target>
     80    <target name="install" depends="dist">
     81        <property environment="env"/>
     82        <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
     83            <and>
     84                <os family="windows"/>
     85            </and>
     86        </condition>
     87        <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
     88    </target>
     89    <!--
     90         ************************** Publishing the plugin ***********************************
     91        -->
     92    <!--
     93        ** extracts the JOSM release for the JOSM version in ../core and saves it in the
     94        ** property ${coreversion.info.entry.revision}
     95        **
     96        -->
     97    <target name="core-info">
     98        <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
     99            <env key="LANG" value="C"/>
     100            <arg value="info"/>
     101            <arg value="--xml"/>
     102            <arg value="../../core"/>
     103        </exec>
     104        <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
     105        <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
     106        <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
     107        <delete file="core.info.xml"/>
     108    </target>
     109    <!--
     110        ** commits the source tree for this plugin
     111        -->
     112    <target name="commit-current">
     113        <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
     114        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     115            <env key="LANG" value="C"/>
     116            <arg value="commit"/>
     117            <arg value="-m '${commit.message}'"/>
     118            <arg value="."/>
     119        </exec>
     120    </target>
     121    <!--
     122        ** updates (svn up) the source tree for this plugin
     123        -->
     124    <target name="update-current">
     125        <echo>Updating plugin source ...</echo>
     126        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     127            <env key="LANG" value="C"/>
     128            <arg value="up"/>
     129            <arg value="."/>
     130        </exec>
     131        <echo>Updating ${plugin.jar} ...</echo>
     132        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     133            <env key="LANG" value="C"/>
     134            <arg value="up"/>
     135            <arg value="../dist/${plugin.jar}"/>
     136        </exec>
     137    </target>
     138    <!--
     139        ** commits the plugin.jar
     140        -->
     141    <target name="commit-dist">
     142        <echo>
     143    ***** Properties of published ${plugin.jar} *****
     144    Commit message    : '${commit.message}'
     145    Plugin-Mainversion: ${plugin.main.version}
     146    JOSM build version: ${coreversion.info.entry.revision}
     147    Plugin-Version    : ${version.entry.commit.revision}
     148    ***** / Properties of published ${plugin.jar} *****
    28149
    29         <property name="commit.message" value="Changed the constructor signature of the plugin main class" />
    30         <property name="plugin.main.version" value="3835" />
    31 
    32 
    33         <property name="josm"                   location="../../core/dist/josm-custom.jar"/>
    34         <property name="plugin.dist.dir"        value="../../dist"/>
    35         <property name="plugin.build.dir"       value="build"/>
    36         <property name="plugin.jar"             value="${plugin.dist.dir}/${ant.project.name}.jar"/>
    37         <property name="ant.build.javac.target" value="1.5"/>
    38         <target name="init">
    39                 <mkdir dir="${plugin.build.dir}"/>
    40         </target>
    41         <target name="compile" depends="init">
    42                 <echo message="creating ${plugin.jar}"/>
    43                 <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}">
    44                         <compilerarg value="-Xlint:deprecation"/>
    45                         <compilerarg value="-Xlint:unchecked"/>
    46                 </javac>
    47         </target>
    48         <target name="dist" depends="compile,revision">
    49                 <copy todir="${plugin.build.dir}/images">
    50                         <fileset dir="images"/>
    51                 </copy>
    52                 <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
    53                         <manifest>
    54                                 <attribute name="Author" value="Frederik Ramm"/>
    55                                 <attribute name="Plugin-Class" value="livegps.LiveGpsPlugin"/>
    56                                 <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
    57                                 <attribute name="Plugin-Description" value="Support live GPS input (moving dot) through a connection to gpsd server."/>
    58                                 <attribute name="Plugin-Icon" value="images/dialogs/livegps.png"/>
    59                                 <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/index.php/JOSM/Plugins/LiveGPS"/>
    60                                 <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
    61                                 <attribute name="Plugin-Stage" value="50"/>
    62                                 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
    63                         </manifest>
    64                 </jar>
    65         </target>
    66         <target name="revision">
    67                 <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
    68                         <env key="LANG" value="C"/>
    69                         <arg value="info"/>
    70                         <arg value="--xml"/>
    71                         <arg value="."/>
    72                 </exec>
    73                 <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
    74                 <delete file="REVISION"/>
    75         </target>
    76         <target name="clean">
    77                 <delete dir="${plugin.build.dir}"/>
    78                 <delete file="${plugin.jar}"/>
    79         </target>
    80         <target name="install" depends="dist">
    81                 <property environment="env"/>
    82                 <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
    83                         <and>
    84                                 <os family="windows"/>
    85                         </and>
    86                 </condition>
    87                 <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
    88         </target>
    89 
    90 
    91         <!--
    92                  ************************** Publishing the plugin ***********************************
    93                 -->
    94         <!--
    95                 ** extracts the JOSM release for the JOSM version in ../core and saves it in the
    96                 ** property ${coreversion.info.entry.revision}
    97                 **
    98                 -->
    99         <target name="core-info">
    100                 <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
    101                         <env key="LANG" value="C"/>
    102                         <arg value="info"/>
    103                         <arg value="--xml"/>
    104                         <arg value="../../core"/>
    105                 </exec>
    106                 <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
    107                 <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
    108                 <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
    109                 <delete file="core.info.xml" />
    110         </target>
    111 
    112         <!--
    113                 ** commits the source tree for this plugin
    114                 -->
    115         <target name="commit-current">
    116                 <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
    117                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    118                         <env key="LANG" value="C"/>
    119                         <arg value="commit"/>
    120                         <arg value="-m '${commit.message}'"/>
    121                         <arg value="."/>
    122                 </exec>
    123         </target>
    124 
    125         <!--
    126                 ** updates (svn up) the source tree for this plugin
    127                 -->
    128         <target name="update-current">
    129                 <echo>Updating plugin source ...</echo>
    130                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    131                         <env key="LANG" value="C"/>
    132                         <arg value="up"/>
    133                         <arg value="."/>
    134                 </exec>
    135                 <echo>Updating ${plugin.jar} ...</echo>
    136                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    137                         <env key="LANG" value="C"/>
    138                         <arg value="up"/>
    139                         <arg value="../dist/${plugin.jar}"/>
    140                 </exec>
    141         </target>
    142 
    143         <!--
    144                 ** commits the plugin.jar
    145                 -->
    146         <target name="commit-dist">
    147                 <echo>
    148         ***** Properties of published ${plugin.jar} *****
    149         Commit message    : '${commit.message}'
    150         Plugin-Mainversion: ${plugin.main.version}
    151         JOSM build version: ${coreversion.info.entry.revision}
    152         Plugin-Version    : ${version.entry.commit.revision}
    153         ***** / Properties of published ${plugin.jar} *****
    154 
    155         Now commiting ${plugin.jar} ...
    156         </echo>
    157                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    158                         <env key="LANG" value="C"/>
    159                         <arg value="-m '${commit.message}'"/>
    160                         <arg value="commit"/>
    161                         <arg value="${plugin.jar}"/>
    162                 </exec>
    163         </target>
    164 
    165         <!-- ** make sure svn is present as a command line tool ** -->
    166         <target name="ensure-svn-present">
    167                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
    168                         <env key="LANG" value="C" />
    169                         <arg value="--version" />
    170                 </exec>
    171                 <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
    172                         <!-- return code not set at all? Most likely svn isn't installed -->
    173                         <condition>
    174                                 <not>
    175                                         <isset property="svn.exit.code" />
    176                                 </not>
    177                         </condition>
    178                 </fail>
    179                 <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
    180                         <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
    181                         <condition>
    182                                 <isfailure code="${svn.exit.code}" />
    183                         </condition>
    184                 </fail>
    185         </target>
    186 
    187         <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
    188         </target>
     150    Now commiting ${plugin.jar} ...
     151    </echo>
     152        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     153            <env key="LANG" value="C"/>
     154            <arg value="-m '${commit.message}'"/>
     155            <arg value="commit"/>
     156            <arg value="${plugin.jar}"/>
     157        </exec>
     158    </target>
     159    <!-- ** make sure svn is present as a command line tool ** -->
     160    <target name="ensure-svn-present">
     161        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
     162            <env key="LANG" value="C"/>
     163            <arg value="--version"/>
     164        </exec>
     165        <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
     166            <!-- return code not set at all? Most likely svn isn't installed -->
     167            <condition>
     168                <not>
     169                    <isset property="svn.exit.code"/>
     170                </not>
     171            </condition>
     172        </fail>
     173        <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
     174            <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
     175            <condition>
     176                <isfailure code="${svn.exit.code}"/>
     177            </condition>
     178        </fail>
     179    </target>
     180    <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
     181    </target>
    189182</project>
  • applications/editors/josm/plugins/mapdust/build.xml

    r25199 r26174  
    1 <?xml version="1.0" encoding="UTF-8"?>
     1<?xml version="1.0" encoding="utf-8"?>
    22<project name="mapdust" default="dist" basedir=".">
    3 
    4         <!-- properties -->
    5         <property name="commit.message" value="MapDust bug reporter plugin" />
    6         <property name="plugin.main.version" value="3835" />
    7         <property name="josm" location="../../core/dist/josm-custom.jar"/>
    8         <property name="plugin.build.dir" value="build/classes" />
    9         <property name="apidoc.dir" value="build/doc" />
    10         <property name="plugin.src.dir" value="src" />
    11         <property name="plugin.lib.dir" value="lib" />
    12         <property name="plugin.dist.dir" value="../../dist" />
    13         <property name="ant.build.javac.target" value="1.5" />
    14         <property name="plugin.dist.dir" value="../../dist" />
    15         <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar" />
    16 
    17         <!-- classpath -->
    18         <path id="classpath">
    19                 <fileset dir="${plugin.lib.dir}" includes="**/*.jar" />
    20                 <pathelement path="${josm}"/>
    21         </path>
    22 
    23         <!-- clean the build -->
    24         <target name="clean">
    25                 <delete dir="${plugin.build.dir}" />
    26                 <delete file="${plugin.jar}" />
    27         </target>
    28 
    29         <!-- initialize the build -->
    30         <target name="init" depends="clean">
    31                 <mkdir dir="${plugin.build.dir}" />
    32         </target>
    33 
    34         <!-- compiles the sources -->
    35         <target name="compile" depends="init">
    36                 <echo message="compiling sources for  ${plugin.jar} ... " />
    37                 <javac srcdir="src" classpathref="classpath" debug="true"
    38                         destdir="${plugin.build.dir}" includeantruntime="true" target="1.5"
    39                         source="1.5">
    40                         <compilerarg value="-Xlint:deprecation" />
    41                         <compilerarg value="-Xlint:unchecked" />
    42                 </javac>
    43         </target>
    44 
    45         <!-- creates the javadocs -->
    46         <target name="javadoc">
    47                 <mkdir dir="${apidoc.dir}" />
    48                 <javadoc destdir="${apidoc.dir}" source="1.6" classpathref="classpath"
    49                         windowtitle="MapDust plugin API">
    50                         <link href="http://java.sun.com/javase/6/docs/api/" />
    51                         <link href="http://docs.jboss.org/hibernate/stable/core/api/" />
    52                         <packageset dir="${plugin.src.dir}">
    53                         </packageset>
    54                 </javadoc>
    55 
    56         </target>
    57 
    58         <!-- revision -->
    59         <target name="revision">
    60                 <exec append="false" output="REVISION" executable="svn"
    61                         failifexecutionfails="false">
    62                         <env key="LANG" value="C" />
    63                         <arg value="info" />
    64                         <arg value="--xml" />
    65                         <arg value="." />
    66                 </exec>
    67                 <xmlproperty file="REVISION" prefix="version" keepRoot="false"
    68                         collapseAttributes="true" />
    69                 <delete file="REVISION" />
    70         </target>
    71 
    72         <!-- creates the .jar file of the plugin -->
    73         <target name="dist" depends="compile,revision">
    74                 <echo message="creating ${ant.project.name}.jar ... " />
    75                 <copy todir="${plugin.build.dir}">
    76                         <fileset dir="conf" />
    77                 </copy>
    78                 <copy todir="${plugin.build.dir}/images">
    79                         <fileset dir="images" />
    80                 </copy>
    81                 <copy todir="${plugin.build.dir}">
    82                         <fileset dir=".">
    83                                 <include name="README" />
    84                                 <include name="LICENSE" />
    85                         </fileset>
    86                 </copy>
    87                 <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
    88                         <zipfileset src="lib/gson-1.5.jar" includes="**/*.class" />
    89                         <manifest>
    90                                 <attribute name="Author" value="Beata Jancso" />
    91                                 <attribute name="Plugin-Class"
    92                                         value="org.openstreetmap.josm.plugins.mapdust.MapdustPlugin" />
    93                                 <attribute name="Plugin-Date" value="${version.entry.commit.date}" />
    94                                 <attribute name="Plugin-Description"
    95                                         value="The MapDust Plug-In shows the MapDust bug reports on
    96                                         the map. You can create, close,invalidate, re-open and comment
    97                                         bug reports by using this plugin." />
    98                                 <attribute name="Plugin-Link"
    99                                         value="http://wiki.openstreetmap.org/wiki/JOSM/Plugins/MapDust" />
    100                                 <attribute name="Plugin-Mainversion"
    101                                         value="${plugin.main.version}" />
    102                                 <attribute name="Plugin-Version"
    103                                         value="${version.entry.commit.revision}" />
    104                                 <attribute name="Plugin-Icon"
    105                                         value="images/dialogs/mapdust_icon25.png" />
    106                         </manifest>
    107                 </jar>
    108         </target>
    109 
    110         <!-- installs the plugin  -->
    111         <target name="install" depends="dist">
    112                 <property environment="env" />
    113                 <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins"
    114                         else="${user.home}/.josm/plugins">
    115                         <and>
    116                                 <os family="windows" />
    117                         </and>
    118                 </condition>
    119                 <copy file="${plugin.jar}" todir="${josm.plugins.dir}" />
    120         </target>
    121 
    122         <!-- displays the information about the core josm -->
    123         <target name="core-info">
    124                 <exec append="false" output="core.info.xml" executable="svn"
    125                         failifexecutionfails="false">
    126                         <env key="LANG" value="C" />
    127                         <arg value="info" />
    128                         <arg value="--xml" />
    129                         <arg value="../../core" />
    130                 </exec>
    131                 <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true"
    132                         collapseAttributes="true" />
    133                 <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
    134                 <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
    135                 <delete file="core.info.xml" />
    136         </target>
    137 
    138         <!-- commits the current sources -->
    139         <target name="commit-current">
    140                 <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
    141                 <exec append="true" output="svn.log" executable="svn"
    142                         failifexecutionfails="false">
    143                         <env key="LANG" value="C" />
    144                         <arg value="commit" />
    145                         <arg value="-m '${commit.message}'" />
    146                         <arg value="." />
    147                 </exec>
    148         </target>
    149 
    150         <!-- updates the plugin -->
    151         <target name="update-current">
    152                 <echo>Updating plugin source ...</echo>
    153                 <exec append="true" output="svn.log" executable="svn"
    154                         failifexecutionfails="false">
    155                         <env key="LANG" value="C" />
    156                         <arg value="up" />
    157                         <arg value="." />
    158                 </exec>
    159                 <echo>Updating ${plugin.jar} ...</echo>
    160                 <exec append="true" output="svn.log" executable="svn"
    161                         failifexecutionfails="false">
    162                         <env key="LANG" value="C" />
    163                         <arg value="up" />
    164                         <arg value="../dist/${plugin.jar}" />
    165                 </exec>
    166         </target>
    167 
    168         <!-- commit the .jar of the plugin -->
    169         <target name="commit-dist">
    170                 <echo>
     3    <!-- properties -->
     4    <property name="commit.message" value="MapDust bug reporter plugin"/>
     5    <property name="plugin.main.version" value="3835"/>
     6    <property name="josm" location="../../core/dist/josm-custom.jar"/>
     7    <property name="plugin.build.dir" value="build/classes"/>
     8    <property name="apidoc.dir" value="build/doc"/>
     9    <property name="plugin.src.dir" value="src"/>
     10    <property name="plugin.lib.dir" value="lib"/>
     11    <property name="plugin.dist.dir" value="../../dist"/>
     12    <property name="ant.build.javac.target" value="1.5"/>
     13    <property name="plugin.dist.dir" value="../../dist"/>
     14    <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/>
     15    <!-- classpath -->
     16    <path id="classpath">
     17        <fileset dir="${plugin.lib.dir}" includes="**/*.jar"/>
     18        <pathelement path="${josm}"/>
     19    </path>
     20    <!-- clean the build -->
     21    <target name="clean">
     22        <delete dir="${plugin.build.dir}"/>
     23        <delete file="${plugin.jar}"/>
     24    </target>
     25    <!-- initialize the build -->
     26    <target name="init" depends="clean">
     27        <mkdir dir="${plugin.build.dir}"/>
     28    </target>
     29    <!-- compiles the sources -->
     30    <target name="compile" depends="init">
     31        <echo message="compiling sources for  ${plugin.jar} ... "/>
     32        <javac srcdir="src" classpathref="classpath" debug="true" destdir="${plugin.build.dir}" includeantruntime="true" target="1.5" source="1.5">
     33            <compilerarg value="-Xlint:deprecation"/>
     34            <compilerarg value="-Xlint:unchecked"/>
     35        </javac>
     36    </target>
     37    <!-- creates the javadocs -->
     38    <target name="javadoc">
     39        <mkdir dir="${apidoc.dir}"/>
     40        <javadoc destdir="${apidoc.dir}" source="1.6" classpathref="classpath" windowtitle="MapDust plugin API">
     41            <link href="http://java.sun.com/javase/6/docs/api/"/>
     42            <link href="http://docs.jboss.org/hibernate/stable/core/api/"/>
     43            <packageset dir="${plugin.src.dir}">
     44            </packageset>
     45        </javadoc>
     46    </target>
     47    <!-- revision -->
     48    <target name="revision">
     49        <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
     50            <env key="LANG" value="C"/>
     51            <arg value="info"/>
     52            <arg value="--xml"/>
     53            <arg value="."/>
     54        </exec>
     55        <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
     56        <delete file="REVISION"/>
     57    </target>
     58    <!-- creates the .jar file of the plugin -->
     59    <target name="dist" depends="compile,revision">
     60        <echo message="creating ${ant.project.name}.jar ... "/>
     61        <copy todir="${plugin.build.dir}">
     62            <fileset dir="conf"/>
     63        </copy>
     64        <copy todir="${plugin.build.dir}/images">
     65            <fileset dir="images"/>
     66        </copy>
     67        <copy todir="${plugin.build.dir}/data">
     68            <fileset dir="data"/>
     69        </copy>
     70        <copy todir="${plugin.build.dir}">
     71            <fileset dir=".">
     72                <include name="README"/>
     73                <include name="LICENSE"/>
     74            </fileset>
     75        </copy>
     76        <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
     77            <zipfileset src="lib/gson-1.5.jar" includes="**/*.class"/>
     78            <manifest>
     79                <attribute name="Author" value="Beata Jancso"/>
     80                <attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.mapdust.MapdustPlugin"/>
     81                <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
     82                <attribute name="Plugin-Description" value="The MapDust Plug-In shows the MapDust bug reports on       the map. You can create, close,invalidate, re-open and comment       bug reports by using this plugin."/>
     83                <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/wiki/JOSM/Plugins/MapDust"/>
     84                <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
     85                <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
     86                <attribute name="Plugin-Icon" value="images/dialogs/mapdust_icon25.png"/>
     87            </manifest>
     88        </jar>
     89    </target>
     90    <!-- installs the plugin  -->
     91    <target name="install" depends="dist">
     92        <property environment="env"/>
     93        <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
     94            <and>
     95                <os family="windows"/>
     96            </and>
     97        </condition>
     98        <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
     99    </target>
     100    <!-- displays the information about the core josm -->
     101    <target name="core-info">
     102        <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
     103            <env key="LANG" value="C"/>
     104            <arg value="info"/>
     105            <arg value="--xml"/>
     106            <arg value="../../core"/>
     107        </exec>
     108        <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
     109        <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
     110        <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
     111        <delete file="core.info.xml"/>
     112    </target>
     113    <!-- commits the current sources -->
     114    <target name="commit-current">
     115        <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
     116        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     117            <env key="LANG" value="C"/>
     118            <arg value="commit"/>
     119            <arg value="-m '${commit.message}'"/>
     120            <arg value="."/>
     121        </exec>
     122    </target>
     123    <!-- updates the plugin -->
     124    <target name="update-current">
     125        <echo>Updating plugin source ...</echo>
     126        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     127            <env key="LANG" value="C"/>
     128            <arg value="up"/>
     129            <arg value="."/>
     130        </exec>
     131        <echo>Updating ${plugin.jar} ...</echo>
     132        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     133            <env key="LANG" value="C"/>
     134            <arg value="up"/>
     135            <arg value="../dist/${plugin.jar}"/>
     136        </exec>
     137    </target>
     138    <!-- commit the .jar of the plugin -->
     139    <target name="commit-dist">
     140        <echo>
    171141    ***** Properties of published ${plugin.jar} *****
    172142    Commit message    : '${commit.message}'                   
     
    178148    Now commiting ${plugin.jar} ...
    179149    </echo>
    180                 <exec append="true" output="svn.log" executable="svn"
    181                         failifexecutionfails="false">
    182                         <env key="LANG" value="C" />
    183                         <arg value="-m '${commit.message}'" />
    184                         <arg value="commit" />
    185                         <arg value="${plugin.jar}" />
    186                 </exec>
    187         </target>
    188 
    189         <!-- ** make sure svn is present as a command line tool ** -->
    190         <target name="ensure-svn-present">
    191                 <exec append="true" output="svn.log" executable="svn"
    192                         failifexecutionfails="false" failonerror="false"
    193                         resultproperty="svn.exit.code">
    194                         <env key="LANG" value="C" />
    195                         <arg value="--version" />
    196                 </exec>
    197                 <fail message="Fatal: command 'svn --version' failed. Please make sure
    198                         svn is installed on your system.">
    199                         <!-- return code not set at all? Most likely svn isn't installed -->
    200                         <condition>
    201                                 <not>
    202                                         <isset property="svn.exit.code" />
    203                                 </not>
    204                         </condition>
    205                 </fail>
    206                 <fail message="Fatal: command 'svn --version' failed. Please make sure
    207                         a working copy of svn is installed on your system.">
    208                         <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
    209                         <condition>
    210                                 <isfailure code="${svn.exit.code}" />
    211                         </condition>
    212                 </fail>
    213         </target>
    214 
    215         <!-- publish the plugin -->
    216         <target name="publish" depends="ensure-svn-present,core-info,commit-current,
    217                 update-current,clean,dist,commit-dist">
    218         </target>
     150        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     151            <env key="LANG" value="C"/>
     152            <arg value="-m '${commit.message}'"/>
     153            <arg value="commit"/>
     154            <arg value="${plugin.jar}"/>
     155        </exec>
     156    </target>
     157    <!-- ** make sure svn is present as a command line tool ** -->
     158    <target name="ensure-svn-present">
     159        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
     160            <env key="LANG" value="C"/>
     161            <arg value="--version"/>
     162        </exec>
     163        <fail message="Fatal: command 'svn --version' failed. Please make sure     svn is installed on your system.">
     164            <!-- return code not set at all? Most likely svn isn't installed -->
     165            <condition>
     166                <not>
     167                    <isset property="svn.exit.code"/>
     168                </not>
     169            </condition>
     170        </fail>
     171        <fail message="Fatal: command 'svn --version' failed. Please make sure     a working copy of svn is installed on your system.">
     172            <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
     173            <condition>
     174                <isfailure code="${svn.exit.code}"/>
     175            </condition>
     176        </fail>
     177    </target>
     178    <!-- publish the plugin -->
     179    <target name="publish" depends="ensure-svn-present,core-info,commit-current,   update-current,clean,dist,commit-dist">
     180    </target>
    219181</project>
  • applications/editors/josm/plugins/measurement/build.xml

    r25199 r26174  
    1 <?xml version="1.0" encoding="UTF-8"?>
     1<?xml version="1.0" encoding="utf-8"?>
    22<!--
    33** This is the build file for the measurement plugin
     
    2626-->
    2727<project name="measurement" default="dist" basedir=".">
     28    <property name="commit.message" value="Changed the constructor signature of the plugin main class"/>
     29    <property name="plugin.main.version" value="3835"/>
     30    <property name="josm" location="../../core/dist/josm-custom.jar"/>
     31    <property name="plugin.dist.dir" value="../../dist"/>
     32    <property name="plugin.build.dir" value="build"/>
     33    <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/>
     34    <property name="ant.build.javac.target" value="1.5"/>
     35    <target name="init">
     36        <mkdir dir="${plugin.build.dir}"/>
     37    </target>
     38    <target name="compile" depends="init">
     39        <echo message="creating ${plugin.jar}"/>
     40        <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}">
     41            <compilerarg value="-Xlint:deprecation"/>
     42            <compilerarg value="-Xlint:unchecked"/>
     43        </javac>
     44    </target>
     45    <target name="dist" depends="compile,revision">
     46        <copy todir="${plugin.build.dir}/images">
     47            <fileset dir="images"/>
     48        </copy>
     49        <copy todir="${plugin.build.dir}/data">
     50            <fileset dir="data"/>
     51        </copy>
     52        <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
     53            <manifest>
     54                <attribute name="Author" value="Raphael Mack, Reza Mohammadi"/>
     55                <attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.measurement.MeasurementPlugin"/>
     56                <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
     57                <attribute name="Plugin-Description" value="Provide a measurement dialog and a layer to measure length and angle of segments, area surrounded by a (simple) closed way and create measurement paths (which also can be imported from a gps layer)."/>
     58                <attribute name="Plugin-Icon" value="images/dialogs/measure.png"/>
     59                <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
     60                <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
     61            </manifest>
     62        </jar>
     63    </target>
     64    <target name="revision">
     65        <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
     66            <env key="LANG" value="C"/>
     67            <arg value="info"/>
     68            <arg value="--xml"/>
     69            <arg value="."/>
     70        </exec>
     71        <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
     72        <delete file="REVISION"/>
     73    </target>
     74    <target name="clean">
     75        <delete dir="${plugin.build.dir}"/>
     76        <delete file="${plugin.jar}"/>
     77    </target>
     78    <target name="install" depends="dist">
     79        <property environment="env"/>
     80        <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
     81            <and>
     82                <os family="windows"/>
     83            </and>
     84        </condition>
     85        <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
     86    </target>
     87    <!--
     88         ************************** Publishing the plugin ***********************************
     89        -->
     90    <!--
     91        ** extracts the JOSM release for the JOSM version in ../core and saves it in the
     92        ** property ${coreversion.info.entry.revision}
     93        **
     94        -->
     95    <target name="core-info">
     96        <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
     97            <env key="LANG" value="C"/>
     98            <arg value="info"/>
     99            <arg value="--xml"/>
     100            <arg value="../../core"/>
     101        </exec>
     102        <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
     103        <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
     104        <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
     105        <delete file="core.info.xml"/>
     106    </target>
     107    <!--
     108        ** commits the source tree for this plugin
     109        -->
     110    <target name="commit-current">
     111        <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
     112        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     113            <env key="LANG" value="C"/>
     114            <arg value="commit"/>
     115            <arg value="-m '${commit.message}'"/>
     116            <arg value="."/>
     117        </exec>
     118    </target>
     119    <!--
     120        ** updates (svn up) the source tree for this plugin
     121        -->
     122    <target name="update-current">
     123        <echo>Updating plugin source ...</echo>
     124        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     125            <env key="LANG" value="C"/>
     126            <arg value="up"/>
     127            <arg value="."/>
     128        </exec>
     129        <echo>Updating ${plugin.jar} ...</echo>
     130        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     131            <env key="LANG" value="C"/>
     132            <arg value="up"/>
     133            <arg value="../dist/${plugin.jar}"/>
     134        </exec>
     135    </target>
     136    <!--
     137        ** commits the plugin.jar
     138        -->
     139    <target name="commit-dist">
     140        <echo>
     141    ***** Properties of published ${plugin.jar} *****
     142    Commit message    : '${commit.message}'
     143    Plugin-Mainversion: ${plugin.main.version}
     144    JOSM build version: ${coreversion.info.entry.revision}
     145    Plugin-Version    : ${version.entry.commit.revision}
     146    ***** / Properties of published ${plugin.jar} *****
    28147
    29         <property name="commit.message" value="Changed the constructor signature of the plugin main class" />
    30         <property name="plugin.main.version" value="3835" />
    31 
    32 
    33         <property name="josm"                   location="../../core/dist/josm-custom.jar"/>
    34         <property name="plugin.dist.dir"        value="../../dist"/>
    35         <property name="plugin.build.dir"       value="build"/>
    36         <property name="plugin.jar"             value="${plugin.dist.dir}/${ant.project.name}.jar"/>
    37         <property name="ant.build.javac.target" value="1.5"/>
    38         <target name="init">
    39                 <mkdir dir="${plugin.build.dir}"/>
    40         </target>
    41         <target name="compile" depends="init">
    42                 <echo message="creating ${plugin.jar}"/>
    43                 <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}">
    44                         <compilerarg value="-Xlint:deprecation"/>
    45                         <compilerarg value="-Xlint:unchecked"/>
    46                 </javac>
    47         </target>
    48         <target name="dist" depends="compile,revision">
    49                 <copy todir="${plugin.build.dir}/images">
    50                         <fileset dir="images"/>
    51                 </copy>
    52                 <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
    53                         <manifest>
    54                                 <attribute name="Author" value="Raphael Mack, Reza Mohammadi"/>
    55                                 <attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.measurement.MeasurementPlugin"/>
    56                                 <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
    57                                 <attribute name="Plugin-Description" value="Provide a measurement dialog and a layer to measure length and angle of segments, area surrounded by a (simple) closed way and create measurement paths (which also can be imported from a gps layer)."/>
    58                                 <attribute name="Plugin-Icon" value="images/dialogs/measure.png"/>
    59                                 <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
    60                                 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
    61                         </manifest>
    62                 </jar>
    63         </target>
    64         <target name="revision">
    65                 <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
    66                         <env key="LANG" value="C"/>
    67                         <arg value="info"/>
    68                         <arg value="--xml"/>
    69                         <arg value="."/>
    70                 </exec>
    71                 <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
    72                 <delete file="REVISION"/>
    73         </target>
    74         <target name="clean">
    75                 <delete dir="${plugin.build.dir}"/>
    76                 <delete file="${plugin.jar}"/>
    77         </target>
    78         <target name="install" depends="dist">
    79                 <property environment="env"/>
    80                 <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
    81                         <and>
    82                                 <os family="windows"/>
    83                         </and>
    84                 </condition>
    85                 <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
    86         </target>
    87 
    88         <!--
    89                  ************************** Publishing the plugin ***********************************
    90                 -->
    91         <!--
    92                 ** extracts the JOSM release for the JOSM version in ../core and saves it in the
    93                 ** property ${coreversion.info.entry.revision}
    94                 **
    95                 -->
    96         <target name="core-info">
    97                 <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
    98                         <env key="LANG" value="C"/>
    99                         <arg value="info"/>
    100                         <arg value="--xml"/>
    101                         <arg value="../../core"/>
    102                 </exec>
    103                 <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
    104                 <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
    105                 <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
    106                 <delete file="core.info.xml" />
    107         </target>
    108 
    109         <!--
    110                 ** commits the source tree for this plugin
    111                 -->
    112         <target name="commit-current">
    113                 <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
    114                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    115                         <env key="LANG" value="C"/>
    116                         <arg value="commit"/>
    117                         <arg value="-m '${commit.message}'"/>
    118                         <arg value="."/>
    119                 </exec>
    120         </target>
    121 
    122         <!--
    123                 ** updates (svn up) the source tree for this plugin
    124                 -->
    125         <target name="update-current">
    126                 <echo>Updating plugin source ...</echo>
    127                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    128                         <env key="LANG" value="C"/>
    129                         <arg value="up"/>
    130                         <arg value="."/>
    131                 </exec>
    132                 <echo>Updating ${plugin.jar} ...</echo>
    133                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    134                         <env key="LANG" value="C"/>
    135                         <arg value="up"/>
    136                         <arg value="../dist/${plugin.jar}"/>
    137                 </exec>
    138         </target>
    139 
    140         <!--
    141                 ** commits the plugin.jar
    142                 -->
    143         <target name="commit-dist">
    144                 <echo>
    145         ***** Properties of published ${plugin.jar} *****
    146         Commit message    : '${commit.message}'
    147         Plugin-Mainversion: ${plugin.main.version}
    148         JOSM build version: ${coreversion.info.entry.revision}
    149         Plugin-Version    : ${version.entry.commit.revision}
    150         ***** / Properties of published ${plugin.jar} *****
    151 
    152         Now commiting ${plugin.jar} ...
    153         </echo>
    154                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    155                         <env key="LANG" value="C"/>
    156                         <arg value="-m '${commit.message}'"/>
    157                         <arg value="commit"/>
    158                         <arg value="${plugin.jar}"/>
    159                 </exec>
    160         </target>
    161 
    162         <!-- ** make sure svn is present as a command line tool ** -->
    163         <target name="ensure-svn-present">
    164                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
    165                         <env key="LANG" value="C" />
    166                         <arg value="--version" />
    167                 </exec>
    168                 <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
    169                         <!-- return code not set at all? Most likely svn isn't installed -->
    170                         <condition>
    171                                 <not>
    172                                         <isset property="svn.exit.code" />
    173                                 </not>
    174                         </condition>
    175                 </fail>
    176                 <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
    177                         <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
    178                         <condition>
    179                                 <isfailure code="${svn.exit.code}" />
    180                         </condition>
    181                 </fail>
    182         </target>
    183 
    184         <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
    185         </target>
     148    Now commiting ${plugin.jar} ...
     149    </echo>
     150        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     151            <env key="LANG" value="C"/>
     152            <arg value="-m '${commit.message}'"/>
     153            <arg value="commit"/>
     154            <arg value="${plugin.jar}"/>
     155        </exec>
     156    </target>
     157    <!-- ** make sure svn is present as a command line tool ** -->
     158    <target name="ensure-svn-present">
     159        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
     160            <env key="LANG" value="C"/>
     161            <arg value="--version"/>
     162        </exec>
     163        <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
     164            <!-- return code not set at all? Most likely svn isn't installed -->
     165            <condition>
     166                <not>
     167                    <isset property="svn.exit.code"/>
     168                </not>
     169            </condition>
     170        </fail>
     171        <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
     172            <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
     173            <condition>
     174                <isfailure code="${svn.exit.code}"/>
     175            </condition>
     176        </fail>
     177    </target>
     178    <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
     179    </target>
    186180</project>
  • applications/editors/josm/plugins/michigan_left/build.xml

    r25190 r26174  
    1 <?xml version="1.0" encoding="UTF-8"?>
     1<?xml version="1.0" encoding="utf-8"?>
    22<!--
    33** This is a template build file for a JOSM  plugin.
     
    2929-->
    3030<project name="michigan_left" default="dist" basedir=".">
    31 
    32         <!-- enter the SVN commit message -->
    33         <property name="commit.message" value="Changed the constructor signature of the plugin main class" />
    34         <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    35         <property name="plugin.main.version" value="3835" />
    36 
    37         <!--
     31    <!-- enter the SVN commit message -->
     32    <property name="commit.message" value="Changed the constructor signature of the plugin main class"/>
     33    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
     34    <property name="plugin.main.version" value="3835"/>
     35    <!--
    3836      ************************************************
    3937      ** should not be necessary to change the following properties
    4038     -->
    41         <property name="josm"                   location="../../core/dist/josm-custom.jar"/>
    42         <property name="plugin.build.dir"       value="build"/>
    43         <property name="plugin.src.dir"         value="src"/>
    44         <!-- this is the directory where the plugin jar is copied to -->
    45         <property name="plugin.dist.dir"        value="../../dist"/>
    46         <property name="ant.build.javac.target" value="1.5"/>
    47         <property name="plugin.dist.dir"        value="../../dist"/>
    48         <property name="plugin.jar"             value="${plugin.dist.dir}/${ant.project.name}.jar"/>
    49 
    50         <!--
     39    <property name="josm" location="../../core/dist/josm-custom.jar"/>
     40    <property name="plugin.build.dir" value="build"/>
     41    <property name="plugin.src.dir" value="src"/>
     42    <!-- this is the directory where the plugin jar is copied to -->
     43    <property name="plugin.dist.dir" value="../../dist"/>
     44    <property name="ant.build.javac.target" value="1.5"/>
     45    <property name="plugin.dist.dir" value="../../dist"/>
     46    <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/>
     47    <!--
    5148    **********************************************************
    5249    ** init - initializes the build
    5350    **********************************************************
    5451    -->
    55         <target name="init">
    56                 <mkdir dir="${plugin.build.dir}"/>
    57         </target>
    58 
    59         <!--
     52    <target name="init">
     53        <mkdir dir="${plugin.build.dir}"/>
     54    </target>
     55    <!--
    6056    **********************************************************
    6157    ** compile - complies the source tree
    6258    **********************************************************
    6359    -->
    64         <target name="compile" depends="init">
    65                 <echo message="compiling sources for  ${plugin.jar} ... "/>
    66                 <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}">
    67                         <compilerarg value="-Xlint:deprecation"/>
    68                         <compilerarg value="-Xlint:unchecked"/>
    69                 </javac>
    70         </target>
    71 
    72         <!--
     60    <target name="compile" depends="init">
     61        <echo message="compiling sources for  ${plugin.jar} ... "/>
     62        <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}">
     63            <compilerarg value="-Xlint:deprecation"/>
     64            <compilerarg value="-Xlint:unchecked"/>
     65        </javac>
     66    </target>
     67    <!--
    7368    **********************************************************
    7469    ** dist - creates the plugin jar
    7570    **********************************************************
    7671    -->
    77         <target name="dist" depends="compile,revision">
    78                 <echo message="creating ${plugin.jar.name} ... "/>
    79                 <copy todir="${plugin.build.dir}/images">
    80                         <fileset dir="images"/>
    81                 </copy>
    82                 <copy todir="${plugin.build.dir}">
    83                         <fileset dir=".">
    84                                 <include name="README" />
    85                                 <include name="LICENSE" />
    86                         </fileset>
    87                 </copy>
    88                 <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
    89                         <!--
     72    <target name="dist" depends="compile,revision">
     73        <echo message="creating ${plugin.jar.name} ... "/>
     74        <copy todir="${plugin.build.dir}/images">
     75            <fileset dir="images"/>
     76        </copy>
     77        <copy todir="${plugin.build.dir}">
     78            <fileset dir=".">
     79                <include name="README"/>
     80                <include name="LICENSE"/>
     81            </fileset>
     82        </copy>
     83        <copy todir="${plugin.build.dir}/data">
     84            <fileset dir="data"/>
     85        </copy>
     86        <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
     87            <!--
    9088        ************************************************
    9189        ** configure these properties. Most of them will be copied to the plugins
     
    9593        ************************************************
    9694    -->
    97                         <manifest>
    98                                 <attribute name="Author" value="Nakor"/>
    99                                 <attribute name="Plugin-Class" value="MichiganLeft.MichiganLeft"/>
    100                                 <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
    101                                 <attribute name="Plugin-Description" value="Adds no left turn for sets of 4 or 5 ways"/>
    102                                 <attribute name="Plugin-Icon" value="images/michigan_left.png"/>
    103                                 <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/wiki/JOSM/Plugins/MichiganLeft"/>
    104                                 <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
    105                                 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
    106                         </manifest>
    107                 </jar>
    108         </target>
    109 
    110         <!--
     95            <manifest>
     96                <attribute name="Author" value="Nakor"/>
     97                <attribute name="Plugin-Class" value="MichiganLeft.MichiganLeft"/>
     98                <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
     99                <attribute name="Plugin-Description" value="Adds no left turn for sets of 4 or 5 ways"/>
     100                <attribute name="Plugin-Icon" value="images/michigan_left.png"/>
     101                <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/wiki/JOSM/Plugins/MichiganLeft"/>
     102                <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
     103                <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
     104            </manifest>
     105        </jar>
     106    </target>
     107    <!--
    111108    **********************************************************
    112109    ** revision - extracts the current revision number for the
     
    115112    **********************************************************
    116113    -->
    117         <target name="revision">
    118 
    119                 <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
    120                         <env key="LANG" value="C"/>
    121                         <arg value="info"/>
    122                         <arg value="--xml"/>
    123                         <arg value="."/>
    124                 </exec>
    125                 <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
    126                 <delete file="REVISION"/>
    127         </target>
    128 
    129         <!--
     114    <target name="revision">
     115        <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
     116            <env key="LANG" value="C"/>
     117            <arg value="info"/>
     118            <arg value="--xml"/>
     119            <arg value="."/>
     120        </exec>
     121        <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
     122        <delete file="REVISION"/>
     123    </target>
     124    <!--
    130125    **********************************************************
    131126    ** clean - clean up the build environment
    132127    **********************************************************
    133128    -->
    134         <target name="clean">
    135                 <delete dir="${plugin.build.dir}"/>
    136                 <delete file="${plugin.jar}"/>
    137         </target>
    138 
    139         <!--
     129    <target name="clean">
     130        <delete dir="${plugin.build.dir}"/>
     131        <delete file="${plugin.jar}"/>
     132    </target>
     133    <!--
    140134    **********************************************************
    141135    ** install - install the plugin in your local JOSM installation
    142136    **********************************************************
    143137    -->
    144         <target name="install" depends="dist">
    145                 <property environment="env"/>
    146                 <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
    147                         <and>
    148                                 <os family="windows"/>
    149                         </and>
    150                 </condition>
    151                 <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
    152         </target>
    153 
    154         <!--
    155         ************************** Publishing the plugin ***********************************
    156         -->
    157         <!--
    158                 ** extracts the JOSM release for the JOSM version in ../core and saves it in the
    159                 ** property ${coreversion.info.entry.revision}
    160                 **
    161                 -->
    162         <target name="core-info">
    163                 <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
    164                         <env key="LANG" value="C"/>
    165                         <arg value="info"/>
    166                         <arg value="--xml"/>
    167                         <arg value="../../core"/>
    168                 </exec>
    169                 <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
    170                 <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
    171                 <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
    172                 <delete file="core.info.xml" />
    173         </target>
    174 
    175         <!--
    176                 ** commits the source tree for this plugin
    177                 -->
    178         <target name="commit-current">
    179                 <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
    180                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    181                         <env key="LANG" value="C"/>
    182                         <arg value="commit"/>
    183                         <arg value="-m '${commit.message}'"/>
    184                         <arg value="."/>
    185                 </exec>
    186         </target>
    187 
    188         <!--
    189                 ** updates (svn up) the source tree for this plugin
    190                 -->
    191         <target name="update-current">
    192                 <echo>Updating plugin source ...</echo>
    193                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    194                         <env key="LANG" value="C"/>
    195                         <arg value="up"/>
    196                         <arg value="."/>
    197                 </exec>
    198                 <echo>Updating ${plugin.jar} ...</echo>
    199                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    200                         <env key="LANG" value="C"/>
    201                         <arg value="up"/>
    202                         <arg value="../dist/${plugin.jar}"/>
    203                 </exec>
    204         </target>
    205 
    206         <!--
    207                 ** commits the plugin.jar
    208                 -->
    209         <target name="commit-dist">
    210                 <echo>
    211         ***** Properties of published ${plugin.jar} *****
    212         Commit message    : '${commit.message}'                                 
    213         Plugin-Mainversion: ${plugin.main.version}
    214         JOSM build version: ${coreversion.info.entry.revision}
    215         Plugin-Version    : ${version.entry.commit.revision}
    216         ***** / Properties of published ${plugin.jar} *****                                     
    217                                                
    218         Now commiting ${plugin.jar} ...
    219         </echo>
    220                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    221                         <env key="LANG" value="C"/>
    222                         <arg value="-m '${commit.message}'"/>
    223                         <arg value="commit"/>
    224                         <arg value="${plugin.jar}"/>
    225                 </exec>
    226         </target>
    227 
    228         <!-- ** make sure svn is present as a command line tool ** -->
    229         <target name="ensure-svn-present">
    230                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
    231                         <env key="LANG" value="C" />
    232                         <arg value="--version" />
    233                 </exec>
    234                 <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
    235                         <!-- return code not set at all? Most likely svn isn't installed -->
    236                         <condition>
    237                                 <not>
    238                                         <isset property="svn.exit.code" />
    239                                 </not>
    240                         </condition>
    241                 </fail>
    242                 <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
    243                         <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
    244                         <condition>
    245                                 <isfailure code="${svn.exit.code}" />
    246                         </condition>
    247                 </fail>
    248         </target>
    249 
    250         <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
    251         </target>
     138    <target name="install" depends="dist">
     139        <property environment="env"/>
     140        <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
     141            <and>
     142                <os family="windows"/>
     143            </and>
     144        </condition>
     145        <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
     146    </target>
     147    <!--
     148    ************************** Publishing the plugin ***********************************
     149    -->
     150    <!--
     151        ** extracts the JOSM release for the JOSM version in ../core and saves it in the
     152        ** property ${coreversion.info.entry.revision}
     153        **
     154        -->
     155    <target name="core-info">
     156        <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
     157            <env key="LANG" value="C"/>
     158            <arg value="info"/>
     159            <arg value="--xml"/>
     160            <arg value="../../core"/>
     161        </exec>
     162        <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
     163        <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
     164        <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
     165        <delete file="core.info.xml"/>
     166    </target>
     167    <!--
     168        ** commits the source tree for this plugin
     169        -->
     170    <target name="commit-current">
     171        <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
     172        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     173            <env key="LANG" value="C"/>
     174            <arg value="commit"/>
     175            <arg value="-m '${commit.message}'"/>
     176            <arg value="."/>
     177        </exec>
     178    </target>
     179    <!--
     180        ** updates (svn up) the source tree for this plugin
     181        -->
     182    <target name="update-current">
     183        <echo>Updating plugin source ...</echo>
     184        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     185            <env key="LANG" value="C"/>
     186            <arg value="up"/>
     187            <arg value="."/>
     188        </exec>
     189        <echo>Updating ${plugin.jar} ...</echo>
     190        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     191            <env key="LANG" value="C"/>
     192            <arg value="up"/>
     193            <arg value="../dist/${plugin.jar}"/>
     194        </exec>
     195    </target>
     196    <!--
     197        ** commits the plugin.jar
     198        -->
     199    <target name="commit-dist">
     200        <echo>
     201    ***** Properties of published ${plugin.jar} *****
     202    Commit message    : '${commit.message}'                 
     203    Plugin-Mainversion: ${plugin.main.version}
     204    JOSM build version: ${coreversion.info.entry.revision}
     205    Plugin-Version    : ${version.entry.commit.revision}
     206    ***** / Properties of published ${plugin.jar} *****                 
     207                       
     208    Now commiting ${plugin.jar} ...
     209    </echo>
     210        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     211            <env key="LANG" value="C"/>
     212            <arg value="-m '${commit.message}'"/>
     213            <arg value="commit"/>
     214            <arg value="${plugin.jar}"/>
     215        </exec>
     216    </target>
     217    <!-- ** make sure svn is present as a command line tool ** -->
     218    <target name="ensure-svn-present">
     219        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
     220            <env key="LANG" value="C"/>
     221            <arg value="--version"/>
     222        </exec>
     223        <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
     224            <!-- return code not set at all? Most likely svn isn't installed -->
     225            <condition>
     226                <not>
     227                    <isset property="svn.exit.code"/>
     228                </not>
     229            </condition>
     230        </fail>
     231        <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
     232            <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
     233            <condition>
     234                <isfailure code="${svn.exit.code}"/>
     235            </condition>
     236        </fail>
     237    </target>
     238    <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
     239    </target>
    252240</project>
  • applications/editors/josm/plugins/multipoly-convert/build.xml

    r25192 r26174  
    1 <?xml version="1.0" encoding="UTF-8"?>
     1<?xml version="1.0" encoding="utf-8"?>
    22<!--
    33** This is the build file for the multipoly-convert plugin.
     
    2929-->
    3030<project name="multipoly-convert" default="dist" basedir=".">
    31 
    32 
    33         <!-- enter the SVN commit message -->
    34         <property name="commit.message" value="Changed the constructor signature of the plugin main class" />
    35         <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    36         <property name="plugin.main.version" value="3835" />
    37 
    38 
    39         <!-- compilation properties -->
    40         <property name="josm.build.dir" value="../../core" />
    41         <property name="josm.home.dir" value="${user.home}/.josm" />
    42         <property name="josm" location="../../core/dist/josm-custom.jar" />
    43         <property name="plugin.build.dir" value="build" />
    44         <property name="plugin.dist.dir" value="../../dist" />
    45         <property name="plugin.name" value="${ant.project.name}" />
    46         <property name="plugin.jar" value="${plugin.dist.dir}/${plugin.name}.jar" />
    47 
    48         <!-- There's no josm.jar in the svn, so point "josm" to a local copy of your JOSM binary -->
    49         <property name="josm" location="../../core/dist/josm-custom.jar" />
    50 
    51         <property name="ant.build.javac.target" value="1.5" />
    52 
    53         <target name="init">
    54                 <mkdir dir="${plugin.build.dir}">
    55                 </mkdir>
    56                 <mkdir dir="${plugin.dist.dir}">
    57                 </mkdir>
    58         </target>
    59 
    60         <target name="compile" depends="init">
    61                 <echo message="creating ${plugin.jar}" />
    62                 <javac srcdir="src" target="1.5" classpath="${josm}" destdir="build" debug="true">
    63                         <include name="**/*.java" />
    64                 </javac>
    65         </target>
    66 
    67         <target name="revision">
    68                 <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
    69                         <env key="LANG" value="C" />
    70                         <arg value="info" />
    71                         <arg value="--xml" />
    72                         <arg value="." />
    73                 </exec>
    74                 <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true" />
    75                 <delete file="REVISION" />
    76         </target>
    77 
    78         <target name="dist" depends="compile,revision">
    79                 <copy todir="${plugin.build.dir}/images">
    80                         <fileset dir="images" />
    81                 </copy>
    82                 <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
    83                         <manifest>
    84                                 <attribute name="Author" value="Stéphane Brunner" />
    85                                 <attribute name="Plugin-Class" value="converttomultipoly.MultipolyPlugin" />
    86                                 <attribute name="Plugin-Description" value="Simply convert an area to a multipolygon." />
    87                                 <attribute name="Plugin-Icon" value="images/multipoly_convert.png"/>
    88                                 <attribute name="Plugin-Version" value="${version.entry.commit.revision}" />
    89                                 <attribute name="Plugin-Date" value="${version.entry.commit.date}" />
    90                                 <attribute name="Plugin-Link" value="http://www.stephane-brunner.ch/mediawiki/index.php/Plugins" />
    91                                 <attribute name="Plugin-Mainversion" value="${plugin.main.version}" />
    92                                 <!--attribute name="2830_Plugin-Url" value="20583;http://trac.openstreetmap.org/browser/applications/editors/josm/dist/multipoly-convert.jar?rev=20584&amp;format=raw" /-->
    93                         </manifest>
    94                 </jar>
    95         </target>
    96 
    97         <target name="clean">
    98                 <delete dir="${plugin.build.dir}" />
    99                 <delete file="${plugin.jar}" />
    100         </target>
    101 
    102         <target name="clean_install">
    103                 <delete file="${plugins}/multipoly-convert.jar" />
    104         </target>
    105 
    106         <target name="install" depends="dist">
    107                 <property environment="env" />
    108                 <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
    109                         <and>
    110                                 <os family="windows" />
    111                         </and>
    112                 </condition>
    113                 <copy file="${plugin.jar}" todir="${josm.plugins.dir}" />
    114         </target>
    115 
    116         <!--
    117         ************************** Publishing the plugin ***********************************
    118         -->
    119         <!--
    120                 ** extracts the JOSM release for the JOSM version in ../core and saves it in the
    121                 ** property ${coreversion.info.entry.revision}
    122                 **
    123                 -->
    124         <target name="core-info">
    125                 <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
    126                         <env key="LANG" value="C" />
    127                         <arg value="info" />
    128                         <arg value="--xml" />
    129                         <arg value="../../core" />
    130                 </exec>
    131                 <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true" />
    132                 <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
    133                 <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
    134                 <delete file="core.info.xml" />
    135         </target>
    136 
    137         <!--
    138                 ** commits the source tree for this plugin
    139                 -->
    140         <target name="commit-current">
    141                 <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
    142                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    143                         <env key="LANG" value="C" />
    144                         <arg value="commit" />
    145                         <arg value="-m '${commit.message}'" />
    146                         <arg value="." />
    147                 </exec>
    148         </target>
    149 
    150         <!--
    151                 ** updates (svn up) the source tree for this plugin
    152                 -->
    153         <target name="update-current">
    154                 <echo>Updating plugin source ...</echo>
    155                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    156                         <env key="LANG" value="C" />
    157                         <arg value="up" />
    158                         <arg value="." />
    159                 </exec>
    160                 <echo>Updating ${plugin.jar} ...</echo>
    161                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    162                         <env key="LANG" value="C" />
    163                         <arg value="up" />
    164                         <arg value="../dist/${plugin.jar}" />
    165                 </exec>
    166         </target>
    167 
    168         <!--
    169                 ** commits the plugin.jar
    170                 -->
    171         <target name="commit-dist">
    172                 <echo>
    173         ***** Properties of published ${plugin.jar} *****
    174         Commit message    : '${commit.message}'                                 
    175         Plugin-Mainversion: ${plugin.main.version}
    176         JOSM build version: ${coreversion.info.entry.revision}
    177         Plugin-Version    : ${version.entry.commit.revision}
    178         ***** / Properties of published ${plugin.jar} *****                                     
    179                                                
    180         Now commiting ${plugin.jar} ...
    181         </echo>
    182                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    183                         <env key="LANG" value="C" />
    184                         <arg value="-m '${commit.message}'" />
    185                         <arg value="commit" />
    186                         <arg value="${plugin.jar}" />
    187                 </exec>
    188         </target>
    189 
    190         <!-- ** make sure svn is present as a command line tool ** -->
    191         <target name="ensure-svn-present">
    192                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
    193                         <env key="LANG" value="C" />
    194                         <arg value="--version" />
    195                 </exec>
    196                 <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
    197                         <!-- return code not set at all? Most likely svn isn't installed -->
    198                         <condition>
    199                                 <not>
    200                                         <isset property="svn.exit.code" />
    201                                 </not>
    202                         </condition>
    203                 </fail>
    204                 <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
    205                         <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
    206                         <condition>
    207                                 <isfailure code="${svn.exit.code}" />
    208                         </condition>
    209                 </fail>
    210         </target>
    211 
    212         <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
    213         </target>
    214 
     31    <!-- enter the SVN commit message -->
     32    <property name="commit.message" value="Changed the constructor signature of the plugin main class"/>
     33    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
     34    <property name="plugin.main.version" value="3835"/>
     35    <!-- compilation properties -->
     36    <property name="josm.build.dir" value="../../core"/>
     37    <property name="josm.home.dir" value="${user.home}/.josm"/>
     38    <property name="josm" location="../../core/dist/josm-custom.jar"/>
     39    <property name="plugin.build.dir" value="build"/>
     40    <property name="plugin.dist.dir" value="../../dist"/>
     41    <property name="plugin.name" value="${ant.project.name}"/>
     42    <property name="plugin.jar" value="${plugin.dist.dir}/${plugin.name}.jar"/>
     43    <!-- There's no josm.jar in the svn, so point "josm" to a local copy of your JOSM binary -->
     44    <property name="josm" location="../../core/dist/josm-custom.jar"/>
     45    <property name="ant.build.javac.target" value="1.5"/>
     46    <target name="init">
     47        <mkdir dir="${plugin.build.dir}">
     48        </mkdir>
     49        <mkdir dir="${plugin.dist.dir}">
     50        </mkdir>
     51    </target>
     52    <target name="compile" depends="init">
     53        <echo message="creating ${plugin.jar}"/>
     54        <javac srcdir="src" target="1.5" classpath="${josm}" destdir="build" debug="true">
     55            <include name="**/*.java"/>
     56        </javac>
     57    </target>
     58    <target name="revision">
     59        <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
     60            <env key="LANG" value="C"/>
     61            <arg value="info"/>
     62            <arg value="--xml"/>
     63            <arg value="."/>
     64        </exec>
     65        <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
     66        <delete file="REVISION"/>
     67    </target>
     68    <target name="dist" depends="compile,revision">
     69        <copy todir="${plugin.build.dir}/images">
     70            <fileset dir="images"/>
     71        </copy>
     72        <copy todir="${plugin.build.dir}/data">
     73            <fileset dir="data"/>
     74        </copy>
     75        <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
     76            <manifest>
     77                <attribute name="Author" value="Stéphane Brunner"/>
     78                <attribute name="Plugin-Class" value="converttomultipoly.MultipolyPlugin"/>
     79                <attribute name="Plugin-Description" value="Simply convert an area to a multipolygon."/>
     80                <attribute name="Plugin-Icon" value="images/multipoly_convert.png"/>
     81                <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
     82                <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
     83                <attribute name="Plugin-Link" value="http://www.stephane-brunner.ch/mediawiki/index.php/Plugins"/>
     84                <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
     85                <!--attribute name="2830_Plugin-Url" value="20583;http://trac.openstreetmap.org/browser/applications/editors/josm/dist/multipoly-convert.jar?rev=20584&amp;format=raw" /-->
     86            </manifest>
     87        </jar>
     88    </target>
     89    <target name="clean">
     90        <delete dir="${plugin.build.dir}"/>
     91        <delete file="${plugin.jar}"/>
     92    </target>
     93    <target name="clean_install">
     94        <delete file="${plugins}/multipoly-convert.jar"/>
     95    </target>
     96    <target name="install" depends="dist">
     97        <property environment="env"/>
     98        <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
     99            <and>
     100                <os family="windows"/>
     101            </and>
     102        </condition>
     103        <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
     104    </target>
     105    <!--
     106    ************************** Publishing the plugin ***********************************
     107    -->
     108    <!--
     109        ** extracts the JOSM release for the JOSM version in ../core and saves it in the
     110        ** property ${coreversion.info.entry.revision}
     111        **
     112        -->
     113    <target name="core-info">
     114        <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
     115            <env key="LANG" value="C"/>
     116            <arg value="info"/>
     117            <arg value="--xml"/>
     118            <arg value="../../core"/>
     119        </exec>
     120        <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
     121        <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
     122        <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
     123        <delete file="core.info.xml"/>
     124    </target>
     125    <!--
     126        ** commits the source tree for this plugin
     127        -->
     128    <target name="commit-current">
     129        <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
     130        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     131            <env key="LANG" value="C"/>
     132            <arg value="commit"/>
     133            <arg value="-m '${commit.message}'"/>
     134            <arg value="."/>
     135        </exec>
     136    </target>
     137    <!--
     138        ** updates (svn up) the source tree for this plugin
     139        -->
     140    <target name="update-current">
     141        <echo>Updating plugin source ...</echo>
     142        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     143            <env key="LANG" value="C"/>
     144            <arg value="up"/>
     145            <arg value="."/>
     146        </exec>
     147        <echo>Updating ${plugin.jar} ...</echo>
     148        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     149            <env key="LANG" value="C"/>
     150            <arg value="up"/>
     151            <arg value="../dist/${plugin.jar}"/>
     152        </exec>
     153    </target>
     154    <!--
     155        ** commits the plugin.jar
     156        -->
     157    <target name="commit-dist">
     158        <echo>
     159    ***** Properties of published ${plugin.jar} *****
     160    Commit message    : '${commit.message}'                 
     161    Plugin-Mainversion: ${plugin.main.version}
     162    JOSM build version: ${coreversion.info.entry.revision}
     163    Plugin-Version    : ${version.entry.commit.revision}
     164    ***** / Properties of published ${plugin.jar} *****                 
     165                       
     166    Now commiting ${plugin.jar} ...
     167    </echo>
     168        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     169            <env key="LANG" value="C"/>
     170            <arg value="-m '${commit.message}'"/>
     171            <arg value="commit"/>
     172            <arg value="${plugin.jar}"/>
     173        </exec>
     174    </target>
     175    <!-- ** make sure svn is present as a command line tool ** -->
     176    <target name="ensure-svn-present">
     177        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
     178            <env key="LANG" value="C"/>
     179            <arg value="--version"/>
     180        </exec>
     181        <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
     182            <!-- return code not set at all? Most likely svn isn't installed -->
     183            <condition>
     184                <not>
     185                    <isset property="svn.exit.code"/>
     186                </not>
     187            </condition>
     188        </fail>
     189        <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
     190            <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
     191            <condition>
     192                <isfailure code="${svn.exit.code}"/>
     193            </condition>
     194        </fail>
     195    </target>
     196    <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
     197    </target>
    215198</project>
  • applications/editors/josm/plugins/namemanager/build.xml

    r25594 r26174  
    1 <?xml version="1.0" encoding="UTF-8"?>
     1<?xml version="1.0" encoding="utf-8"?>
    22<!--
    33** This is a template build file for a JOSM  plugin.
     
    2929-->
    3030<project name="namemanager" default="dist" basedir=".">
    31 
    32         <!-- enter the SVN commit message -->
    33         <property name="commit.message" value="..." />
    34         <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    35         <property name="plugin.main.version" value="3966" />
    36 
    37 
    38         <!--
     31    <!-- enter the SVN commit message -->
     32    <property name="commit.message" value="..."/>
     33    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
     34    <property name="plugin.main.version" value="3966"/>
     35    <!--
    3936      ************************************************
    4037      ** should not be necessary to change the following properties
    4138     -->
    42         <property name="josm"                   location="../../core/dist/josm-custom.jar"/>
    43         <property name="plugin.build.dir"       value="build"/>
    44         <property name="plugin.src.dir"         value="src"/>
    45         <!-- this is the directory where the plugin jar is copied to -->
    46         <property name="plugin.dist.dir"        value="../../dist"/>
    47         <property name="ant.build.javac.target" value="1.5"/>
    48         <property name="plugin.dist.dir"        value="../../dist"/>
    49         <property name="plugin.jar"             value="${plugin.dist.dir}/${ant.project.name}.jar"/>
    50 
    51         <!--
     39    <property name="josm" location="../../core/dist/josm-custom.jar"/>
     40    <property name="plugin.build.dir" value="build"/>
     41    <property name="plugin.src.dir" value="src"/>
     42    <!-- this is the directory where the plugin jar is copied to -->
     43    <property name="plugin.dist.dir" value="../../dist"/>
     44    <property name="ant.build.javac.target" value="1.5"/>
     45    <property name="plugin.dist.dir" value="../../dist"/>
     46    <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/>
     47    <!--
    5248    **********************************************************
    5349    ** init - initializes the build
    5450    **********************************************************
    5551    -->
    56         <target name="init">
    57                 <mkdir dir="${plugin.build.dir}"/>
    58         </target>
    59 
    60         <!--
     52    <target name="init">
     53        <mkdir dir="${plugin.build.dir}"/>
     54    </target>
     55    <!--
    6156    **********************************************************
    6257    ** compile - complies the source tree
    6358    **********************************************************
    6459    -->
    65         <target name="compile" depends="init">
    66                 <echo message="compiling sources for  ${plugin.jar} ... "/>
    67                 <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}">
    68                         <compilerarg value="-Xlint:deprecation"/>
    69                         <compilerarg value="-Xlint:unchecked"/>
    70                 </javac>
    71         </target>
    72 
    73         <!--
     60    <target name="compile" depends="init">
     61        <echo message="compiling sources for  ${plugin.jar} ... "/>
     62        <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}">
     63            <compilerarg value="-Xlint:deprecation"/>
     64            <compilerarg value="-Xlint:unchecked"/>
     65        </javac>
     66    </target>
     67    <!--
    7468    **********************************************************
    7569    ** dist - creates the plugin jar
    7670    **********************************************************
    7771    -->
    78         <target name="dist" depends="compile,revision">
    79                 <echo message="creating ${ant.project.name}.jar ... "/>
    80                 <copy todir="${plugin.build.dir}/resources">
    81                         <fileset dir="resources" />
    82                 </copy>
    83                 <copy todir="${plugin.build.dir}/images">
    84                         <fileset dir="images"/>
    85                 </copy>
    86                 <copy todir="${plugin.build.dir}">
    87                         <fileset dir=".">
    88                                 <include name="README" />
    89                                 <include name="LICENSE" />
    90                         </fileset>
    91                 </copy>
    92                 <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
    93                         <!--
     72    <target name="dist" depends="compile,revision">
     73        <echo message="creating ${ant.project.name}.jar ... "/>
     74        <copy todir="${plugin.build.dir}/resources">
     75            <fileset dir="resources"/>
     76        </copy>
     77        <copy todir="${plugin.build.dir}/images">
     78            <fileset dir="images"/>
     79        </copy>
     80        <copy todir="${plugin.build.dir}/data">
     81            <fileset dir="data"/>
     82        </copy>
     83        <copy todir="${plugin.build.dir}">
     84            <fileset dir=".">
     85                <include name="README"/>
     86                <include name="LICENSE"/>
     87            </fileset>
     88        </copy>
     89        <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
     90            <!--
    9491        ************************************************
    9592        ** configure these properties. Most of them will be copied to the plugins
     
    9996        ************************************************
    10097    -->
    101                         <manifest>
    102                                 <attribute name="Author" value="Rafal Jachowicz: rjachow@gmail.com"/>
    103                                 <attribute name="Main-Class" value="org.openstreetmap.josm.plugins.namemanager.NameManagerMain" />
    104                                 <attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.namemanager.NameManagerPlugin" />
    105                                 <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
    106                                 <attribute name="Plugin-Description" value="Allows to attribute tags to all objects in any selected area at once" />
    107                                 <attribute name="pl_Plugin-Description" value="Pozwala na dodawanie, edycję i usuwanie tagów znajdujących się we wskazanym obszarze na raz" />
    108 <!--                            <attribute name="Plugin-Icon" value="..."/>-->
    109 <!--                            <attribute name="Plugin-Link" value="..."/>-->
    110                                 <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
    111                                 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
    112                         </manifest>
    113                 </jar>
    114         </target>
    115 
    116         <!--
     98            <manifest>
     99                <attribute name="Author" value="Rafal Jachowicz: rjachow@gmail.com"/>
     100                <attribute name="Main-Class" value="org.openstreetmap.josm.plugins.namemanager.NameManagerMain"/>
     101                <attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.namemanager.NameManagerPlugin"/>
     102                <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
     103                <attribute name="Plugin-Description" value="Allows to attribute tags to all objects in any selected area at once"/>
     104                <attribute name="pl_Plugin-Description" value="Pozwala na dodawanie, edycję i usuwanie tagów znajdujących się we wskazanym obszarze na raz"/>
     105                <!--                <attribute name="Plugin-Icon" value="..."/>-->
     106                <!--                <attribute name="Plugin-Link" value="..."/>-->
     107                <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
     108                <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
     109            </manifest>
     110        </jar>
     111    </target>
     112    <!--
    117113    **********************************************************
    118114    ** revision - extracts the current revision number for the
     
    121117    **********************************************************
    122118    -->
    123         <target name="revision">
    124 
    125                 <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
    126                         <env key="LANG" value="C"/>
    127                         <arg value="info"/>
    128                         <arg value="--xml"/>
    129                         <arg value="."/>
    130                 </exec>
    131                 <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
    132                 <delete file="REVISION"/>
    133         </target>
    134 
    135         <!--
     119    <target name="revision">
     120        <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
     121            <env key="LANG" value="C"/>
     122            <arg value="info"/>
     123            <arg value="--xml"/>
     124            <arg value="."/>
     125        </exec>
     126        <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
     127        <delete file="REVISION"/>
     128    </target>
     129    <!--
    136130    **********************************************************
    137131    ** clean - clean up the build environment
    138132    **********************************************************
    139133    -->
    140         <target name="clean">
    141                 <delete dir="${plugin.build.dir}"/>
    142                 <delete file="${plugin.jar}"/>
    143         </target>
    144 
    145         <!--
     134    <target name="clean">
     135        <delete dir="${plugin.build.dir}"/>
     136        <delete file="${plugin.jar}"/>
     137    </target>
     138    <!--
    146139    **********************************************************
    147140    ** install - install the plugin in your local JOSM installation
    148141    **********************************************************
    149142    -->
    150         <target name="install" depends="dist">
    151                 <property environment="env"/>
    152                 <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
    153                         <and>
    154                                 <os family="windows"/>
    155                         </and>
    156                 </condition>
    157                 <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
    158         </target>
    159 
    160 
    161         <!--
    162         ************************** Publishing the plugin ***********************************
    163         -->
    164         <!--
    165                 ** extracts the JOSM release for the JOSM version in ../core and saves it in the
    166                 ** property ${coreversion.info.entry.revision}
    167                 **
    168                 -->
    169         <target name="core-info">
    170                 <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
    171                         <env key="LANG" value="C"/>
    172                         <arg value="info"/>
    173                         <arg value="--xml"/>
    174                         <arg value="../../core"/>
    175                 </exec>
    176                 <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
    177                 <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
    178                 <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
    179                 <delete file="core.info.xml" />
    180         </target>
    181 
    182         <!--
    183                 ** commits the source tree for this plugin
    184                 -->
    185         <target name="commit-current">
    186                 <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
    187                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    188                         <env key="LANG" value="C"/>
    189                         <arg value="commit"/>
    190                         <arg value="-m '${commit.message}'"/>
    191                         <arg value="."/>
    192                 </exec>
    193         </target>
    194 
    195         <!--
    196                 ** updates (svn up) the source tree for this plugin
    197                 -->
    198         <target name="update-current">
    199                 <echo>Updating plugin source ...</echo>
    200                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    201                         <env key="LANG" value="C"/>
    202                         <arg value="up"/>
    203                         <arg value="."/>
    204                 </exec>
    205                 <echo>Updating ${plugin.jar} ...</echo>
    206                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    207                         <env key="LANG" value="C"/>
    208                         <arg value="up"/>
    209                         <arg value="../dist/${plugin.jar}"/>
    210                 </exec>
    211         </target>
    212 
    213         <!--
    214                 ** commits the plugin.jar
    215                 -->
    216         <target name="commit-dist">
    217                 <echo>
    218         ***** Properties of published ${plugin.jar} *****
    219         Commit message    : '${commit.message}'                                 
    220         Plugin-Mainversion: ${plugin.main.version}
    221         JOSM build version: ${coreversion.info.entry.revision}
    222         Plugin-Version    : ${version.entry.commit.revision}
    223         ***** / Properties of published ${plugin.jar} *****                                     
    224                                                
    225         Now commiting ${plugin.jar} ...
    226         </echo>
    227                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    228                         <env key="LANG" value="C"/>
    229                         <arg value="-m '${commit.message}'"/>
    230                         <arg value="commit"/>
    231                         <arg value="${plugin.jar}"/>
    232                 </exec>
    233         </target>
    234 
    235         <!-- ** make sure svn is present as a command line tool ** -->
    236         <target name="ensure-svn-present">
    237                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
    238                         <env key="LANG" value="C" />
    239                         <arg value="--version" />
    240                 </exec>
    241                 <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
    242                         <!-- return code not set at all? Most likely svn isn't installed -->
    243                         <condition>
    244                                 <not>
    245                                         <isset property="svn.exit.code" />
    246                                 </not>
    247                         </condition>
    248                 </fail>
    249                 <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
    250                         <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
    251                         <condition>
    252                                 <isfailure code="${svn.exit.code}" />
    253                         </condition>
    254                 </fail>
    255         </target>
    256 
    257         <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
    258         </target>
     143    <target name="install" depends="dist">
     144        <property environment="env"/>
     145        <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
     146            <and>
     147                <os family="windows"/>
     148            </and>
     149        </condition>
     150        <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
     151    </target>
     152    <!--
     153    ************************** Publishing the plugin ***********************************
     154    -->
     155    <!--
     156        ** extracts the JOSM release for the JOSM version in ../core and saves it in the
     157        ** property ${coreversion.info.entry.revision}
     158        **
     159        -->
     160    <target name="core-info">
     161        <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
     162            <env key="LANG" value="C"/>
     163            <arg value="info"/>
     164            <arg value="--xml"/>
     165            <arg value="../../core"/>
     166        </exec>
     167        <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
     168        <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
     169        <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
     170        <delete file="core.info.xml"/>
     171    </target>
     172    <!--
     173        ** commits the source tree for this plugin
     174        -->
     175    <target name="commit-current">
     176        <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
     177        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     178            <env key="LANG" value="C"/>
     179            <arg value="commit"/>
     180            <arg value="-m '${commit.message}'"/>
     181            <arg value="."/>
     182        </exec>
     183    </target>
     184    <!--
     185        ** updates (svn up) the source tree for this plugin
     186        -->
     187    <target name="update-current">
     188        <echo>Updating plugin source ...</echo>
     189        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     190            <env key="LANG" value="C"/>
     191            <arg value="up"/>
     192            <arg value="."/>
     193        </exec>
     194        <echo>Updating ${plugin.jar} ...</echo>
     195        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     196            <env key="LANG" value="C"/>
     197            <arg value="up"/>
     198            <arg value="../dist/${plugin.jar}"/>
     199        </exec>
     200    </target>
     201    <!--
     202        ** commits the plugin.jar
     203        -->
     204    <target name="commit-dist">
     205        <echo>
     206    ***** Properties of published ${plugin.jar} *****
     207    Commit message    : '${commit.message}'                 
     208    Plugin-Mainversion: ${plugin.main.version}
     209    JOSM build version: ${coreversion.info.entry.revision}
     210    Plugin-Version    : ${version.entry.commit.revision}
     211    ***** / Properties of published ${plugin.jar} *****                 
     212                       
     213    Now commiting ${plugin.jar} ...
     214    </echo>
     215        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     216            <env key="LANG" value="C"/>
     217            <arg value="-m '${commit.message}'"/>
     218            <arg value="commit"/>
     219            <arg value="${plugin.jar}"/>
     220        </exec>
     221    </target>
     222    <!-- ** make sure svn is present as a command line tool ** -->
     223    <target name="ensure-svn-present">
     224        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
     225            <env key="LANG" value="C"/>
     226            <arg value="--version"/>
     227        </exec>
     228        <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
     229            <!-- return code not set at all? Most likely svn isn't installed -->
     230            <condition>
     231                <not>
     232                    <isset property="svn.exit.code"/>
     233                </not>
     234            </condition>
     235        </fail>
     236        <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
     237            <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
     238            <condition>
     239                <isfailure code="${svn.exit.code}"/>
     240            </condition>
     241        </fail>
     242    </target>
     243    <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
     244    </target>
    259245</project>
  • applications/editors/josm/plugins/nearclick/build.xml

    r25192 r26174  
    1 <?xml version="1.0" encoding="UTF-8"?>
     1<?xml version="1.0" encoding="utf-8"?>
    22<!--
    33** This is the build file for the nearclick plugin.
     
    2929-->
    3030<project name="nearclick" default="dist" basedir=".">
    31 
    32         <!-- enter the SVN commit message -->
    33         <property name="commit.message" value="Changed the constructor signature of the plugin main class" />
    34         <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    35         <property name="plugin.main.version" value="3835" />
    36 
    37 
    38         <property name="josm"                   location="../../core/dist/josm-custom.jar"/>
    39         <property name="plugin.dist.dir"        value="../../dist"/>
    40         <property name="plugin.build.dir"       value="build"/>
    41         <property name="plugin.jar"             value="${plugin.dist.dir}/${ant.project.name}.jar"/>
    42         <property name="ant.build.javac.target" value="1.5"/>
    43         <target name="init">
    44                 <mkdir dir="${plugin.build.dir}"/>
    45         </target>
    46         <target name="compile" depends="init">
    47                 <echo message="creating ${plugin.jar}"/>
    48                 <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}">
    49                         <compilerarg value="-Xlint:deprecation"/>
    50                         <compilerarg value="-Xlint:unchecked"/>
    51                 </javac>
    52         </target>
    53         <target name="dist" depends="compile,revision">
    54                 <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
    55                         <manifest>
    56                                 <attribute name="Author" value="Imi, David Earl"/>
    57                                 <attribute name="Plugin-Class" value="nearclick.NearClickPlugin"/>
    58                                 <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
    59                                 <attribute name="Plugin-Description" value="Simulates a click when you do a small and short drag. This is useful for tablet pens, when you have problems just clicking the tablet without the mouse moving (general Java - tablet problem)."/>
    60                                 <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/index.php/JOSM/Plugins/Nearclick"/>
    61                                 <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
    62                                 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
    63                         </manifest>
    64                 </jar>
    65         </target>
    66         <target name="revision">
    67                 <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
    68                         <env key="LANG" value="C"/>
    69                         <arg value="info"/>
    70                         <arg value="--xml"/>
    71                         <arg value="."/>
    72                 </exec>
    73                 <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
    74                 <delete file="REVISION"/>
    75         </target>
    76         <target name="clean">
    77                 <delete dir="${plugin.build.dir}"/>
    78                 <delete file="${plugin.jar}"/>
    79         </target>
    80         <target name="install" depends="dist">
    81                 <property environment="env"/>
    82                 <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
    83                         <and>
    84                                 <os family="windows"/>
    85                         </and>
    86                 </condition>
    87                 <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
    88         </target>
    89 
    90         <!--
    91         ************************** Publishing the plugin ***********************************
    92         -->
    93         <!--
    94                 ** extracts the JOSM release for the JOSM version in ../core and saves it in the
    95                 ** property ${coreversion.info.entry.revision}
    96                 **
    97                 -->
    98         <target name="core-info">
    99                 <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
    100                         <env key="LANG" value="C"/>
    101                         <arg value="info"/>
    102                         <arg value="--xml"/>
    103                         <arg value="../../core"/>
    104                 </exec>
    105                 <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
    106                 <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
    107                 <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
    108                 <delete file="core.info.xml" />
    109         </target>
    110 
    111         <!--
    112                 ** commits the source tree for this plugin
    113                 -->
    114         <target name="commit-current">
    115                 <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
    116                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    117                         <env key="LANG" value="C"/>
    118                         <arg value="commit"/>
    119                         <arg value="-m '${commit.message}'"/>
    120                         <arg value="."/>
    121                 </exec>
    122         </target>
    123 
    124         <!--
    125                 ** updates (svn up) the source tree for this plugin
    126                 -->
    127         <target name="update-current">
    128                 <echo>Updating plugin source ...</echo>
    129                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    130                         <env key="LANG" value="C"/>
    131                         <arg value="up"/>
    132                         <arg value="."/>
    133                 </exec>
    134                 <echo>Updating ${plugin.jar} ...</echo>
    135                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    136                         <env key="LANG" value="C"/>
    137                         <arg value="up"/>
    138                         <arg value="../dist/${plugin.jar}"/>
    139                 </exec>
    140         </target>
    141 
    142         <!--
    143                 ** commits the plugin.jar
    144                 -->
    145         <target name="commit-dist">
    146                 <echo>
    147         ***** Properties of published ${plugin.jar} *****
    148         Commit message    : '${commit.message}'                                 
    149         Plugin-Mainversion: ${plugin.main.version}
    150         JOSM build version: ${coreversion.info.entry.revision}
    151         Plugin-Version    : ${version.entry.commit.revision}
    152         ***** / Properties of published ${plugin.jar} *****                                     
    153                                                
    154         Now commiting ${plugin.jar} ...
    155         </echo>
    156                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    157                         <env key="LANG" value="C"/>
    158                         <arg value="-m '${commit.message}'"/>
    159                         <arg value="commit"/>
    160                         <arg value="${plugin.jar}"/>
    161                 </exec>
    162         </target>
    163 
    164         <!-- ** make sure svn is present as a command line tool ** -->
    165         <target name="ensure-svn-present">
    166                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
    167                         <env key="LANG" value="C" />
    168                         <arg value="--version" />
    169                 </exec>
    170                 <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
    171                         <!-- return code not set at all? Most likely svn isn't installed -->
    172                         <condition>
    173                                 <not>
    174                                         <isset property="svn.exit.code" />
    175                                 </not>
    176                         </condition>
    177                 </fail>
    178                 <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
    179                         <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
    180                         <condition>
    181                                 <isfailure code="${svn.exit.code}" />
    182                         </condition>
    183                 </fail>
    184         </target>
    185 
    186         <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
    187         </target>
     31    <!-- enter the SVN commit message -->
     32    <property name="commit.message" value="Changed the constructor signature of the plugin main class"/>
     33    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
     34    <property name="plugin.main.version" value="3835"/>
     35    <property name="josm" location="../../core/dist/josm-custom.jar"/>
     36    <property name="plugin.dist.dir" value="../../dist"/>
     37    <property name="plugin.build.dir" value="build"/>
     38    <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/>
     39    <property name="ant.build.javac.target" value="1.5"/>
     40    <target name="init">
     41        <mkdir dir="${plugin.build.dir}"/>
     42    </target>
     43    <target name="compile" depends="init">
     44        <echo message="creating ${plugin.jar}"/>
     45        <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}">
     46            <compilerarg value="-Xlint:deprecation"/>
     47            <compilerarg value="-Xlint:unchecked"/>
     48        </javac>
     49    </target>
     50    <target name="dist" depends="compile,revision">
     51        <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
     52            <manifest>
     53                <attribute name="Author" value="Imi, David Earl"/>
     54                <attribute name="Plugin-Class" value="nearclick.NearClickPlugin"/>
     55                <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
     56                <attribute name="Plugin-Description" value="Simulates a click when you do a small and short drag. This is useful for tablet pens, when you have problems just clicking the tablet without the mouse moving (general Java - tablet problem)."/>
     57                <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/index.php/JOSM/Plugins/Nearclick"/>
     58                <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
     59                <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
     60            </manifest>
     61        </jar>
     62    </target>
     63    <target name="revision">
     64        <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
     65            <env key="LANG" value="C"/>
     66            <arg value="info"/>
     67            <arg value="--xml"/>
     68            <arg value="."/>
     69        </exec>
     70        <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
     71        <delete file="REVISION"/>
     72    </target>
     73    <target name="clean">
     74        <delete dir="${plugin.build.dir}"/>
     75        <delete file="${plugin.jar}"/>
     76    </target>
     77    <target name="install" depends="dist">
     78        <property environment="env"/>
     79        <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
     80            <and>
     81                <os family="windows"/>
     82            </and>
     83        </condition>
     84        <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
     85    </target>
     86    <!--
     87    ************************** Publishing the plugin ***********************************
     88    -->
     89    <!--
     90        ** extracts the JOSM release for the JOSM version in ../core and saves it in the
     91        ** property ${coreversion.info.entry.revision}
     92        **
     93        -->
     94    <target name="core-info">
     95        <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
     96            <env key="LANG" value="C"/>
     97            <arg value="info"/>
     98            <arg value="--xml"/>
     99            <arg value="../../core"/>
     100        </exec>
     101        <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
     102        <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
     103        <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
     104        <delete file="core.info.xml"/>
     105    </target>
     106    <!--
     107        ** commits the source tree for this plugin
     108        -->
     109    <target name="commit-current">
     110        <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
     111        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     112            <env key="LANG" value="C"/>
     113            <arg value="commit"/>
     114            <arg value="-m '${commit.message}'"/>
     115            <arg value="."/>
     116        </exec>
     117    </target>
     118    <!--
     119        ** updates (svn up) the source tree for this plugin
     120        -->
     121    <target name="update-current">
     122        <echo>Updating plugin source ...</echo>
     123        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     124            <env key="LANG" value="C"/>
     125            <arg value="up"/>
     126            <arg value="."/>
     127        </exec>
     128        <echo>Updating ${plugin.jar} ...</echo>
     129        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     130            <env key="LANG" value="C"/>
     131            <arg value="up"/>
     132            <arg value="../dist/${plugin.jar}"/>
     133        </exec>
     134    </target>
     135    <!--
     136        ** commits the plugin.jar
     137        -->
     138    <target name="commit-dist">
     139        <echo>
     140    ***** Properties of published ${plugin.jar} *****
     141    Commit message    : '${commit.message}'                 
     142    Plugin-Mainversion: ${plugin.main.version}
     143    JOSM build version: ${coreversion.info.entry.revision}
     144    Plugin-Version    : ${version.entry.commit.revision}
     145    ***** / Properties of published ${plugin.jar} *****                 
     146                       
     147    Now commiting ${plugin.jar} ...
     148    </echo>
     149        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     150            <env key="LANG" value="C"/>
     151            <arg value="-m '${commit.message}'"/>
     152            <arg value="commit"/>
     153            <arg value="${plugin.jar}"/>
     154        </exec>
     155    </target>
     156    <!-- ** make sure svn is present as a command line tool ** -->
     157    <target name="ensure-svn-present">
     158        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
     159            <env key="LANG" value="C"/>
     160            <arg value="--version"/>
     161        </exec>
     162        <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
     163            <!-- return code not set at all? Most likely svn isn't installed -->
     164            <condition>
     165                <not>
     166                    <isset property="svn.exit.code"/>
     167                </not>
     168            </condition>
     169        </fail>
     170        <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
     171            <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
     172            <condition>
     173                <isfailure code="${svn.exit.code}"/>
     174            </condition>
     175        </fail>
     176    </target>
     177    <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
     178    </target>
    188179</project>
  • applications/editors/josm/plugins/openstreetbugs/build.xml

    r25199 r26174  
    1 <?xml version="1.0" encoding="UTF-8"?>
     1<?xml version="1.0" encoding="utf-8"?>
    22<!--
    33** This is the build file for the openstreetbugs plugin
     
    2626-->
    2727<project name="openstreetbugs" default="dist" basedir=".">
     28    <property name="commit.message" value="Changed the constructor signature of the plugin main class"/>
     29    <property name="plugin.main.version" value="3835"/>
     30    <property name="josm" location="../../core/dist/josm-custom.jar"/>
     31    <property name="plugin.dist.dir" value="../../dist"/>
     32    <property name="plugin.build.dir" value="build"/>
     33    <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/>
     34    <property name="ant.build.javac.target" value="1.5"/>
     35    <target name="init">
     36        <mkdir dir="${plugin.build.dir}"/>
     37    </target>
     38    <target name="compile" depends="init">
     39        <echo message="creating ${plugin.jar}"/>
     40        <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}">
     41            <compilerarg value="-Xlint:deprecation"/>
     42            <compilerarg value="-Xlint:unchecked"/>
     43        </javac>
     44    </target>
     45    <target name="dist" depends="compile,revision">
     46        <copy todir="${plugin.build.dir}/images">
     47            <fileset dir="images"/>
     48        </copy>
     49        <copy todir="${plugin.build.dir}/data">
     50            <fileset dir="data"/>
     51        </copy>
     52        <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
     53            <manifest>
     54                <attribute name="Author" value="Henrik Niehaus"/>
     55                <attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.osb.OsbPlugin"/>
     56                <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
     57                <attribute name="Plugin-Description" value="Imports issues from OpenStreetBugs"/>
     58                <attribute name="Plugin-Icon" value="images/dialogs/icon_error24.png"/>
     59                <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/index.php/JOSM/Plugins/OpenStreetBugs"/>
     60                <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
     61                <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
     62            </manifest>
     63        </jar>
     64    </target>
     65    <target name="revision">
     66        <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
     67            <env key="LANG" value="C"/>
     68            <arg value="info"/>
     69            <arg value="--xml"/>
     70            <arg value="."/>
     71        </exec>
     72        <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
     73        <delete file="REVISION"/>
     74    </target>
     75    <target name="clean">
     76        <delete dir="${plugin.build.dir}"/>
     77        <delete file="${plugin.jar}"/>
     78    </target>
     79    <target name="install" depends="dist">
     80        <property environment="env"/>
     81        <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
     82            <and>
     83                <os family="windows"/>
     84            </and>
     85        </condition>
     86        <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
     87    </target>
     88    <!--
     89         ************************** Publishing the plugin ***********************************
     90        -->
     91    <!--
     92        ** extracts the JOSM release for the JOSM version in ../core and saves it in the
     93        ** property ${coreversion.info.entry.revision}
     94        **
     95        -->
     96    <target name="core-info">
     97        <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
     98            <env key="LANG" value="C"/>
     99            <arg value="info"/>
     100            <arg value="--xml"/>
     101            <arg value="../../core"/>
     102        </exec>
     103        <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
     104        <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
     105        <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
     106        <delete file="core.info.xml"/>
     107    </target>
     108    <!--
     109        ** commits the source tree for this plugin
     110        -->
     111    <target name="commit-current">
     112        <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
     113        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     114            <env key="LANG" value="C"/>
     115            <arg value="commit"/>
     116            <arg value="-m '${commit.message}'"/>
     117            <arg value="."/>
     118        </exec>
     119    </target>
     120    <!--
     121        ** updates (svn up) the source tree for this plugin
     122        -->
     123    <target name="update-current">
     124        <echo>Updating plugin source ...</echo>
     125        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     126            <env key="LANG" value="C"/>
     127            <arg value="up"/>
     128            <arg value="."/>
     129        </exec>
     130        <echo>Updating ${plugin.jar} ...</echo>
     131        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     132            <env key="LANG" value="C"/>
     133            <arg value="up"/>
     134            <arg value="../dist/${plugin.jar}"/>
     135        </exec>
     136    </target>
     137    <!--
     138        ** commits the plugin.jar
     139        -->
     140    <target name="commit-dist">
     141        <echo>
     142    ***** Properties of published ${plugin.jar} *****
     143    Commit message    : '${commit.message}'
     144    Plugin-Mainversion: ${plugin.main.version}
     145    JOSM build version: ${coreversion.info.entry.revision}
     146    Plugin-Version    : ${version.entry.commit.revision}
     147    ***** / Properties of published ${plugin.jar} *****
    28148
    29         <property name="commit.message" value="Changed the constructor signature of the plugin main class" />
    30         <property name="plugin.main.version" value="3835" />
    31 
    32         <property name="josm"                   location="../../core/dist/josm-custom.jar"/>
    33         <property name="plugin.dist.dir"        value="../../dist"/>
    34         <property name="plugin.build.dir"       value="build"/>
    35         <property name="plugin.jar"             value="${plugin.dist.dir}/${ant.project.name}.jar"/>
    36         <property name="ant.build.javac.target" value="1.5"/>
    37         <target name="init">
    38                 <mkdir dir="${plugin.build.dir}"/>
    39         </target>
    40         <target name="compile" depends="init">
    41                 <echo message="creating ${plugin.jar}"/>
    42                 <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}">
    43                         <compilerarg value="-Xlint:deprecation"/>
    44                         <compilerarg value="-Xlint:unchecked"/>
    45                 </javac>
    46         </target>
    47         <target name="dist" depends="compile,revision">
    48                 <copy todir="${plugin.build.dir}/images">
    49                         <fileset dir="images"/>
    50                 </copy>
    51                 <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
    52                         <manifest>
    53                                 <attribute name="Author" value="Henrik Niehaus"/>
    54                                 <attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.osb.OsbPlugin"/>
    55                                 <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
    56                                 <attribute name="Plugin-Description" value="Imports issues from OpenStreetBugs"/>
    57                                 <attribute name="Plugin-Icon" value="images/dialogs/icon_error24.png"/>
    58                                 <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/index.php/JOSM/Plugins/OpenStreetBugs"/>
    59                                 <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
    60                                 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
    61                         </manifest>
    62                 </jar>
    63         </target>
    64         <target name="revision">
    65                 <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
    66                         <env key="LANG" value="C"/>
    67                         <arg value="info"/>
    68                         <arg value="--xml"/>
    69                         <arg value="."/>
    70                 </exec>
    71                 <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
    72                 <delete file="REVISION"/>
    73         </target>
    74         <target name="clean">
    75                 <delete dir="${plugin.build.dir}"/>
    76                 <delete file="${plugin.jar}"/>
    77         </target>
    78         <target name="install" depends="dist">
    79                 <property environment="env"/>
    80                 <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
    81                         <and>
    82                                 <os family="windows"/>
    83                         </and>
    84                 </condition>
    85                 <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
    86         </target>
    87 
    88         <!--
    89                  ************************** Publishing the plugin ***********************************
    90                 -->
    91         <!--
    92                 ** extracts the JOSM release for the JOSM version in ../core and saves it in the
    93                 ** property ${coreversion.info.entry.revision}
    94                 **
    95                 -->
    96         <target name="core-info">
    97                 <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
    98                         <env key="LANG" value="C"/>
    99                         <arg value="info"/>
    100                         <arg value="--xml"/>
    101                         <arg value="../../core"/>
    102                 </exec>
    103                 <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
    104                 <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
    105                 <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
    106                 <delete file="core.info.xml" />
    107         </target>
    108 
    109         <!--
    110                 ** commits the source tree for this plugin
    111                 -->
    112         <target name="commit-current">
    113                 <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
    114                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    115                         <env key="LANG" value="C"/>
    116                         <arg value="commit"/>
    117                         <arg value="-m '${commit.message}'"/>
    118                         <arg value="."/>
    119                 </exec>
    120         </target>
    121 
    122         <!--
    123                 ** updates (svn up) the source tree for this plugin
    124                 -->
    125         <target name="update-current">
    126                 <echo>Updating plugin source ...</echo>
    127                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    128                         <env key="LANG" value="C"/>
    129                         <arg value="up"/>
    130                         <arg value="."/>
    131                 </exec>
    132                 <echo>Updating ${plugin.jar} ...</echo>
    133                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    134                         <env key="LANG" value="C"/>
    135                         <arg value="up"/>
    136                         <arg value="../dist/${plugin.jar}"/>
    137                 </exec>
    138         </target>
    139 
    140         <!--
    141                 ** commits the plugin.jar
    142                 -->
    143         <target name="commit-dist">
    144                 <echo>
    145         ***** Properties of published ${plugin.jar} *****
    146         Commit message    : '${commit.message}'
    147         Plugin-Mainversion: ${plugin.main.version}
    148         JOSM build version: ${coreversion.info.entry.revision}
    149         Plugin-Version    : ${version.entry.commit.revision}
    150         ***** / Properties of published ${plugin.jar} *****
    151 
    152         Now commiting ${plugin.jar} ...
    153         </echo>
    154                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    155                         <env key="LANG" value="C"/>
    156                         <arg value="-m '${commit.message}'"/>
    157                         <arg value="commit"/>
    158                         <arg value="${plugin.jar}"/>
    159                 </exec>
    160         </target>
    161 
    162         <!-- ** make sure svn is present as a command line tool ** -->
    163         <target name="ensure-svn-present">
    164                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
    165                         <env key="LANG" value="C" />
    166                         <arg value="--version" />
    167                 </exec>
    168                 <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
    169                         <!-- return code not set at all? Most likely svn isn't installed -->
    170                         <condition>
    171                                 <not>
    172                                         <isset property="svn.exit.code" />
    173                                 </not>
    174                         </condition>
    175                 </fail>
    176                 <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
    177                         <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
    178                         <condition>
    179                                 <isfailure code="${svn.exit.code}" />
    180                         </condition>
    181                 </fail>
    182         </target>
    183 
    184         <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
    185         </target>
     149    Now commiting ${plugin.jar} ...
     150    </echo>
     151        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     152            <env key="LANG" value="C"/>
     153            <arg value="-m '${commit.message}'"/>
     154            <arg value="commit"/>
     155            <arg value="${plugin.jar}"/>
     156        </exec>
     157    </target>
     158    <!-- ** make sure svn is present as a command line tool ** -->
     159    <target name="ensure-svn-present">
     160        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
     161            <env key="LANG" value="C"/>
     162            <arg value="--version"/>
     163        </exec>
     164        <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
     165            <!-- return code not set at all? Most likely svn isn't installed -->
     166            <condition>
     167                <not>
     168                    <isset property="svn.exit.code"/>
     169                </not>
     170            </condition>
     171        </fail>
     172        <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
     173            <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
     174            <condition>
     175                <isfailure code="${svn.exit.code}"/>
     176            </condition>
     177        </fail>
     178    </target>
     179    <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
     180    </target>
    186181</project>
  • applications/editors/josm/plugins/openvisible/build.xml

    r25192 r26174  
    1 <?xml version="1.0" encoding="UTF-8"?>
     1<?xml version="1.0" encoding="utf-8"?>
    22<!--
    33** This is the build file for the openvisible plugin.
     
    2929-->
    3030<project name="openvisible" default="dist" basedir=".">
    31 
    32         <!-- enter the SVN commit message -->
    33         <property name="commit.message" value="Changed the constructor signature of the plugin main class; updated build.xml" />
    34         <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    35         <property name="plugin.main.version" value="3835" />
    36 
    37         <property name="josm"                   location="../../core/dist/josm-custom.jar"/>
    38         <property name="plugin.dist.dir"        value="../../dist"/>
    39         <property name="plugin.build.dir"       value="build"/>
    40         <property name="plugin.jar"             value="${plugin.dist.dir}/${ant.project.name}.jar"/>
    41         <property name="ant.build.javac.target" value="1.5"/>
    42         <target name="init">
    43                 <mkdir dir="${plugin.build.dir}"/>
    44         </target>
    45         <target name="compile" depends="init">
    46                 <echo message="creating ${plugin.jar}"/>
    47                 <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}">
    48                         <compilerarg value="-Xlint:deprecation"/>
    49                         <compilerarg value="-Xlint:unchecked"/>
    50                 </javac>
    51         </target>
    52         <target name="dist" depends="compile,revision">
    53                 <copy todir="${plugin.build.dir}/images">
    54                         <fileset dir="images"/>
    55                 </copy>
    56                 <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
    57                         <manifest>
    58                                 <attribute name="Author" value="Christof Dallermassl"/>
    59                                 <attribute name="Plugin-Class" value="at.dallermassl.josm.plugin.openvisible.OpenVisiblePlugin"/>
    60                                 <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
    61                                 <attribute name="Plugin-Dependencies" value="jgrapht-jdk1.5"/>
    62                                 <attribute name="Plugin-Description" value="Allows opening gpx/osm files that intersect the currently visible screen area"/>
    63                                 <attribute name="Plugin-Icon" value="images/openvisible.png"/>
    64                                 <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
    65                                 <attribute name="Plugin-Stage" value="50"/>
    66                                 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
    67                         </manifest>
    68                 </jar>
    69         </target>
    70         <target name="revision">
    71                 <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
    72                         <env key="LANG" value="C"/>
    73                         <arg value="info"/>
    74                         <arg value="--xml"/>
    75                         <arg value="."/>
    76                 </exec>
    77                 <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
    78                 <delete file="REVISION"/>
    79         </target>
    80         <target name="clean">
    81                 <delete dir="${plugin.build.dir}"/>
    82                 <delete file="${plugin.jar}"/>
    83         </target>
    84         <target name="install" depends="dist">
    85                 <property environment="env"/>
    86                 <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
    87                         <and>
    88                                 <os family="windows"/>
    89                         </and>
    90                 </condition>
    91                 <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
    92         </target>
    93 
    94         <!--
    95         ************************** Publishing the plugin ***********************************
    96         -->
    97         <!--
    98                 ** extracts the JOSM release for the JOSM version in ../core and saves it in the
    99                 ** property ${coreversion.info.entry.revision}
    100                 **
    101                 -->
    102         <target name="core-info">
    103                 <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
    104                         <env key="LANG" value="C"/>
    105                         <arg value="info"/>
    106                         <arg value="--xml"/>
    107                         <arg value="../../core"/>
    108                 </exec>
    109                 <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
    110                 <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
    111                 <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
    112                 <delete file="core.info.xml" />
    113         </target>
    114 
    115         <!--
    116                 ** commits the source tree for this plugin
    117                 -->
    118         <target name="commit-current">
    119                 <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
    120                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    121                         <env key="LANG" value="C"/>
    122                         <arg value="commit"/>
    123                         <arg value="-m '${commit.message}'"/>
    124                         <arg value="."/>
    125                 </exec>
    126         </target>
    127 
    128         <!--
    129                 ** updates (svn up) the source tree for this plugin
    130                 -->
    131         <target name="update-current">
    132                 <echo>Updating plugin source ...</echo>
    133                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    134                         <env key="LANG" value="C"/>
    135                         <arg value="up"/>
    136                         <arg value="."/>
    137                 </exec>
    138                 <echo>Updating ${plugin.jar} ...</echo>
    139                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    140                         <env key="LANG" value="C"/>
    141                         <arg value="up"/>
    142                         <arg value="../dist/${plugin.jar}"/>
    143                 </exec>
    144         </target>
    145 
    146         <!--
    147                 ** commits the plugin.jar
    148                 -->
    149         <target name="commit-dist">
    150                 <echo>
    151         ***** Properties of published ${plugin.jar} *****
    152         Commit message    : '${commit.message}'                                 
    153         Plugin-Mainversion: ${plugin.main.version}
    154         JOSM build version: ${coreversion.info.entry.revision}
    155         Plugin-Version    : ${version.entry.commit.revision}
    156         ***** / Properties of published ${plugin.jar} *****                                     
    157                                                
    158         Now commiting ${plugin.jar} ...
    159         </echo>
    160                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    161                         <env key="LANG" value="C"/>
    162                         <arg value="-m '${commit.message}'"/>
    163                         <arg value="commit"/>
    164                         <arg value="${plugin.jar}"/>
    165                 </exec>
    166         </target>
    167 
    168         <!-- ** make sure svn is present as a command line tool ** -->
    169         <target name="ensure-svn-present">
    170                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
    171                         <env key="LANG" value="C" />
    172                         <arg value="--version" />
    173                 </exec>
    174                 <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
    175                         <!-- return code not set at all? Most likely svn isn't installed -->
    176                         <condition>
    177                                 <not>
    178                                         <isset property="svn.exit.code" />
    179                                 </not>
    180                         </condition>
    181                 </fail>
    182                 <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
    183                         <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
    184                         <condition>
    185                                 <isfailure code="${svn.exit.code}" />
    186                         </condition>
    187                 </fail>
    188         </target>
    189 
    190         <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
    191         </target>
     31    <!-- enter the SVN commit message -->
     32    <property name="commit.message" value="Changed the constructor signature of the plugin main class; updated build.xml"/>
     33    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
     34    <property name="plugin.main.version" value="3835"/>
     35    <property name="josm" location="../../core/dist/josm-custom.jar"/>
     36    <property name="plugin.dist.dir" value="../../dist"/>
     37    <property name="plugin.build.dir" value="build"/>
     38    <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/>
     39    <property name="ant.build.javac.target" value="1.5"/>
     40    <target name="init">
     41        <mkdir dir="${plugin.build.dir}"/>
     42    </target>
     43    <target name="compile" depends="init">
     44        <echo message="creating ${plugin.jar}"/>
     45        <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}">
     46            <compilerarg value="-Xlint:deprecation"/>
     47            <compilerarg value="-Xlint:unchecked"/>
     48        </javac>
     49    </target>
     50    <target name="dist" depends="compile,revision">
     51        <copy todir="${plugin.build.dir}/images">
     52            <fileset dir="images"/>
     53        </copy>
     54        <copy todir="${plugin.build.dir}/data">
     55            <fileset dir="data"/>
     56        </copy>
     57        <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
     58            <manifest>
     59                <attribute name="Author" value="Christof Dallermassl"/>
     60                <attribute name="Plugin-Class" value="at.dallermassl.josm.plugin.openvisible.OpenVisiblePlugin"/>
     61                <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
     62                <attribute name="Plugin-Dependencies" value="jgrapht-jdk1.5"/>
     63                <attribute name="Plugin-Description" value="Allows opening gpx/osm files that intersect the currently visible screen area"/>
     64                <attribute name="Plugin-Icon" value="images/openvisible.png"/>
     65                <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
     66                <attribute name="Plugin-Stage" value="50"/>
     67                <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
     68            </manifest>
     69        </jar>
     70    </target>
     71    <target name="revision">
     72        <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
     73            <env key="LANG" value="C"/>
     74            <arg value="info"/>
     75            <arg value="--xml"/>
     76            <arg value="."/>
     77        </exec>
     78        <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
     79        <delete file="REVISION"/>
     80    </target>
     81    <target name="clean">
     82        <delete dir="${plugin.build.dir}"/>
     83        <delete file="${plugin.jar}"/>
     84    </target>
     85    <target name="install" depends="dist">
     86        <property environment="env"/>
     87        <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
     88            <and>
     89                <os family="windows"/>
     90            </and>
     91        </condition>
     92        <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
     93    </target>
     94    <!--
     95    ************************** Publishing the plugin ***********************************
     96    -->
     97    <!--
     98        ** extracts the JOSM release for the JOSM version in ../core and saves it in the
     99        ** property ${coreversion.info.entry.revision}
     100        **
     101        -->
     102    <target name="core-info">
     103        <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
     104            <env key="LANG" value="C"/>
     105            <arg value="info"/>
     106            <arg value="--xml"/>
     107            <arg value="../../core"/>
     108        </exec>
     109        <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
     110        <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
     111        <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
     112        <delete file="core.info.xml"/>
     113    </target>
     114    <!--
     115        ** commits the source tree for this plugin
     116        -->
     117    <target name="commit-current">
     118        <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
     119        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     120            <env key="LANG" value="C"/>
     121            <arg value="commit"/>
     122            <arg value="-m '${commit.message}'"/>
     123            <arg value="."/>
     124        </exec>
     125    </target>
     126    <!--
     127        ** updates (svn up) the source tree for this plugin
     128        -->
     129    <target name="update-current">
     130        <echo>Updating plugin source ...</echo>
     131        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     132            <env key="LANG" value="C"/>
     133            <arg value="up"/>
     134            <arg value="."/>
     135        </exec>
     136        <echo>Updating ${plugin.jar} ...</echo>
     137        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     138            <env key="LANG" value="C"/>
     139            <arg value="up"/>
     140            <arg value="../dist/${plugin.jar}"/>
     141        </exec>
     142    </target>
     143    <!--
     144        ** commits the plugin.jar
     145        -->
     146    <target name="commit-dist">
     147        <echo>
     148    ***** Properties of published ${plugin.jar} *****
     149    Commit message    : '${commit.message}'                 
     150    Plugin-Mainversion: ${plugin.main.version}
     151    JOSM build version: ${coreversion.info.entry.revision}
     152    Plugin-Version    : ${version.entry.commit.revision}
     153    ***** / Properties of published ${plugin.jar} *****                 
     154                       
     155    Now commiting ${plugin.jar} ...
     156    </echo>
     157        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     158            <env key="LANG" value="C"/>
     159            <arg value="-m '${commit.message}'"/>
     160            <arg value="commit"/>
     161            <arg value="${plugin.jar}"/>
     162        </exec>
     163    </target>
     164    <!-- ** make sure svn is present as a command line tool ** -->
     165    <target name="ensure-svn-present">
     166        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
     167            <env key="LANG" value="C"/>
     168            <arg value="--version"/>
     169        </exec>
     170        <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
     171            <!-- return code not set at all? Most likely svn isn't installed -->
     172            <condition>
     173                <not>
     174                    <isset property="svn.exit.code"/>
     175                </not>
     176            </condition>
     177        </fail>
     178        <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
     179            <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
     180            <condition>
     181                <isfailure code="${svn.exit.code}"/>
     182            </condition>
     183        </fail>
     184    </target>
     185    <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
     186    </target>
    192187</project>
  • applications/editors/josm/plugins/osmarender/build.xml

    r25192 r26174  
     1<?xml version="1.0" encoding="utf-8"?>
    12<!--
    23** This is a template build file for the osmarender plugin
     
    2526-->
    2627<project name="osmarender" default="install" basedir=".">
    27         <property name="josm" location="../../core/dist/josm-custom.jar" />
    28         <property name="plugin.dist.dir" value="../../dist" />
    29         <property name="plugin.build.dir" value="build" />
    30         <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar" />
    31         <property name="ant.build.javac.target" value="1.5" />
    32         <property name="stylesheets" location="./stylesheets" />
    33         <property name="xslt" location="./xslt" />
     28    <property name="josm" location="../../core/dist/josm-custom.jar"/>
     29    <property name="plugin.dist.dir" value="../../dist"/>
     30    <property name="plugin.build.dir" value="build"/>
     31    <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/>
     32    <property name="ant.build.javac.target" value="1.5"/>
     33    <property name="stylesheets" location="./stylesheets"/>
     34    <property name="xslt" location="./xslt"/>
     35    <property name="commit.message" value="Fixed #4360 - osmarender plugin does not load"/>
     36    <property name="plugin.main.version" value="3835"/>
     37    <target name="init">
     38        <mkdir dir="${plugin.build.dir}"/>
     39    </target>
     40    <target name="compile" depends="init">
     41        <echo message="creating ${plugin.jar}"/>
     42        <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}">
     43            <compilerarg value="-Xlint:deprecation"/>
     44            <compilerarg value="-Xlint:unchecked"/>
     45        </javac>
     46    </target>
     47    <target name="copy-styles">
     48        <copy todir="${plugin.build.dir}" file="${xslt}/osmarender.xsl"/>
     49        <copy tofile="${plugin.build.dir}/osm-map-features.xml" file="${stylesheets}/osm-map-features-z17.xml"/>
     50    </target>
     51    <target name="dist" depends="compile,revision,copy-styles">
     52        <copy todir="${plugin.build.dir}/data">
     53            <fileset dir="data"/>
     54        </copy>
     55        <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
     56            <manifest>
     57                <attribute name="Author" value="80n"/>
     58                <attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.osmarender.OsmarenderPlugin"/>
     59                <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
     60                <attribute name="Plugin-Description" value="Launches FireFox to display the current visible screen as a nice SVG image."/>
     61                <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
     62                <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
     63            </manifest>
     64        </jar>
     65    </target>
     66    <target name="revision">
     67        <exec append="false" output="REVISION" executable="perl" failifexecutionfails="false">
     68            <env key="LANG" value="C"/>
     69            <arg value="../getrevision.pl"/>
     70            <arg value="xslt"/>
     71            <arg value="stylesheets"/>
     72            <arg value="."/>
     73        </exec>
     74        <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
     75        <exec append="false" output="REVISION" executable="svn" failifexecutionfails="true" failonerror="true">
     76            <env key="LANG" value="C"/>
     77            <arg value="info"/>
     78            <arg value="--xml"/>
     79            <arg value="."/>
     80        </exec>
     81        <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
     82        <echo message="Revision is ${version.entry.commit.revision}"/>
     83        <delete file="REVISION"/>
     84    </target>
     85    <target name="clean">
     86        <delete dir="${plugin.build.dir}"/>
     87        <delete file="${plugin.jar}"/>
     88    </target>
     89    <target name="install" depends="dist">
     90        <property environment="env"/>
     91        <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
     92            <and>
     93                <os family="windows"/>
     94            </and>
     95        </condition>
     96        <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
     97    </target>
     98    <!--
     99         ************************** Publishing the plugin ***********************************
     100        -->
     101    <!--
     102        ** extracts the JOSM release for the JOSM version in ../core and saves it in the
     103        ** property ${coreversion.info.entry.revision}
     104        **
     105        -->
     106    <target name="core-info">
     107        <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
     108            <env key="LANG" value="C"/>
     109            <arg value="info"/>
     110            <arg value="--xml"/>
     111            <arg value="../../core"/>
     112        </exec>
     113        <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
     114        <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
     115        <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
     116        <delete file="core.info.xml"/>
     117    </target>
     118    <!--
     119        ** commits the source tree for this plugin
     120        -->
     121    <target name="commit-current">
     122        <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
     123        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     124            <env key="LANG" value="C"/>
     125            <arg value="commit"/>
     126            <arg value="-m '${commit.message}'"/>
     127            <arg value="."/>
     128        </exec>
     129    </target>
     130    <!--
     131        ** updates (svn up) the source tree for this plugin
     132        -->
     133    <target name="update-current">
     134        <echo>Updating plugin source ...</echo>
     135        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     136            <env key="LANG" value="C"/>
     137            <arg value="up"/>
     138            <arg value="."/>
     139        </exec>
     140        <echo>Updating ${plugin.jar} ...</echo>
     141        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     142            <env key="LANG" value="C"/>
     143            <arg value="up"/>
     144            <arg value="../dist/${plugin.jar}"/>
     145        </exec>
     146    </target>
     147    <!--
     148        ** commits the plugin.jar
     149        -->
     150    <target name="commit-dist">
     151        <echo>
     152    ***** Properties of published ${plugin.jar} *****
     153    Commit message    : '${commit.message}'
     154    Plugin-Mainversion: ${plugin.main.version}
     155    JOSM build version: ${coreversion.info.entry.revision}
     156    Plugin-Version    : ${version.entry.commit.revision}
     157    ***** / Properties of published ${plugin.jar} *****
    34158
    35 
    36         <property name="commit.message" value="Fixed #4360 - osmarender plugin does not load" />
    37         <property name="plugin.main.version" value="3835" />
    38 
    39         <target name="init">
    40                 <mkdir dir="${plugin.build.dir}" />
    41         </target>
    42 
    43         <target name="compile" depends="init">
    44                 <echo message="creating ${plugin.jar}" />
    45                 <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}">
    46                         <compilerarg value="-Xlint:deprecation" />
    47                         <compilerarg value="-Xlint:unchecked" />
    48                 </javac>
    49         </target>
    50         <target name="copy-styles">
    51                 <copy todir="${plugin.build.dir}" file="${xslt}/osmarender.xsl" />
    52                 <copy tofile="${plugin.build.dir}/osm-map-features.xml" file="${stylesheets}/osm-map-features-z17.xml" />
    53         </target>
    54         <target name="dist" depends="compile,revision,copy-styles">
    55                 <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
    56                         <manifest>
    57                                 <attribute name="Author" value="80n" />
    58                                 <attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.osmarender.OsmarenderPlugin" />
    59                                 <attribute name="Plugin-Date" value="${version.entry.commit.date}" />
    60                                 <attribute name="Plugin-Description" value="Launches FireFox to display the current visible screen as a nice SVG image." />
    61                                 <attribute name="Plugin-Mainversion" value="${plugin.main.version}" />
    62                                 <attribute name="Plugin-Version" value="${version.entry.commit.revision}" />
    63                         </manifest>
    64                 </jar>
    65         </target>
    66         <target name="revision">
    67                 <exec append="false" output="REVISION" executable="perl" failifexecutionfails="false">
    68                         <env key="LANG" value="C"/>
    69                         <arg value="../getrevision.pl"/>
    70                         <arg value="xslt"/>
    71                         <arg value="stylesheets"/>
    72                         <arg value="." />
    73                 </exec>
    74                 <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true" />
    75                 <exec append="false" output="REVISION" executable="svn" failifexecutionfails="true" failonerror="true">
    76                         <env key="LANG" value="C" />
    77                         <arg value="info" />
    78                         <arg value="--xml" />
    79                         <arg value="." />
    80                 </exec>
    81                 <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true" />
    82                 <echo message="Revision is ${version.entry.commit.revision}" />
    83                 <delete file="REVISION" />
    84         </target>
    85         <target name="clean">
    86                 <delete dir="${plugin.build.dir}" />
    87                 <delete file="${plugin.jar}" />
    88         </target>
    89         <target name="install" depends="dist">
    90                 <property environment="env" />
    91                 <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
    92                         <and>
    93                                 <os family="windows" />
    94                         </and>
    95                 </condition>
    96                 <copy file="${plugin.jar}" todir="${josm.plugins.dir}" />
    97         </target>
    98 
    99         <!--
    100                  ************************** Publishing the plugin ***********************************
    101                 -->
    102         <!--
    103                 ** extracts the JOSM release for the JOSM version in ../core and saves it in the
    104                 ** property ${coreversion.info.entry.revision}
    105                 **
    106                 -->
    107         <target name="core-info">
    108                 <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
    109                         <env key="LANG" value="C"/>
    110                         <arg value="info"/>
    111                         <arg value="--xml"/>
    112                         <arg value="../../core"/>
    113                 </exec>
    114                 <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
    115                 <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
    116                 <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
    117                 <delete file="core.info.xml" />
    118         </target>
    119 
    120         <!--
    121                 ** commits the source tree for this plugin
    122                 -->
    123         <target name="commit-current">
    124                 <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
    125                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    126                         <env key="LANG" value="C"/>
    127                         <arg value="commit"/>
    128                         <arg value="-m '${commit.message}'"/>
    129                         <arg value="."/>
    130                 </exec>
    131         </target>
    132 
    133         <!--
    134                 ** updates (svn up) the source tree for this plugin
    135                 -->
    136         <target name="update-current">
    137                 <echo>Updating plugin source ...</echo>
    138                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    139                         <env key="LANG" value="C"/>
    140                         <arg value="up"/>
    141                         <arg value="."/>
    142                 </exec>
    143                 <echo>Updating ${plugin.jar} ...</echo>
    144                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    145                         <env key="LANG" value="C"/>
    146                         <arg value="up"/>
    147                         <arg value="../dist/${plugin.jar}"/>
    148                 </exec>
    149         </target>
    150 
    151         <!--
    152                 ** commits the plugin.jar
    153                 -->
    154         <target name="commit-dist">
    155                 <echo>
    156         ***** Properties of published ${plugin.jar} *****
    157         Commit message    : '${commit.message}'
    158         Plugin-Mainversion: ${plugin.main.version}
    159         JOSM build version: ${coreversion.info.entry.revision}
    160         Plugin-Version    : ${version.entry.commit.revision}
    161         ***** / Properties of published ${plugin.jar} *****
    162 
    163         Now commiting ${plugin.jar} ...
    164         </echo>
    165                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    166                         <env key="LANG" value="C"/>
    167                         <arg value="-m '${commit.message}'"/>
    168                         <arg value="commit"/>
    169                         <arg value="${plugin.jar}"/>
    170                 </exec>
    171         </target>
    172 
    173         <!-- ** make sure svn is present as a command line tool ** -->
    174         <target name="ensure-svn-present">
    175                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
    176                         <env key="LANG" value="C" />
    177                         <arg value="--version" />
    178                 </exec>
    179                 <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
    180                         <!-- return code not set at all? Most likely svn isn't installed -->
    181                         <condition>
    182                                 <not>
    183                                         <isset property="svn.exit.code" />
    184                                 </not>
    185                         </condition>
    186                 </fail>
    187                 <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
    188                         <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
    189                         <condition>
    190                                 <isfailure code="${svn.exit.code}" />
    191                         </condition>
    192                 </fail>
    193         </target>
    194 
    195         <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
    196         </target>
     159    Now commiting ${plugin.jar} ...
     160    </echo>
     161        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     162            <env key="LANG" value="C"/>
     163            <arg value="-m '${commit.message}'"/>
     164            <arg value="commit"/>
     165            <arg value="${plugin.jar}"/>
     166        </exec>
     167    </target>
     168    <!-- ** make sure svn is present as a command line tool ** -->
     169    <target name="ensure-svn-present">
     170        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
     171            <env key="LANG" value="C"/>
     172            <arg value="--version"/>
     173        </exec>
     174        <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
     175            <!-- return code not set at all? Most likely svn isn't installed -->
     176            <condition>
     177                <not>
     178                    <isset property="svn.exit.code"/>
     179                </not>
     180            </condition>
     181        </fail>
     182        <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
     183            <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
     184            <condition>
     185                <isfailure code="${svn.exit.code}"/>
     186            </condition>
     187        </fail>
     188    </target>
     189    <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
     190    </target>
    197191</project>
  • applications/editors/josm/plugins/pdfimport/build.xml

    r25260 r26174  
    1 <?xml version="1.0" encoding="UTF-8"?>
     1<?xml version="1.0" encoding="utf-8"?>
    22<!--
    33** This is the build file for the pdfimport plugin.
     
    3030-->
    3131<project name="pdfimport" default="dist" basedir=".">
    32 
    33 
    34         <!-- enter the SVN commit message -->
    35         <property name="commit.message" value="Initial pdfimport version" />
    36         <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    37         <property name="plugin.main.version" value="3872" />
    38 
    39 
    40         <!-- compilation properties -->
    41         <property name="josm.build.dir" value="../../core" />
    42         <property name="josm.home.dir" value="${user.home}/.josm" />
    43         <property name="josm" location="../../core/dist/josm-custom.jar" />
    44         <property name="plugin.build.dir" value="build" />
    45         <property name="plugin.dist.dir" value="../../dist" />
    46         <property name="plugin.name" value="${ant.project.name}" />
    47         <property name="libpdf" value="lib/pdfbox.jar"/>               
    48         <property name="plugin.jar" value="${plugin.dist.dir}/${plugin.name}.jar" />
    49 
    50         <!-- There's no josm.jar in the svn, so point "josm" to a local copy of your JOSM binary -->
    51         <property name="josm" location="../../core/dist/josm-custom.jar" />
    52 
    53         <property name="ant.build.javac.target" value="1.5" />
    54 
    55         <target name="init">
    56                 <mkdir dir="${plugin.build.dir}">
    57                 </mkdir>
    58                 <mkdir dir="${plugin.dist.dir}">
    59                 </mkdir>
    60         </target>
    61 
    62         <target name="compile" depends="init">
    63                 <echo message="creating ${plugin.jar}" />
    64                 <javac srcdir="src" target="1.5" destdir="build" debug="true">
    65                         <include name="**/*.java" />
    66                         <classpath>
    67                                 <pathelement location="${josm}"/>
    68                                 <pathelement location="${libpdf}"/>                             
    69                         </classpath>                   
    70                 </javac>
    71         </target>
    72 
    73         <target name="revision">
    74                 <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
    75                         <env key="LANG" value="C" />
    76                         <arg value="info" />
    77                         <arg value="--xml" />
    78                         <arg value="." />
    79                 </exec>
    80                 <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true" />
    81                 <delete file="REVISION" />
    82         </target>
    83 
    84         <target name="dist" depends="compile,revision">
    85                 <unjar dest="${plugin.build.dir}" src="${libpdf}"/>
    86                 <copy todir="${plugin.build.dir}/images">
    87                         <fileset dir="images" />
    88                 </copy>
    89                 <copy todir="${plugin.build.dir}">
    90                         <fileset dir="resources" />
    91                 </copy>
    92 
    93                 <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
    94                         <manifest>
    95                                 <attribute name="Author" value="extropy" />
    96                                 <attribute name="Plugin-Class" value="pdfimport.PdfImportPlugin" />
    97                                 <attribute name="Plugin-Description" value="Import PDF file and convert to ways." />
    98                                 <attribute name="Plugin-Icon" value="images/pdf_import.png"/>
    99                                 <attribute name="Plugin-Version" value="${version.entry.commit.revision}" />
    100                                 <attribute name="Plugin-Date" value="${version.entry.commit.date}" />
    101                                 <attribute name="Plugin-Link" value="http://svn.openstreetmap.org/applications/editors/josm/plugins/pdfimport/" />
    102                                 <attribute name="Plugin-Mainversion" value="${plugin.main.version}" />
    103                         </manifest>
    104                 </jar>
    105         </target>
    106 
    107         <target name="clean">
    108                 <delete dir="${plugin.build.dir}" />
    109                 <delete file="${plugin.jar}" />
    110         </target>
    111 
    112         <target name="clean_install">
    113                 <delete file="${plugins}/pdfimport.jar" />
    114         </target>
    115 
    116         <target name="install" depends="dist">
    117                 <property environment="env" />
    118                 <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
    119                         <and>
    120                                 <os family="windows" />
    121                         </and>
    122                 </condition>
    123                 <copy file="${plugin.jar}" todir="${josm.plugins.dir}" />
    124         </target>
    125 
    126         <!--
    127         ************************** Publishing the plugin ***********************************
    128         -->
    129         <!--
    130                 ** extracts the JOSM release for the JOSM version in ../core and saves it in the
    131                 ** property ${coreversion.info.entry.revision}
    132                 **
    133                 -->
    134         <target name="core-info">
    135                 <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
    136                         <env key="LANG" value="C" />
    137                         <arg value="info" />
    138                         <arg value="--xml" />
    139                         <arg value="../../core" />
    140                 </exec>
    141                 <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true" />
    142                 <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
    143                 <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
    144                 <delete file="core.info.xml" />
    145         </target>
    146 
    147         <!--
    148                 ** commits the source tree for this plugin
    149                 -->
    150         <target name="commit-current">
    151                 <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
    152                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    153                         <env key="LANG" value="C" />
    154                         <arg value="commit" />
    155                         <arg value="-m '${commit.message}'" />
    156                         <arg value="." />
    157                 </exec>
    158         </target>
    159 
    160         <!--
    161                 ** updates (svn up) the source tree for this plugin
    162                 -->
    163         <target name="update-current">
    164                 <echo>Updating plugin source ...</echo>
    165                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    166                         <env key="LANG" value="C" />
    167                         <arg value="up" />
    168                         <arg value="." />
    169                 </exec>
    170                 <echo>Updating ${plugin.jar} ...</echo>
    171                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    172                         <env key="LANG" value="C" />
    173                         <arg value="up" />
    174                         <arg value="../dist/${plugin.jar}" />
    175                 </exec>
    176         </target>
    177 
    178         <!--
    179                 ** commits the plugin.jar
    180                 -->
    181         <target name="commit-dist">
    182                 <echo>
    183         ***** Properties of published ${plugin.jar} *****
    184         Commit message    : '${commit.message}'                                 
    185         Plugin-Mainversion: ${plugin.main.version}
    186         JOSM build version: ${coreversion.info.entry.revision}
    187         Plugin-Version    : ${version.entry.commit.revision}
    188         ***** / Properties of published ${plugin.jar} *****                                     
    189                                                
    190         Now commiting ${plugin.jar} ...
    191         </echo>
    192                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    193                         <env key="LANG" value="C" />
    194                         <arg value="-m '${commit.message}'" />
    195                         <arg value="commit" />
    196                         <arg value="${plugin.jar}" />
    197                 </exec>
    198         </target>
    199 
    200         <!-- ** make sure svn is present as a command line tool ** -->
    201         <target name="ensure-svn-present">
    202                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
    203                         <env key="LANG" value="C" />
    204                         <arg value="--version" />
    205                 </exec>
    206                 <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
    207                         <!-- return code not set at all? Most likely svn isn't installed -->
    208                         <condition>
    209                                 <not>
    210                                         <isset property="svn.exit.code" />
    211                                 </not>
    212                         </condition>
    213                 </fail>
    214                 <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
    215                         <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
    216                         <condition>
    217                                 <isfailure code="${svn.exit.code}" />
    218                         </condition>
    219                 </fail>
    220         </target>
    221 
    222         <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
    223         </target>
    224 
     32    <!-- enter the SVN commit message -->
     33    <property name="commit.message" value="Initial pdfimport version"/>
     34    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
     35    <property name="plugin.main.version" value="3872"/>
     36    <!-- compilation properties -->
     37    <property name="josm.build.dir" value="../../core"/>
     38    <property name="josm.home.dir" value="${user.home}/.josm"/>
     39    <property name="josm" location="../../core/dist/josm-custom.jar"/>
     40    <property name="plugin.build.dir" value="build"/>
     41    <property name="plugin.dist.dir" value="../../dist"/>
     42    <property name="plugin.name" value="${ant.project.name}"/>
     43    <property name="libpdf" value="lib/pdfbox.jar"/>
     44    <property name="plugin.jar" value="${plugin.dist.dir}/${plugin.name}.jar"/>
     45    <!-- There's no josm.jar in the svn, so point "josm" to a local copy of your JOSM binary -->
     46    <property name="josm" location="../../core/dist/josm-custom.jar"/>
     47    <property name="ant.build.javac.target" value="1.5"/>
     48    <target name="init">
     49        <mkdir dir="${plugin.build.dir}">
     50        </mkdir>
     51        <mkdir dir="${plugin.dist.dir}">
     52        </mkdir>
     53    </target>
     54    <target name="compile" depends="init">
     55        <echo message="creating ${plugin.jar}"/>
     56        <javac srcdir="src" target="1.5" destdir="build" debug="true">
     57            <include name="**/*.java"/>
     58            <classpath>
     59                <pathelement location="${josm}"/>
     60                <pathelement location="${libpdf}"/>
     61            </classpath>
     62        </javac>
     63    </target>
     64    <target name="revision">
     65        <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
     66            <env key="LANG" value="C"/>
     67            <arg value="info"/>
     68            <arg value="--xml"/>
     69            <arg value="."/>
     70        </exec>
     71        <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
     72        <delete file="REVISION"/>
     73    </target>
     74    <target name="dist" depends="compile,revision">
     75        <unjar dest="${plugin.build.dir}" src="${libpdf}"/>
     76        <copy todir="${plugin.build.dir}/images">
     77            <fileset dir="images"/>
     78        </copy>
     79        <copy todir="${plugin.build.dir}/data">
     80            <fileset dir="data"/>
     81        </copy>
     82        <copy todir="${plugin.build.dir}">
     83            <fileset dir="resources"/>
     84        </copy>
     85        <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
     86            <manifest>
     87                <attribute name="Author" value="extropy"/>
     88                <attribute name="Plugin-Class" value="pdfimport.PdfImportPlugin"/>
     89                <attribute name="Plugin-Description" value="Import PDF file and convert to ways."/>
     90                <attribute name="Plugin-Icon" value="images/pdf_import.png"/>
     91                <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
     92                <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
     93                <attribute name="Plugin-Link" value="http://svn.openstreetmap.org/applications/editors/josm/plugins/pdfimport/"/>
     94                <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
     95            </manifest>
     96        </jar>
     97    </target>
     98    <target name="clean">
     99        <delete dir="${plugin.build.dir}"/>
     100        <delete file="${plugin.jar}"/>
     101    </target>
     102    <target name="clean_install">
     103        <delete file="${plugins}/pdfimport.jar"/>
     104    </target>
     105    <target name="install" depends="dist">
     106        <property environment="env"/>
     107        <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
     108            <and>
     109                <os family="windows"/>
     110            </and>
     111        </condition>
     112        <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
     113    </target>
     114    <!--
     115    ************************** Publishing the plugin ***********************************
     116    -->
     117    <!--
     118        ** extracts the JOSM release for the JOSM version in ../core and saves it in the
     119        ** property ${coreversion.info.entry.revision}
     120        **
     121        -->
     122    <target name="core-info">
     123        <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
     124            <env key="LANG" value="C"/>
     125            <arg value="info"/>
     126            <arg value="--xml"/>
     127            <arg value="../../core"/>
     128        </exec>
     129        <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
     130        <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
     131        <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
     132        <delete file="core.info.xml"/>
     133    </target>
     134    <!--
     135        ** commits the source tree for this plugin
     136        -->
     137    <target name="commit-current">
     138        <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
     139        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     140            <env key="LANG" value="C"/>
     141            <arg value="commit"/>
     142            <arg value="-m '${commit.message}'"/>
     143            <arg value="."/>
     144        </exec>
     145    </target>
     146    <!--
     147        ** updates (svn up) the source tree for this plugin
     148        -->
     149    <target name="update-current">
     150        <echo>Updating plugin source ...</echo>
     151        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     152            <env key="LANG" value="C"/>
     153            <arg value="up"/>
     154            <arg value="."/>
     155        </exec>
     156        <echo>Updating ${plugin.jar} ...</echo>
     157        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     158            <env key="LANG" value="C"/>
     159            <arg value="up"/>
     160            <arg value="../dist/${plugin.jar}"/>
     161        </exec>
     162    </target>
     163    <!--
     164        ** commits the plugin.jar
     165        -->
     166    <target name="commit-dist">
     167        <echo>
     168    ***** Properties of published ${plugin.jar} *****
     169    Commit message    : '${commit.message}'                 
     170    Plugin-Mainversion: ${plugin.main.version}
     171    JOSM build version: ${coreversion.info.entry.revision}
     172    Plugin-Version    : ${version.entry.commit.revision}
     173    ***** / Properties of published ${plugin.jar} *****                 
     174                       
     175    Now commiting ${plugin.jar} ...
     176    </echo>
     177        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     178            <env key="LANG" value="C"/>
     179            <arg value="-m '${commit.message}'"/>
     180            <arg value="commit"/>
     181            <arg value="${plugin.jar}"/>
     182        </exec>
     183    </target>
     184    <!-- ** make sure svn is present as a command line tool ** -->
     185    <target name="ensure-svn-present">
     186        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
     187            <env key="LANG" value="C"/>
     188            <arg value="--version"/>
     189        </exec>
     190        <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
     191            <!-- return code not set at all? Most likely svn isn't installed -->
     192            <condition>
     193                <not>
     194                    <isset property="svn.exit.code"/>
     195                </not>
     196            </condition>
     197        </fail>
     198        <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
     199            <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
     200            <condition>
     201                <isfailure code="${svn.exit.code}"/>
     202            </condition>
     203        </fail>
     204    </target>
     205    <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
     206    </target>
    225207</project>
  • applications/editors/josm/plugins/photo_geotagging/build.xml

    r25199 r26174  
    1 <?xml version="1.0" encoding="UTF-8"?>
     1<?xml version="1.0" encoding="utf-8"?>
    22<!--
    33** Usage
     
    2323-->
    2424<project name="photo_geotagging" default="dist" basedir=".">
    25 
    26         <!-- enter the SVN commit message -->
    27         <property name="commit.message" value="fixed josm bug 5800 - 'Override old backup files?' message window can't get focus" />
    28         <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    29         <property name="plugin.main.version" value="3835" />
    30 
    31 
    32         <!--
     25    <!-- enter the SVN commit message -->
     26    <property name="commit.message" value="fixed josm bug 5800 - 'Override old backup files?' message window can't get focus"/>
     27    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
     28    <property name="plugin.main.version" value="3835"/>
     29    <!--
    3330      ************************************************
    3431      ** should not be necessary to change the following properties
    3532     -->
    36         <property name="josm"                   location="../../core/dist/josm-custom.jar"/>
    37         <property name="plugin.build.dir"       value="build"/>
    38         <property name="plugin.src.dir"         value="src"/>
    39         <!-- this is the directory where the plugin jar is copied to -->
    40         <property name="plugin.dist.dir"        value="../../dist"/>
    41         <property name="ant.build.javac.target" value="1.5"/>
    42         <property name="plugin.dist.dir"        value="../../dist"/>
    43         <property name="plugin.jar"             value="${plugin.dist.dir}/${ant.project.name}.jar"/>
    44 
    45         <!--
     33    <property name="josm" location="../../core/dist/josm-custom.jar"/>
     34    <property name="plugin.build.dir" value="build"/>
     35    <property name="plugin.src.dir" value="src"/>
     36    <!-- this is the directory where the plugin jar is copied to -->
     37    <property name="plugin.dist.dir" value="../../dist"/>
     38    <property name="ant.build.javac.target" value="1.5"/>
     39    <property name="plugin.dist.dir" value="../../dist"/>
     40    <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/>
     41    <!--
    4642    **********************************************************
    4743    ** init - initializes the build
    4844    **********************************************************
    4945    -->
    50         <target name="init">
    51                 <mkdir dir="${plugin.build.dir}"/>
    52         </target>
    53 
    54         <!--
     46    <target name="init">
     47        <mkdir dir="${plugin.build.dir}"/>
     48    </target>
     49    <!--
    5550    **********************************************************
    5651    ** compile - complies the source tree
    5752    **********************************************************
    5853    -->
    59         <target name="compile" depends="init">
    60                 <echo message="compiling sanselan sources ... "/>
    61                 <javac srcdir="${plugin.src.dir}" excludes="org/openstreetmap/**" debug="true" destdir="${plugin.build.dir}" encoding="iso-8859-1">
    62                         <compilerarg value="-Xlint:deprecation"/>
    63                 </javac>
    64                 <echo message="compiling sources for  ${plugin.jar} ... "/>
    65                 <javac srcdir="${plugin.src.dir}" excludes="org/apache/sanselan/**" classpath="${josm}" debug="true" destdir="${plugin.build.dir}">
    66                         <compilerarg value="-Xlint:deprecation"/>
    67                         <compilerarg value="-Xlint:unchecked"/>
    68                 </javac>
    69         </target>
    70 
    71         <!--
     54    <target name="compile" depends="init">
     55        <echo message="compiling sanselan sources ... "/>
     56        <javac srcdir="${plugin.src.dir}" excludes="org/openstreetmap/**" debug="true" destdir="${plugin.build.dir}" encoding="iso-8859-1">
     57            <compilerarg value="-Xlint:deprecation"/>
     58        </javac>
     59        <echo message="compiling sources for  ${plugin.jar} ... "/>
     60        <javac srcdir="${plugin.src.dir}" excludes="org/apache/sanselan/**" classpath="${josm}" debug="true" destdir="${plugin.build.dir}">
     61            <compilerarg value="-Xlint:deprecation"/>
     62            <compilerarg value="-Xlint:unchecked"/>
     63        </javac>
     64    </target>
     65    <!--
    7266    **********************************************************
    7367    ** dist - creates the plugin jar
    7468    **********************************************************
    7569    -->
    76         <target name="dist" depends="compile,revision">
    77                 <echo message="creating ${ant.project.name}.jar ... "/>
    78                 <copy todir="${plugin.build.dir}/images">
    79                         <fileset dir="images"/>
    80                 </copy>
    81                 <copy todir="${plugin.build.dir}">
    82                         <fileset dir=".">
    83                                 <include name="README" />
    84                         </fileset>
    85                 </copy>
    86                 <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
    87                         <!--
     70    <target name="dist" depends="compile,revision">
     71        <echo message="creating ${ant.project.name}.jar ... "/>
     72        <copy todir="${plugin.build.dir}/images">
     73            <fileset dir="images"/>
     74        </copy>
     75        <copy todir="${plugin.build.dir}/data">
     76            <fileset dir="data"/>
     77        </copy>
     78        <copy todir="${plugin.build.dir}">
     79            <fileset dir=".">
     80                <include name="README"/>
     81            </fileset>
     82        </copy>
     83        <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
     84            <!--
    8885        ************************************************
    8986        ** configure these properties. Most of them will be copied to the plugins
     
    9390        ************************************************
    9491    -->
    95                         <manifest>
    96                                 <attribute name="Author" value="Sebastian Klein"/>
    97                                 <attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.photo_geotagging.GeotaggingPlugin"/>
    98                                 <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
    99                                 <attribute name="Plugin-Description" value="Write gps position info to the image file header. Run this feature from the right click menu of the image layer."/>
    100                                 <attribute name="Plugin-Icon" value="images/geotagging.png"/>
    101                                 <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/wiki/JOSM/Plugins/Photo_Geotagging"/>
    102                                 <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
    103                                 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
    104                         </manifest>
    105                 </jar>
    106         </target>
    107 
    108         <!--
     92            <manifest>
     93                <attribute name="Author" value="Sebastian Klein"/>
     94                <attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.photo_geotagging.GeotaggingPlugin"/>
     95                <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
     96                <attribute name="Plugin-Description" value="Write gps position info to the image file header. Run this feature from the right click menu of the image layer."/>
     97                <attribute name="Plugin-Icon" value="images/geotagging.png"/>
     98                <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/wiki/JOSM/Plugins/Photo_Geotagging"/>
     99                <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
     100                <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
     101            </manifest>
     102        </jar>
     103    </target>
     104    <!--
    109105    **********************************************************
    110106    ** revision - extracts the current revision number for the
     
    113109    **********************************************************
    114110    -->
    115         <target name="revision">
     111    <target name="revision">
     112        <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
     113            <env key="LANG" value="C"/>
     114            <arg value="info"/>
     115            <arg value="--xml"/>
     116            <arg value="."/>
     117        </exec>
     118        <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
     119        <delete file="REVISION"/>
     120    </target>
     121    <!--
     122    **********************************************************
     123    ** clean - clean up the build environment
     124    **********************************************************
     125    -->
     126    <target name="clean">
     127        <delete dir="${plugin.build.dir}"/>
     128        <delete file="${plugin.jar}"/>
     129    </target>
     130    <!--
     131    **********************************************************
     132    ** install - install the plugin in your local JOSM installation
     133    **********************************************************
     134    -->
     135    <target name="install" depends="dist">
     136        <property environment="env"/>
     137        <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
     138            <and>
     139                <os family="windows"/>
     140            </and>
     141        </condition>
     142        <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
     143    </target>
     144    <!--
     145    ************************** Publishing the plugin ***********************************
     146    -->
     147    <!--
     148        ** extracts the JOSM release for the JOSM version in ../core and saves it in the
     149        ** property ${coreversion.info.entry.revision}
     150        **
     151        -->
     152    <target name="core-info">
     153        <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
     154            <env key="LANG" value="C"/>
     155            <arg value="info"/>
     156            <arg value="--xml"/>
     157            <arg value="../../core"/>
     158        </exec>
     159        <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
     160        <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
     161        <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
     162        <delete file="core.info.xml"/>
     163    </target>
     164    <!--
     165        ** commits the source tree for this plugin
     166        -->
     167    <target name="commit-current">
     168        <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
     169        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     170            <env key="LANG" value="C"/>
     171            <arg value="commit"/>
     172            <arg value="-m '${commit.message}'"/>
     173            <arg value="."/>
     174        </exec>
     175    </target>
     176    <!--
     177        ** updates (svn up) the source tree for this plugin
     178        -->
     179    <target name="update-current">
     180        <echo>Updating plugin source ...</echo>
     181        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     182            <env key="LANG" value="C"/>
     183            <arg value="up"/>
     184            <arg value="."/>
     185        </exec>
     186        <echo>Updating ${plugin.jar} ...</echo>
     187        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     188            <env key="LANG" value="C"/>
     189            <arg value="up"/>
     190            <arg value="../dist/${plugin.jar}"/>
     191        </exec>
     192    </target>
     193    <!--
     194        ** commits the plugin.jar
     195        -->
     196    <target name="commit-dist">
     197        <echo>
     198    ***** Properties of published ${plugin.jar} *****
     199    Commit message    : '${commit.message}'
     200    Plugin-Mainversion: ${plugin.main.version}
     201    JOSM build version: ${coreversion.info.entry.revision}
     202    Plugin-Version    : ${version.entry.commit.revision}
     203    ***** / Properties of published ${plugin.jar} *****
    116204
    117                 <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
    118                         <env key="LANG" value="C"/>
    119                         <arg value="info"/>
    120                         <arg value="--xml"/>
    121                         <arg value="."/>
    122                 </exec>
    123                 <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
    124                 <delete file="REVISION"/>
    125         </target>
    126 
    127         <!--
    128     **********************************************************
    129     ** clean - clean up the build environment
    130     **********************************************************
    131     -->
    132         <target name="clean">
    133                 <delete dir="${plugin.build.dir}"/>
    134                 <delete file="${plugin.jar}"/>
    135         </target>
    136 
    137         <!--
    138     **********************************************************
    139     ** install - install the plugin in your local JOSM installation
    140     **********************************************************
    141     -->
    142         <target name="install" depends="dist">
    143                 <property environment="env"/>
    144                 <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
    145                         <and>
    146                                 <os family="windows"/>
    147                         </and>
    148                 </condition>
    149                 <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
    150         </target>
    151 
    152 
    153         <!--
    154         ************************** Publishing the plugin ***********************************
    155         -->
    156         <!--
    157                 ** extracts the JOSM release for the JOSM version in ../core and saves it in the
    158                 ** property ${coreversion.info.entry.revision}
    159                 **
    160                 -->
    161         <target name="core-info">
    162                 <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
    163                         <env key="LANG" value="C"/>
    164                         <arg value="info"/>
    165                         <arg value="--xml"/>
    166                         <arg value="../../core"/>
    167                 </exec>
    168                 <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
    169                 <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
    170                 <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
    171                 <delete file="core.info.xml" />
    172         </target>
    173 
    174         <!--
    175                 ** commits the source tree for this plugin
    176                 -->
    177         <target name="commit-current">
    178                 <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
    179                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    180                         <env key="LANG" value="C"/>
    181                         <arg value="commit"/>
    182                         <arg value="-m '${commit.message}'"/>
    183                         <arg value="."/>
    184                 </exec>
    185         </target>
    186 
    187         <!--
    188                 ** updates (svn up) the source tree for this plugin
    189                 -->
    190         <target name="update-current">
    191                 <echo>Updating plugin source ...</echo>
    192                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    193                         <env key="LANG" value="C"/>
    194                         <arg value="up"/>
    195                         <arg value="."/>
    196                 </exec>
    197                 <echo>Updating ${plugin.jar} ...</echo>
    198                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    199                         <env key="LANG" value="C"/>
    200                         <arg value="up"/>
    201                         <arg value="../dist/${plugin.jar}"/>
    202                 </exec>
    203         </target>
    204 
    205         <!--
    206                 ** commits the plugin.jar
    207                 -->
    208         <target name="commit-dist">
    209                 <echo>
    210         ***** Properties of published ${plugin.jar} *****
    211         Commit message    : '${commit.message}'
    212         Plugin-Mainversion: ${plugin.main.version}
    213         JOSM build version: ${coreversion.info.entry.revision}
    214         Plugin-Version    : ${version.entry.commit.revision}
    215         ***** / Properties of published ${plugin.jar} *****
    216 
    217         Now commiting ${plugin.jar} ...
    218         </echo>
    219                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    220                         <env key="LANG" value="C"/>
    221                         <arg value="-m '${commit.message}'"/>
    222                         <arg value="commit"/>
    223                         <arg value="${plugin.jar}"/>
    224                 </exec>
    225         </target>
    226 
    227         <!-- ** make sure svn is present as a command line tool ** -->
    228         <target name="ensure-svn-present">
    229                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
    230                         <env key="LANG" value="C" />
    231                         <arg value="--version" />
    232                 </exec>
    233                 <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
    234                         <!-- return code not set at all? Most likely svn isn't installed -->
    235                         <condition>
    236                                 <not>
    237                                         <isset property="svn.exit.code" />
    238                                 </not>
    239                         </condition>
    240                 </fail>
    241                 <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
    242                         <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
    243                         <condition>
    244                                 <isfailure code="${svn.exit.code}" />
    245                         </condition>
    246                 </fail>
    247         </target>
    248 
    249         <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
    250         </target>
     205    Now commiting ${plugin.jar} ...
     206    </echo>
     207        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     208            <env key="LANG" value="C"/>
     209            <arg value="-m '${commit.message}'"/>
     210            <arg value="commit"/>
     211            <arg value="${plugin.jar}"/>
     212        </exec>
     213    </target>
     214    <!-- ** make sure svn is present as a command line tool ** -->
     215    <target name="ensure-svn-present">
     216        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
     217            <env key="LANG" value="C"/>
     218            <arg value="--version"/>
     219        </exec>
     220        <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
     221            <!-- return code not set at all? Most likely svn isn't installed -->
     222            <condition>
     223                <not>
     224                    <isset property="svn.exit.code"/>
     225                </not>
     226            </condition>
     227        </fail>
     228        <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
     229            <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
     230            <condition>
     231                <isfailure code="${svn.exit.code}"/>
     232            </condition>
     233        </fail>
     234    </target>
     235    <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
     236    </target>
    251237</project>
  • applications/editors/josm/plugins/piclayer/build.xml

    r25219 r26174  
    1 <?xml version="1.0" encoding="UTF-8"?>
     1<?xml version="1.0" encoding="utf-8"?>
    22<!--
    33** This is a template build file for a JOSM  plugin.
     
    2222-->
    2323<project name="PicLayer" default="dist" basedir=".">
    24 
    25         <property name="commit.message" value="applied #J5852 (patch by Petschge) - new shear option" />
    26         <property name="plugin.main.version" value="3835" />
    27 
    28         <!--
     24    <property name="commit.message" value="applied #J5852 (patch by Petschge) - new shear option"/>
     25    <property name="plugin.main.version" value="3835"/>
     26    <!--
    2927      ************************************************
    3028      ** should not be necessary to change the following properties
    3129     -->
    32         <property name="josm"                   location="../../core/dist/josm-custom.jar"/>
    33         <property name="plugin.build.dir"       value="build"/>
    34         <property name="plugin.src.dir"         value="src"/>
    35         <!-- this is the directory where the plugin jar is copied to -->
    36         <property name="plugin.dist.dir"        value="../../dist"/>
    37         <property name="ant.build.javac.target" value="1.5"/>
    38         <property name="plugin.jar"             value="${plugin.dist.dir}/${ant.project.name}.jar"/>
    39 
    40         <!--
     30    <property name="josm" location="../../core/dist/josm-custom.jar"/>
     31    <property name="plugin.build.dir" value="build"/>
     32    <property name="plugin.src.dir" value="src"/>
     33    <!-- this is the directory where the plugin jar is copied to -->
     34    <property name="plugin.dist.dir" value="../../dist"/>
     35    <property name="ant.build.javac.target" value="1.5"/>
     36    <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/>
     37    <!--
    4138    **********************************************************
    4239    ** init - initializes the build
    4340    **********************************************************
    4441    -->
    45         <target name="init">
    46                 <mkdir dir="${plugin.build.dir}"/>
    47         </target>
    48 
    49         <!--
     42    <target name="init">
     43        <mkdir dir="${plugin.build.dir}"/>
     44    </target>
     45    <!--
    5046    **********************************************************
    5147    ** compile - complies the source tree
    5248    **********************************************************
    5349    -->
    54         <target name="compile" depends="init">
    55                 <echo message="compiling sources for ${ant.project.name} ... "/>
    56                 <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}">
    57                         <compilerarg value="-Xlint:deprecation"/>
    58                         <compilerarg value="-Xlint:unchecked"/>
    59                 </javac>
    60         </target>
    61 
    62         <!--
     50    <target name="compile" depends="init">
     51        <echo message="compiling sources for ${ant.project.name} ... "/>
     52        <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}">
     53            <compilerarg value="-Xlint:deprecation"/>
     54            <compilerarg value="-Xlint:unchecked"/>
     55        </javac>
     56    </target>
     57    <!--
    6358    **********************************************************
    6459    ** dist - creates the plugin jar
    6560    **********************************************************
    6661    -->
    67         <target name="dist" depends="compile,revision">
    68                 <echo message="creating ${plugin.jar} ... "/>
    69                 <copy todir="${plugin.build.dir}/resources">
    70                         <fileset dir="resources"/>
    71                 </copy>
    72                 <copy todir="${plugin.build.dir}/images">
    73                         <fileset dir="images"/>
    74                 </copy>
    75                 <copy todir="${plugin.build.dir}">
    76                         <fileset dir=".">
    77                                 <include name="README" />
    78                                 <include name="LICENSE" />
    79                         </fileset>
    80                 </copy>
    81                 <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
    82                         <manifest>
    83                                 <attribute name="Author" value="Tomasz Stelmach"/>
    84                                 <attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.piclayer.PicLayerPlugin"/>
    85                                 <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
    86                                 <attribute name="Plugin-Description" value="This plugin allows to display any picture as a background in the editor and align it with the map."/>
    87                                 <attribute name="Plugin-Icon" value="images/layericon.png"/>
     62    <target name="dist" depends="compile,revision">
     63        <echo message="creating ${plugin.jar} ... "/>
     64        <copy todir="${plugin.build.dir}/resources">
     65            <fileset dir="resources"/>
     66        </copy>
     67        <copy todir="${plugin.build.dir}/images">
     68            <fileset dir="images"/>
     69        </copy>
     70        <copy todir="${plugin.build.dir}/data">
     71            <fileset dir="data"/>
     72        </copy>
     73        <copy todir="${plugin.build.dir}">
     74            <fileset dir=".">
     75                <include name="README"/>
     76                <include name="LICENSE"/>
     77            </fileset>
     78        </copy>
     79        <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
     80            <manifest>
     81                <attribute name="Author" value="Tomasz Stelmach"/>
     82                <attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.piclayer.PicLayerPlugin"/>
     83                <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
     84                <attribute name="Plugin-Description" value="This plugin allows to display any picture as a background in the editor and align it with the map."/>
     85                <attribute name="Plugin-Icon" value="images/layericon.png"/>
    8886                <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/wiki/JOSM/Plugins/PicLayer"/>
    89                                 <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
    90                                 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
    91                         </manifest>
    92                 </jar>
    93         </target>
    94 
    95         <!--
     87                <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
     88                <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
     89            </manifest>
     90        </jar>
     91    </target>
     92    <!--
    9693    **********************************************************
    9794    ** revision - extracts the current revision number for the
     
    10097    **********************************************************
    10198    -->
    102         <target name="revision">
     99    <target name="revision">
     100        <!-- extract the SVN revision information for file build.number -->
     101        <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
     102            <env key="LANG" value="C"/>
     103            <arg value="info"/>
     104            <arg value="--xml"/>
     105            <arg value="."/>
     106        </exec>
     107        <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
     108        <delete file="REVISION"/>
     109    </target>
     110    <!--
     111    **********************************************************
     112    ** clean - clean up the build environment
     113    **********************************************************
     114    -->
     115    <target name="clean">
     116        <delete dir="${plugin.build.dir}"/>
     117        <delete file="${plugin.jar}"/>
     118    </target>
     119    <!--
     120    **********************************************************
     121    ** install - install the plugin in your local JOSM installation
     122    **********************************************************
     123    -->
     124    <target name="install" depends="dist">
     125        <property environment="env"/>
     126        <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
     127            <and>
     128                <os family="windows"/>
     129            </and>
     130        </condition>
     131        <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
     132    </target>
     133    <!--
     134         ************************** Publishing the plugin ***********************************
     135        -->
     136    <!--
     137        ** extracts the JOSM release for the JOSM version in ../core and saves it in the
     138        ** property ${coreversion.info.entry.revision}
     139        **
     140        -->
     141    <target name="core-info">
     142        <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
     143            <env key="LANG" value="C"/>
     144            <arg value="info"/>
     145            <arg value="--xml"/>
     146            <arg value="../../core"/>
     147        </exec>
     148        <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
     149        <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
     150        <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
     151        <delete file="core.info.xml"/>
     152    </target>
     153    <!--
     154        ** commits the source tree for this plugin
     155        -->
     156    <target name="commit-current">
     157        <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
     158        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     159            <env key="LANG" value="C"/>
     160            <arg value="commit"/>
     161            <arg value="-m '${commit.message}'"/>
     162            <arg value="."/>
     163        </exec>
     164    </target>
     165    <!--
     166        ** updates (svn up) the source tree for this plugin
     167        -->
     168    <target name="update-current">
     169        <echo>Updating plugin source ...</echo>
     170        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     171            <env key="LANG" value="C"/>
     172            <arg value="up"/>
     173            <arg value="."/>
     174        </exec>
     175        <echo>Updating ${plugin.jar} ...</echo>
     176        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     177            <env key="LANG" value="C"/>
     178            <arg value="up"/>
     179            <arg value="../dist/${plugin.jar}"/>
     180        </exec>
     181    </target>
     182    <!--
     183        ** commits the plugin.jar
     184        -->
     185    <target name="commit-dist">
     186        <echo>
     187    ***** Properties of published ${plugin.jar} *****
     188    Commit message    : '${commit.message}'
     189    Plugin-Mainversion: ${plugin.main.version}
     190    JOSM build version: ${coreversion.info.entry.revision}
     191    Plugin-Version    : ${version.entry.commit.revision}
     192    ***** / Properties of published ${plugin.jar} *****
    103193
    104                 <!-- extract the SVN revision information for file build.number -->
    105                 <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
    106                         <env key="LANG" value="C"/>
    107                         <arg value="info"/>
    108                         <arg value="--xml"/>
    109                         <arg value="."/>
    110                 </exec>
    111                 <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
    112                 <delete file="REVISION"/>
    113         </target>
    114 
    115         <!--
    116     **********************************************************
    117     ** clean - clean up the build environment
    118     **********************************************************
    119     -->
    120         <target name="clean">
    121                 <delete dir="${plugin.build.dir}"/>
    122                 <delete file="${plugin.jar}"/>
    123         </target>
    124 
    125         <!--
    126     **********************************************************
    127     ** install - install the plugin in your local JOSM installation
    128     **********************************************************
    129     -->
    130         <target name="install" depends="dist">
    131                 <property environment="env"/>
    132                 <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
    133                         <and>
    134                                 <os family="windows"/>
    135                         </and>
    136                 </condition>
    137                 <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
    138         </target>
    139 
    140         <!--
    141                  ************************** Publishing the plugin ***********************************
    142                 -->
    143         <!--
    144                 ** extracts the JOSM release for the JOSM version in ../core and saves it in the
    145                 ** property ${coreversion.info.entry.revision}
    146                 **
    147                 -->
    148         <target name="core-info">
    149                 <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
    150                         <env key="LANG" value="C"/>
    151                         <arg value="info"/>
    152                         <arg value="--xml"/>
    153                         <arg value="../../core"/>
    154                 </exec>
    155                 <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
    156                 <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
    157                 <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
    158                 <delete file="core.info.xml" />
    159         </target>
    160 
    161         <!--
    162                 ** commits the source tree for this plugin
    163                 -->
    164         <target name="commit-current">
    165                 <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
    166                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    167                         <env key="LANG" value="C"/>
    168                         <arg value="commit"/>
    169                         <arg value="-m '${commit.message}'"/>
    170                         <arg value="."/>
    171                 </exec>
    172         </target>
    173 
    174         <!--
    175                 ** updates (svn up) the source tree for this plugin
    176                 -->
    177         <target name="update-current">
    178                 <echo>Updating plugin source ...</echo>
    179                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    180                         <env key="LANG" value="C"/>
    181                         <arg value="up"/>
    182                         <arg value="."/>
    183                 </exec>
    184                 <echo>Updating ${plugin.jar} ...</echo>
    185                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    186                         <env key="LANG" value="C"/>
    187                         <arg value="up"/>
    188                         <arg value="../dist/${plugin.jar}"/>
    189                 </exec>
    190         </target>
    191 
    192         <!--
    193                 ** commits the plugin.jar
    194                 -->
    195         <target name="commit-dist">
    196                 <echo>
    197         ***** Properties of published ${plugin.jar} *****
    198         Commit message    : '${commit.message}'
    199         Plugin-Mainversion: ${plugin.main.version}
    200         JOSM build version: ${coreversion.info.entry.revision}
    201         Plugin-Version    : ${version.entry.commit.revision}
    202         ***** / Properties of published ${plugin.jar} *****
    203 
    204         Now commiting ${plugin.jar} ...
    205         </echo>
    206                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    207                         <env key="LANG" value="C"/>
    208                         <arg value="-m '${commit.message}'"/>
    209                         <arg value="commit"/>
    210                         <arg value="${plugin.jar}"/>
    211                 </exec>
    212         </target>
    213 
    214         <!-- ** make sure svn is present as a command line tool ** -->
    215         <target name="ensure-svn-present">
    216                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
    217                         <env key="LANG" value="C" />
    218                         <arg value="--version" />
    219                 </exec>
    220                 <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
    221                         <!-- return code not set at all? Most likely svn isn't installed -->
    222                         <condition>
    223                                 <not>
    224                                         <isset property="svn.exit.code" />
    225                                 </not>
    226                         </condition>
    227                 </fail>
    228                 <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
    229                         <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
    230                         <condition>
    231                                 <isfailure code="${svn.exit.code}" />
    232                         </condition>
    233                 </fail>
    234         </target>
    235 
    236         <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
    237         </target>
     194    Now commiting ${plugin.jar} ...
     195    </echo>
     196        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     197            <env key="LANG" value="C"/>
     198            <arg value="-m '${commit.message}'"/>
     199            <arg value="commit"/>
     200            <arg value="${plugin.jar}"/>
     201        </exec>
     202    </target>
     203    <!-- ** make sure svn is present as a command line tool ** -->
     204    <target name="ensure-svn-present">
     205        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
     206            <env key="LANG" value="C"/>
     207            <arg value="--version"/>
     208        </exec>
     209        <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
     210            <!-- return code not set at all? Most likely svn isn't installed -->
     211            <condition>
     212                <not>
     213                    <isset property="svn.exit.code"/>
     214                </not>
     215            </condition>
     216        </fail>
     217        <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
     218            <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
     219            <condition>
     220                <isfailure code="${svn.exit.code}"/>
     221            </condition>
     222        </fail>
     223    </target>
     224    <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
     225    </target>
    238226</project>
  • applications/editors/josm/plugins/plastic_laf/build.xml

    r25199 r26174  
    1 <?xml version="1.0" encoding="UTF-8"?>
     1<?xml version="1.0" encoding="utf-8"?>
    22<!--
    33** This is the build file for the plastic_laf plugin.
     
    2929-->
    3030<project name="plastic_laf" default="dist" basedir=".">
    31 
    32         <!-- enter the SVN commit message -->
    33         <property name="commit.message" value="Changed the constructor signature of the plugin main class" />
    34         <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    35         <property name="plugin.main.version" value="3835" />
    36 
    37         <property name="josm"                   location="../../core/dist/josm-custom.jar"/>
    38         <property name="plugin.dist.dir"        value="../../dist"/>
    39         <property name="plugin.build.dir"       value="build"/>
    40         <property name="plugin.jar"             value="${plugin.dist.dir}/${ant.project.name}.jar"/>
    41         <property name="ant.build.javac.target" value="1.5"/>
    42         <property name="looks"                  value="lib/looks-2.2.1.jar"/>
    43         <target name="init">
    44                 <mkdir dir="${plugin.build.dir}"/>
    45         </target>
    46         <target name="compile" depends="init">
    47                 <echo message="creating ${plugin.jar}"/>
    48                 <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}">
    49                         <compilerarg value="-Xlint:deprecation"/>
    50                         <compilerarg value="-Xlint:unchecked"/>
    51                         <classpath>
    52                                 <pathelement location="${josm}"/>
    53                                 <pathelement location="${looks}"/>
    54                         </classpath>
    55                 </javac>
    56         </target>
    57         <target name="dist" depends="compile,revision">
    58                 <unjar dest="${plugin.build.dir}" src="${looks}"/>
    59                 <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
    60                         <manifest>
    61                                 <attribute name="Author" value="Imi"/>
    62                                 <attribute name="Plugin-Class" value="plastic_laf.Plugin"/>
    63                                 <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
    64                                 <attribute name="Plugin-Description" value="The great JGoodies Plastic Look and Feel."/>
    65                                 <attribute name="Plugin-Early" value="true"/>
    66                                 <attribute name="Plugin-Link" value="http://www.jgoodies.com/"/>
    67                                 <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
    68                                 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
    69                         </manifest>
    70                 </jar>
    71         </target>
    72         <target name="revision">
    73                 <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
    74                         <env key="LANG" value="C"/>
    75                         <arg value="info"/>
    76                         <arg value="--xml"/>
    77                         <arg value="."/>
    78                 </exec>
    79                 <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
    80                 <delete file="REVISION"/>
    81         </target>
    82         <target name="clean">
    83                 <delete dir="${plugin.build.dir}"/>
    84                 <delete file="${plugin.jar}"/>
    85         </target>
    86         <target name="install" depends="dist">
    87                 <property environment="env"/>
    88                 <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
    89                         <and>
    90                                 <os family="windows"/>
    91                         </and>
    92                 </condition>
    93                 <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
    94         </target>
    95 
    96         <!--
    97         ************************** Publishing the plugin ***********************************
    98         -->
    99         <!--
    100                 ** extracts the JOSM release for the JOSM version in ../core and saves it in the
    101                 ** property ${coreversion.info.entry.revision}
    102                 **
    103                 -->
    104         <target name="core-info">
    105                 <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
    106                         <env key="LANG" value="C"/>
    107                         <arg value="info"/>
    108                         <arg value="--xml"/>
    109                         <arg value="../../core"/>
    110                 </exec>
    111                 <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
    112                 <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
    113                 <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
    114                 <delete file="core.info.xml" />
    115         </target>
    116 
    117         <!--
    118                 ** commits the source tree for this plugin
    119                 -->
    120         <target name="commit-current">
    121                 <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
    122                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    123                         <env key="LANG" value="C"/>
    124                         <arg value="commit"/>
    125                         <arg value="-m '${commit.message}'"/>
    126                         <arg value="."/>
    127                 </exec>
    128         </target>
    129 
    130         <!--
    131                 ** updates (svn up) the source tree for this plugin
    132                 -->
    133         <target name="update-current">
    134                 <echo>Updating plugin source ...</echo>
    135                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    136                         <env key="LANG" value="C"/>
    137                         <arg value="up"/>
    138                         <arg value="."/>
    139                 </exec>
    140                 <echo>Updating ${plugin.jar} ...</echo>
    141                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    142                         <env key="LANG" value="C"/>
    143                         <arg value="up"/>
    144                         <arg value="../dist/${plugin.jar}"/>
    145                 </exec>
    146         </target>
    147 
    148         <!--
    149                 ** commits the plugin.jar
    150                 -->
    151         <target name="commit-dist">
    152                 <echo>
    153         ***** Properties of published ${plugin.jar} *****
    154         Commit message    : '${commit.message}'                                 
    155         Plugin-Mainversion: ${plugin.main.version}
    156         JOSM build version: ${coreversion.info.entry.revision}
    157         Plugin-Version    : ${version.entry.commit.revision}
    158         ***** / Properties of published ${plugin.jar} *****                                     
    159                                                
    160         Now commiting ${plugin.jar} ...
    161         </echo>
    162                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    163                         <env key="LANG" value="C"/>
    164                         <arg value="-m '${commit.message}'"/>
    165                         <arg value="commit"/>
    166                         <arg value="${plugin.jar}"/>
    167                 </exec>
    168         </target>
    169 
    170         <!-- ** make sure svn is present as a command line tool ** -->
    171         <target name="ensure-svn-present">
    172                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
    173                         <env key="LANG" value="C" />
    174                         <arg value="--version" />
    175                 </exec>
    176                 <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
    177                         <!-- return code not set at all? Most likely svn isn't installed -->
    178                         <condition>
    179                                 <not>
    180                                         <isset property="svn.exit.code" />
    181                                 </not>
    182                         </condition>
    183                 </fail>
    184                 <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
    185                         <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
    186                         <condition>
    187                                 <isfailure code="${svn.exit.code}" />
    188                         </condition>
    189                 </fail>
    190         </target>
    191 
    192         <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
    193         </target>
     31    <!-- enter the SVN commit message -->
     32    <property name="commit.message" value="Changed the constructor signature of the plugin main class"/>
     33    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
     34    <property name="plugin.main.version" value="3835"/>
     35    <property name="josm" location="../../core/dist/josm-custom.jar"/>
     36    <property name="plugin.dist.dir" value="../../dist"/>
     37    <property name="plugin.build.dir" value="build"/>
     38    <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/>
     39    <property name="ant.build.javac.target" value="1.5"/>
     40    <property name="looks" value="lib/looks-2.2.1.jar"/>
     41    <target name="init">
     42        <mkdir dir="${plugin.build.dir}"/>
     43    </target>
     44    <target name="compile" depends="init">
     45        <echo message="creating ${plugin.jar}"/>
     46        <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}">
     47            <compilerarg value="-Xlint:deprecation"/>
     48            <compilerarg value="-Xlint:unchecked"/>
     49            <classpath>
     50                <pathelement location="${josm}"/>
     51                <pathelement location="${looks}"/>
     52            </classpath>
     53        </javac>
     54    </target>
     55    <target name="dist" depends="compile,revision">
     56        <unjar dest="${plugin.build.dir}" src="${looks}"/>
     57        <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
     58            <manifest>
     59                <attribute name="Author" value="Imi"/>
     60                <attribute name="Plugin-Class" value="plastic_laf.Plugin"/>
     61                <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
     62                <attribute name="Plugin-Description" value="The great JGoodies Plastic Look and Feel."/>
     63                <attribute name="Plugin-Early" value="true"/>
     64                <attribute name="Plugin-Link" value="http://www.jgoodies.com/"/>
     65                <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
     66                <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
     67            </manifest>
     68        </jar>
     69    </target>
     70    <target name="revision">
     71        <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
     72            <env key="LANG" value="C"/>
     73            <arg value="info"/>
     74            <arg value="--xml"/>
     75            <arg value="."/>
     76        </exec>
     77        <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
     78        <delete file="REVISION"/>
     79    </target>
     80    <target name="clean">
     81        <delete dir="${plugin.build.dir}"/>
     82        <delete file="${plugin.jar}"/>
     83    </target>
     84    <target name="install" depends="dist">
     85        <property environment="env"/>
     86        <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
     87            <and>
     88                <os family="windows"/>
     89            </and>
     90        </condition>
     91        <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
     92    </target>
     93    <!--
     94    ************************** Publishing the plugin ***********************************
     95    -->
     96    <!--
     97        ** extracts the JOSM release for the JOSM version in ../core and saves it in the
     98        ** property ${coreversion.info.entry.revision}
     99        **
     100        -->
     101    <target name="core-info">
     102        <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
     103            <env key="LANG" value="C"/>
     104            <arg value="info"/>
     105            <arg value="--xml"/>
     106            <arg value="../../core"/>
     107        </exec>
     108        <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
     109        <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
     110        <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
     111        <delete file="core.info.xml"/>
     112    </target>
     113    <!--
     114        ** commits the source tree for this plugin
     115        -->
     116    <target name="commit-current">
     117        <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
     118        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     119            <env key="LANG" value="C"/>
     120            <arg value="commit"/>
     121            <arg value="-m '${commit.message}'"/>
     122            <arg value="."/>
     123        </exec>
     124    </target>
     125    <!--
     126        ** updates (svn up) the source tree for this plugin
     127        -->
     128    <target name="update-current">
     129        <echo>Updating plugin source ...</echo>
     130        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     131            <env key="LANG" value="C"/>
     132            <arg value="up"/>
     133            <arg value="."/>
     134        </exec>
     135        <echo>Updating ${plugin.jar} ...</echo>
     136        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     137            <env key="LANG" value="C"/>
     138            <arg value="up"/>
     139            <arg value="../dist/${plugin.jar}"/>
     140        </exec>
     141    </target>
     142    <!--
     143        ** commits the plugin.jar
     144        -->
     145    <target name="commit-dist">
     146        <echo>
     147    ***** Properties of published ${plugin.jar} *****
     148    Commit message    : '${commit.message}'                 
     149    Plugin-Mainversion: ${plugin.main.version}
     150    JOSM build version: ${coreversion.info.entry.revision}
     151    Plugin-Version    : ${version.entry.commit.revision}
     152    ***** / Properties of published ${plugin.jar} *****                 
     153                       
     154    Now commiting ${plugin.jar} ...
     155    </echo>
     156        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     157            <env key="LANG" value="C"/>
     158            <arg value="-m '${commit.message}'"/>
     159            <arg value="commit"/>
     160            <arg value="${plugin.jar}"/>
     161        </exec>
     162    </target>
     163    <!-- ** make sure svn is present as a command line tool ** -->
     164    <target name="ensure-svn-present">
     165        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
     166            <env key="LANG" value="C"/>
     167            <arg value="--version"/>
     168        </exec>
     169        <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
     170            <!-- return code not set at all? Most likely svn isn't installed -->
     171            <condition>
     172                <not>
     173                    <isset property="svn.exit.code"/>
     174                </not>
     175            </condition>
     176        </fail>
     177        <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
     178            <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
     179            <condition>
     180                <isfailure code="${svn.exit.code}"/>
     181            </condition>
     182        </fail>
     183    </target>
     184    <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
     185    </target>
    194186</project>
  • applications/editors/josm/plugins/proj4j/build.xml

    r25454 r26174  
    1 <?xml version="1.0" encoding="UTF-8"?>
     1<?xml version="1.0" encoding="utf-8"?>
    22<!--
    33** This is a template build file for a JOSM  plugin.
     
    2929-->
    3030<project name="proj4j" default="dist" basedir=".">
    31 
    3231    <!-- read build.properties for local settings -->
    33     <property file="build.properties" />
     32    <property file="build.properties"/>
    3433    <!-- enter the SVN command file name -->
    35     <property name="svn" value="svn" />
     34    <property name="svn" value="svn"/>
    3635    <!-- enter the SVN commit message -->
    37     <property name="commit.message" value="Commit message" />
     36    <property name="commit.message" value="Commit message"/>
    3837    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    39     <property name="plugin.main.version" value="3872" />
    40 
    41     <property name="libproj4j" value="lib/proj4j-0.1.0.jar"/>   
    42 
     38    <property name="plugin.main.version" value="3872"/>
     39    <property name="libproj4j" value="lib/proj4j-0.1.0.jar"/>
    4340    <!--
    4441      ************************************************
    4542      ** should not be necessary to change the following properties
    4643     -->
    47     <property name="josm"                   location="../../core/dist/josm-custom.jar"/>
    48     <property name="plugin.build.dir"       value="build"/>
    49     <property name="plugin.src.dir"         value="src"/>
     44    <property name="josm" location="../../core/dist/josm-custom.jar"/>
     45    <property name="plugin.build.dir" value="build"/>
     46    <property name="plugin.src.dir" value="src"/>
    5047    <!-- this is the directory where the plugin jar is copied to -->
    51     <property name="plugin.dist.dir"        value="../../dist"/>
     48    <property name="plugin.dist.dir" value="../../dist"/>
    5249    <property name="ant.build.javac.target" value="1.5"/>
    53     <property name="plugin.dist.dir"        value="../../dist"/>
    54     <property name="plugin.jar"             value="${plugin.dist.dir}/${ant.project.name}.jar"/>
    55 
     50    <property name="plugin.dist.dir" value="../../dist"/>
     51    <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/>
    5652    <!--
    5753    **********************************************************
     
    6258        <mkdir dir="${plugin.build.dir}"/>
    6359    </target>
    64 
    6560    <!--
    6661    **********************************************************
     
    7267        <javac srcdir="src" debug="true" destdir="${plugin.build.dir}">
    7368            <classpath>
    74               <pathelement location="${josm}"/>
    75               <pathelement location="${libproj4j}"/>                           
    76             </classpath>       
     69                <pathelement location="${josm}"/>
     70                <pathelement location="${libproj4j}"/>
     71            </classpath>
    7772            <compilerarg value="-Xlint:deprecation"/>
    7873            <compilerarg value="-Xlint:unchecked"/>
    7974        </javac>
    8075    </target>
    81 
    8276    <!--
    8377    **********************************************************
     
    9387            <fileset dir="images"/>
    9488        </copy>
     89        <copy todir="${plugin.build.dir}/data">
     90            <fileset dir="data"/>
     91        </copy>
    9592        <copy todir="${plugin.build.dir}">
    9693            <fileset dir=".">
    97                 <include name="README" />
    98                 <include name="LICENSE" />
     94                <include name="README"/>
     95                <include name="LICENSE"/>
    9996            </fileset>
    10097        </copy>
     
    121118        </jar>
    122119    </target>
    123 
    124120    <!--
    125121    **********************************************************
     
    130126    -->
    131127    <target name="revision">
    132 
    133128        <exec append="false" output="REVISION" executable="${svn}" failifexecutionfails="false">
    134129            <env key="LANG" value="C"/>
     
    140135        <delete file="REVISION"/>
    141136    </target>
    142 
    143137    <!--
    144138    **********************************************************
     
    150144        <delete file="${plugin.jar}"/>
    151145    </target>
    152 
    153146    <!--
    154147    **********************************************************
     
    165158        <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
    166159    </target>
    167 
    168 
    169160    <!--
    170161    ************************** Publishing the plugin ***********************************
     
    185176        <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
    186177        <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
    187         <delete file="core.info.xml" />
    188     </target>
    189 
     178        <delete file="core.info.xml"/>
     179    </target>
    190180    <!--
    191181        ** commits the source tree for this plugin
     
    198188            <arg value="-m '${commit.message}'"/>
    199189            <arg value="."/>
    200                 <arg value="${svn.username_arg}"/>
    201                 <arg value="${svn.username}"/>
    202                 <arg value="${svn.password_arg}"/>
    203                 <arg value="${svn.password}"/>
    204         </exec>
    205     </target>
    206 
     190            <arg value="${svn.username_arg}"/>
     191            <arg value="${svn.username}"/>
     192            <arg value="${svn.password_arg}"/>
     193            <arg value="${svn.password}"/>
     194        </exec>
     195    </target>
    207196    <!--
    208197        ** updates (svn up) the source tree for this plugin
     
    222211        </exec>
    223212    </target>
    224 
    225213    <!--
    226214        ** commits the plugin.jar
     
    242230            <arg value="commit"/>
    243231            <arg value="${plugin.jar}"/>
    244                 <arg value="${svn.username_arg}"/>
    245                 <arg value="${svn.username}"/>
    246                 <arg value="${svn.password_arg}"/>
    247                 <arg value="${svn.password}"/>
    248         </exec>
    249     </target>
    250 
     232            <arg value="${svn.username_arg}"/>
     233            <arg value="${svn.username}"/>
     234            <arg value="${svn.password_arg}"/>
     235            <arg value="${svn.password}"/>
     236        </exec>
     237    </target>
    251238    <!-- ** make sure svn is present as a command line tool ** -->
    252239    <target name="ensure-svn-present">
    253240        <exec append="true" output="svn.log" executable="${svn}" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
    254             <env key="LANG" value="C" />
    255             <arg value="--version" />
     241            <env key="LANG" value="C"/>
     242            <arg value="--version"/>
    256243        </exec>
    257244        <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
     
    259246            <condition>
    260247                <not>
    261                     <isset property="svn.exit.code" />
     248                    <isset property="svn.exit.code"/>
    262249                </not>
    263250            </condition>
     
    266253            <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
    267254            <condition>
    268                 <isfailure code="${svn.exit.code}" />
     255                <isfailure code="${svn.exit.code}"/>
    269256            </condition>
    270257        </fail>
    271258    </target>
    272 
    273259    <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
    274260    </target>
  • applications/editors/josm/plugins/public_transport/build.xml

    r26145 r26174  
    1 <?xml version="1.0" encoding="UTF-8"?>
     1<?xml version="1.0" encoding="utf-8"?>
    22<!--
    33** Usage
     
    2121      ** should not be necessary to change the following properties
    2222     -->
    23     <property name="josm"                   location="${josm.basedir}/core/dist/josm-custom.jar"/>
    24     <property name="plugin.build.dir"       value="build"/>
    25     <property name="plugin.src.dir"         value="src"/>
     23    <property name="josm" location="${josm.basedir}/core/dist/josm-custom.jar"/>
     24    <property name="plugin.build.dir" value="build"/>
     25    <property name="plugin.src.dir" value="src"/>
    2626    <!-- this is the directory where the plugin jar is copied to -->
    27     <property name="plugin.dist.dir"        value="${josm.basedir}/dist"/>
     27    <property name="plugin.dist.dir" value="${josm.basedir}/dist"/>
    2828    <property name="ant.build.javac.target" value="1.5"/>
    29     <property name="plugin.dist.dir"        value="${josm.basedir}/dist"/>
    30     <property name="plugin.jar"             value="${plugin.dist.dir}/${ant.project.name}.jar"/>
    31 
     29    <property name="plugin.dist.dir" value="${josm.basedir}/dist"/>
     30    <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/>
    3231    <!--
    3332    **********************************************************
     
    3837        <mkdir dir="${plugin.build.dir}"/>
    3938    </target>
    40 
    4139    <!--
    4240    **********************************************************
     
    5149        </javac>
    5250    </target>
    53 
    5451    <!--
    5552    **********************************************************
     
    6562            <fileset dir="images"/>
    6663        </copy>
     64        <copy todir="${plugin.build.dir}/data">
     65            <fileset dir="data"/>
     66        </copy>
    6767        <copy todir="${plugin.build.dir}">
    6868            <fileset dir=".">
    69                 <include name="README" />
    70                 <include name="LICENSE" />
     69                <include name="README"/>
     70                <include name="LICENSE"/>
    7171            </fileset>
    7272        </copy>
    7373        <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
    74     <!--
     74            <!--
    7575        ************************************************
    7676        ** configure these properties. Most of them will be copied to the plugins
     
    8282            <manifest>
    8383                <attribute name="Author" value="Roland M. Olbricht"/>
    84                 <attribute name="Plugin-Class" value="public_transport.PublicTransportPlugin"/>
     84                <attribute name="Plugin-Class" value="public_transport.PublicTransportPlugin"/>
    8585                <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
    8686                <attribute name="Plugin-Description" value="This plugin simplifies the mapping and editing of public transport routes."/>
     
    9191        </jar>
    9292    </target>
    93 
    9493    <!--
    9594    **********************************************************
     
    10099    -->
    101100    <target name="revision">
    102 
    103101        <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
    104102            <env key="LANG" value="C"/>
     
    110108        <delete file="REVISION"/>
    111109    </target>
    112 
    113110    <!--
    114111    **********************************************************
     
    120117        <delete file="${plugin.jar}"/>
    121118    </target>
    122 
    123119    <!--
    124120    **********************************************************
  • applications/editors/josm/plugins/reltoolbox/build.xml

    r25696 r26174  
    1 <?xml version="1.0" encoding="UTF-8"?>
     1<?xml version="1.0" encoding="utf-8"?>
    22<!--
    33** This is a template build file for a JOSM  plugin.
     
    2929-->
    3030<project name="reltoolbox" default="dist" basedir=".">
    31 
    3231    <!-- enter the SVN commit message -->
    33     <property name="commit.message" value="RelToolbox" />
     32    <property name="commit.message" value="RelToolbox"/>
    3433    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    35     <property name="plugin.main.version" value="3835" />
    36 
    37 
     34    <property name="plugin.main.version" value="3835"/>
    3835    <!--
    3936      ************************************************
    4037      ** should not be necessary to change the following properties
    4138     -->
    42     <property name="josm"                   location="../../core/dist/josm-custom.jar"/>
    43     <property name="plugin.build.dir"       value="build"/>
    44     <property name="plugin.src.dir"         value="src"/>
     39    <property name="josm" location="../../core/dist/josm-custom.jar"/>
     40    <property name="plugin.build.dir" value="build"/>
     41    <property name="plugin.src.dir" value="src"/>
    4542    <!-- this is the directory where the plugin jar is copied to -->
    46     <property name="plugin.dist.dir"        value="../../dist"/>
     43    <property name="plugin.dist.dir" value="../../dist"/>
    4744    <!--property name="plugin.dist.dir"        value="/Users/Zverik/AppData/Roaming/JOSM/plugins"/-->
    4845    <property name="ant.build.javac.target" value="1.5"/>
    49     <property name="plugin.jar"             value="${plugin.dist.dir}/${ant.project.name}.jar"/>
    50 
     46    <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/>
    5147    <!--
    5248    **********************************************************
     
    5753        <mkdir dir="${plugin.build.dir}"/>
    5854    </target>
    59 
    6055    <!--
    6156    **********************************************************
     
    7065        </javac>
    7166    </target>
    72 
    7367    <!--
    7468    **********************************************************
     
    8175            <fileset dir="images"/>
    8276        </copy>
     77        <copy todir="${plugin.build.dir}/data">
     78            <fileset dir="data"/>
     79        </copy>
    8380        <copy todir="${plugin.build.dir}">
    84             <fileset dir="src" includes="**/*.txt" />
     81            <fileset dir="src" includes="**/*.txt"/>
    8582        </copy>
    8683        <copy todir="${plugin.build.dir}">
    8784            <fileset dir=".">
    88                 <include name="README" />
    89                 <include name="LICENSE" />
     85                <include name="README"/>
     86                <include name="LICENSE"/>
    9087            </fileset>
    9188        </copy>
     
    113110        </jar>
    114111    </target>
    115 
    116112    <!--
    117113    **********************************************************
     
    122118    -->
    123119    <target name="revision">
    124 
    125120        <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
    126121            <env key="LANG" value="C"/>
     
    132127        <delete file="REVISION"/>
    133128    </target>
    134 
    135129    <!--
    136130    **********************************************************
     
    142136        <delete file="${plugin.jar}"/>
    143137    </target>
    144 
    145138    <!--
    146139    **********************************************************
     
    157150        <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
    158151    </target>
    159 
    160 
    161152    <!--
    162153    ************************** Publishing the plugin ***********************************
     
    177168        <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
    178169        <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
    179         <delete file="core.info.xml" />
    180     </target>
    181 
     170        <delete file="core.info.xml"/>
     171    </target>
    182172    <!--
    183173        ** commits the source tree for this plugin
     
    192182        </exec>
    193183    </target>
    194 
    195184    <!--
    196185        ** updates (svn up) the source tree for this plugin
     
    210199        </exec>
    211200    </target>
    212 
    213201    <!--
    214202        ** commits the plugin.jar
     
    232220        </exec>
    233221    </target>
    234 
    235222    <!-- ** make sure svn is present as a command line tool ** -->
    236223    <target name="ensure-svn-present">
    237224        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
    238             <env key="LANG" value="C" />
    239             <arg value="--version" />
     225            <env key="LANG" value="C"/>
     226            <arg value="--version"/>
    240227        </exec>
    241228        <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
     
    243230            <condition>
    244231                <not>
    245                     <isset property="svn.exit.code" />
     232                    <isset property="svn.exit.code"/>
    246233                </not>
    247234            </condition>
     
    250237            <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
    251238            <condition>
    252                 <isfailure code="${svn.exit.code}" />
     239                <isfailure code="${svn.exit.code}"/>
    253240            </condition>
    254241        </fail>
    255242    </target>
    256 
    257243    <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
    258244    </target>
  • applications/editors/josm/plugins/restart/build.xml

    r25199 r26174  
    1 <?xml version="1.0" encoding="UTF-8"?>
     1<?xml version="1.0" encoding="utf-8"?>
    22<!--
    33** This is a template build file for a JOSM  plugin.
     
    2929-->
    3030<project name="restart" default="dist" basedir=".">
    31 
    3231    <!-- enter the SVN commit message -->
    33     <property name="commit.message" value="Commit message" />
     32    <property name="commit.message" value="Commit message"/>
    3433    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    35     <property name="plugin.main.version" value="3835" />
    36 
    37 
     34    <property name="plugin.main.version" value="3835"/>
    3835    <!--
    3936      ************************************************
    4037      ** should not be necessary to change the following properties
    4138     -->
    42     <property name="josm"                   location="../../core/dist/josm-custom.jar"/>
    43     <property name="plugin.build.dir"       value="build"/>
    44     <property name="plugin.src.dir"         value="src"/>
     39    <property name="josm" location="../../core/dist/josm-custom.jar"/>
     40    <property name="plugin.build.dir" value="build"/>
     41    <property name="plugin.src.dir" value="src"/>
    4542    <!-- this is the directory where the plugin jar is copied to -->
    46     <property name="plugin.dist.dir"        value="../../dist"/>
     43    <property name="plugin.dist.dir" value="../../dist"/>
    4744    <property name="ant.build.javac.target" value="1.5"/>
    48     <property name="plugin.dist.dir"        value="../../dist"/>
    49     <property name="plugin.jar"             value="${plugin.dist.dir}/${ant.project.name}.jar"/>
    50 
     45    <property name="plugin.dist.dir" value="../../dist"/>
     46    <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/>
    5147    <!--
    5248    **********************************************************
     
    5753        <mkdir dir="${plugin.build.dir}"/>
    5854    </target>
    59 
    6055    <!--
    6156    **********************************************************
     
    7065        </javac>
    7166    </target>
    72 
    7367    <!--
    7468    **********************************************************
     
    8074        <copy todir="${plugin.build.dir}">
    8175            <fileset dir=".">
    82                 <include name="README" />
    83                 <include name="LICENSE" />
     76                <include name="README"/>
     77                <include name="LICENSE"/>
    8478            </fileset>
     79        </copy>
     80        <copy todir="${plugin.build.dir}/data">
     81            <fileset dir="data"/>
    8582        </copy>
    8683        <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
     
    103100        </jar>
    104101    </target>
    105 
    106102    <!--
    107103    **********************************************************
     
    112108    -->
    113109    <target name="revision">
    114 
    115110        <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
    116111            <env key="LANG" value="C"/>
     
    122117        <delete file="REVISION"/>
    123118    </target>
    124 
    125119    <!--
    126120    **********************************************************
     
    132126        <delete file="${plugin.jar}"/>
    133127    </target>
    134 
    135128    <!--
    136129    **********************************************************
     
    147140        <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
    148141    </target>
    149 
    150 
    151142    <!--
    152143    ************************** Publishing the plugin ***********************************
     
    167158        <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
    168159        <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
    169         <delete file="core.info.xml" />
    170     </target>
    171 
     160        <delete file="core.info.xml"/>
     161    </target>
    172162    <!--
    173163        ** commits the source tree for this plugin
     
    182172        </exec>
    183173    </target>
    184 
    185174    <!--
    186175        ** updates (svn up) the source tree for this plugin
     
    200189        </exec>
    201190    </target>
    202 
    203191    <!--
    204192        ** commits the plugin.jar
     
    222210        </exec>
    223211    </target>
    224 
    225212    <!-- ** make sure svn is present as a command line tool ** -->
    226213    <target name="ensure-svn-present">
    227214        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
    228             <env key="LANG" value="C" />
    229             <arg value="--version" />
     215            <env key="LANG" value="C"/>
     216            <arg value="--version"/>
    230217        </exec>
    231218        <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
     
    233220            <condition>
    234221                <not>
    235                     <isset property="svn.exit.code" />
     222                    <isset property="svn.exit.code"/>
    236223                </not>
    237224            </condition>
     
    240227            <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
    241228            <condition>
    242                 <isfailure code="${svn.exit.code}" />
     229                <isfailure code="${svn.exit.code}"/>
    243230            </condition>
    244231        </fail>
    245232    </target>
    246 
    247233    <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
    248234    </target>
  • applications/editors/josm/plugins/reverter/build.xml

    r26093 r26174  
    1 <?xml version="1.0" encoding="UTF-8"?>
     1<?xml version="1.0" encoding="utf-8"?>
    22<!--
    33** This is a template build file for a JOSM  plugin.
     
    2929-->
    3030<project name="reverter" default="dist" basedir=".">
    31 
    32         <!-- enter the SVN commit message -->
    33         <property name="commit.message" value="recompile after change in OsmPrimitive in JOSM 4099" />
    34         <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    35         <property name="plugin.main.version" value="4099" />
    36 
    37 
    38         <!--
     31    <!-- enter the SVN commit message -->
     32    <property name="commit.message" value="recompile after change in OsmPrimitive in JOSM 4099"/>
     33    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
     34    <property name="plugin.main.version" value="4099"/>
     35    <!--
    3936      ************************************************
    4037      ** should not be necessary to change the following properties
    4138     -->
    42         <property name="josm"                   location="../../core/dist/josm-custom.jar"/>
    43         <property name="plugin.build.dir"       value="build"/>
    44         <property name="plugin.src.dir"         value="src"/>
    45         <!-- this is the directory where the plugin jar is copied to -->
    46         <property name="plugin.dist.dir"        value="../../dist"/>
    47         <property name="ant.build.javac.target" value="1.5"/>
    48         <property name="plugin.dist.dir"        value="../../dist"/>
    49         <property name="plugin.jar"             value="${plugin.dist.dir}/${ant.project.name}.jar"/>
    50 
    51         <!--
     39    <property name="josm" location="../../core/dist/josm-custom.jar"/>
     40    <property name="plugin.build.dir" value="build"/>
     41    <property name="plugin.src.dir" value="src"/>
     42    <!-- this is the directory where the plugin jar is copied to -->
     43    <property name="plugin.dist.dir" value="../../dist"/>
     44    <property name="ant.build.javac.target" value="1.5"/>
     45    <property name="plugin.dist.dir" value="../../dist"/>
     46    <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/>
     47    <!--
    5248    **********************************************************
    5349    ** init - initializes the build
    5450    **********************************************************
    5551    -->
    56         <target name="init">
    57                 <mkdir dir="${plugin.build.dir}"/>
    58         </target>
    59 
    60         <!--
     52    <target name="init">
     53        <mkdir dir="${plugin.build.dir}"/>
     54    </target>
     55    <!--
    6156    **********************************************************
    6257    ** compile - complies the source tree
    6358    **********************************************************
    6459    -->
    65         <target name="compile" depends="init">
    66                 <echo message="compiling sources for  ${plugin.jar} ... "/>
    67                 <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}">
    68                         <compilerarg value="-Xlint:deprecation"/>
    69                         <compilerarg value="-Xlint:unchecked"/>
    70                 </javac>
    71         </target>
    72 
    73         <!--
     60    <target name="compile" depends="init">
     61        <echo message="compiling sources for  ${plugin.jar} ... "/>
     62        <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}">
     63            <compilerarg value="-Xlint:deprecation"/>
     64            <compilerarg value="-Xlint:unchecked"/>
     65        </javac>
     66    </target>
     67    <!--
    7468    **********************************************************
    7569    ** dist - creates the plugin jar
    7670    **********************************************************
    7771    -->
    78         <target name="dist" depends="compile,revision">
    79                 <echo message="creating ${ant.project.name}.jar ... "/>
    80                 <copy todir="${plugin.build.dir}/resources">
    81                         <fileset dir="resources"/>
    82                 </copy>
    83                 <copy todir="${plugin.build.dir}/images">
    84                         <fileset dir="images"/>
    85                 </copy>
    86                 <copy todir="${plugin.build.dir}">
    87                         <fileset dir=".">
    88                                 <include name="README" />
    89                                 <include name="LICENSE" />
    90                         </fileset>
    91                 </copy>
    92                 <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
    93                         <!--
     72    <target name="dist" depends="compile,revision">
     73        <echo message="creating ${ant.project.name}.jar ... "/>
     74        <copy todir="${plugin.build.dir}/resources">
     75            <fileset dir="resources"/>
     76        </copy>
     77        <copy todir="${plugin.build.dir}/images">
     78            <fileset dir="images"/>
     79        </copy>
     80        <copy todir="${plugin.build.dir}/data">
     81            <fileset dir="data"/>
     82        </copy>
     83        <copy todir="${plugin.build.dir}">
     84            <fileset dir=".">
     85                <include name="README"/>
     86                <include name="LICENSE"/>
     87            </fileset>
     88        </copy>
     89        <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
     90            <!--
    9491        ************************************************
    9592        ** configure these properties. Most of them will be copied to the plugins
     
    9996        ************************************************
    10097    -->
    101                         <manifest>
    102                                 <attribute name="Author" value="Upliner"/>
    103                                 <attribute name="Plugin-Class" value="reverter.ReverterPlugin"/>
    104                                 <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
    105                                 <attribute name="Plugin-Description" value="Plugin for reverting changesets"/>
    106                                 <attribute name="Plugin-Icon" value="images/revert-changeset.png"/>
    107                                 <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/wiki/JOSM/Plugins/Reverter"/>
    108                                 <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
    109                                 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
    110                         </manifest>
    111                 </jar>
    112         </target>
    113 
    114         <!--
     98            <manifest>
     99                <attribute name="Author" value="Upliner"/>
     100                <attribute name="Plugin-Class" value="reverter.ReverterPlugin"/>
     101                <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
     102                <attribute name="Plugin-Description" value="Plugin for reverting changesets"/>
     103                <attribute name="Plugin-Icon" value="images/revert-changeset.png"/>
     104                <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/wiki/JOSM/Plugins/Reverter"/>
     105                <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
     106                <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
     107            </manifest>
     108        </jar>
     109    </target>
     110    <!--
    115111    **********************************************************
    116112    ** revision - extracts the current revision number for the
     
    119115    **********************************************************
    120116    -->
    121         <target name="revision">
    122 
    123                 <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
    124                         <env key="LANG" value="C"/>
    125                         <arg value="info"/>
    126                         <arg value="--xml"/>
    127                         <arg value="."/>
    128                 </exec>
    129                 <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
    130                 <delete file="REVISION"/>
    131         </target>
    132 
    133         <!--
     117    <target name="revision">
     118        <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
     119            <env key="LANG" value="C"/>
     120            <arg value="info"/>
     121            <arg value="--xml"/>
     122            <arg value="."/>
     123        </exec>
     124        <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
     125        <delete file="REVISION"/>
     126    </target>
     127    <!--
    134128    **********************************************************
    135129    ** clean - clean up the build environment
    136130    **********************************************************
    137131    -->
    138         <target name="clean">
    139                 <delete dir="${plugin.build.dir}"/>
    140                 <delete file="${plugin.jar}"/>
    141         </target>
    142 
    143         <!--
     132    <target name="clean">
     133        <delete dir="${plugin.build.dir}"/>
     134        <delete file="${plugin.jar}"/>
     135    </target>
     136    <!--
    144137    **********************************************************
    145138    ** install - install the plugin in your local JOSM installation
    146139    **********************************************************
    147140    -->
    148         <target name="install" depends="dist">
    149                 <property environment="env"/>
    150                 <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
    151                         <and>
    152                                 <os family="windows"/>
    153                         </and>
    154                 </condition>
    155                 <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
    156         </target>
    157 
    158 
    159         <!--
    160         ************************** Publishing the plugin ***********************************
    161         -->
    162         <!--
    163                 ** extracts the JOSM release for the JOSM version in ../core and saves it in the
    164                 ** property ${coreversion.info.entry.revision}
    165                 **
    166                 -->
    167         <target name="core-info">
    168                 <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
    169                         <env key="LANG" value="C"/>
    170                         <arg value="info"/>
    171                         <arg value="--xml"/>
    172                         <arg value="../../core"/>
    173                 </exec>
    174                 <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
    175                 <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
    176                 <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
    177                 <delete file="core.info.xml" />
    178         </target>
    179 
    180         <!--
    181                 ** commits the source tree for this plugin
    182                 -->
    183         <target name="commit-current">
    184                 <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
    185                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    186                         <env key="LANG" value="C"/>
    187                         <arg value="commit"/>
    188                         <arg value="-m '${commit.message}'"/>
    189                         <arg value="."/>
    190                 </exec>
    191         </target>
    192 
    193         <!--
    194                 ** updates (svn up) the source tree for this plugin
    195                 -->
    196         <target name="update-current">
    197                 <echo>Updating plugin source ...</echo>
    198                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    199                         <env key="LANG" value="C"/>
    200                         <arg value="up"/>
    201                         <arg value="."/>
    202                 </exec>
    203                 <echo>Updating ${plugin.jar} ...</echo>
    204                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    205                         <env key="LANG" value="C"/>
    206                         <arg value="up"/>
    207                         <arg value="../dist/${plugin.jar}"/>
    208                 </exec>
    209         </target>
    210 
    211         <!--
    212                 ** commits the plugin.jar
    213                 -->
    214         <target name="commit-dist">
    215                 <echo>
    216         ***** Properties of published ${plugin.jar} *****
    217         Commit message    : '${commit.message}'                                 
    218         Plugin-Mainversion: ${plugin.main.version}
    219         JOSM build version: ${coreversion.info.entry.revision}
    220         Plugin-Version    : ${version.entry.commit.revision}
    221         ***** / Properties of published ${plugin.jar} *****                                     
    222                                                
    223         Now commiting ${plugin.jar} ...
    224         </echo>
    225                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    226                         <env key="LANG" value="C"/>
    227                         <arg value="-m '${commit.message}'"/>
    228                         <arg value="commit"/>
    229                         <arg value="${plugin.jar}"/>
    230                 </exec>
    231         </target>
    232 
    233         <!-- ** make sure svn is present as a command line tool ** -->
    234         <target name="ensure-svn-present">
    235                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
    236                         <env key="LANG" value="C" />
    237                         <arg value="--version" />
    238                 </exec>
    239                 <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
    240                         <!-- return code not set at all? Most likely svn isn't installed -->
    241                         <condition>
    242                                 <not>
    243                                         <isset property="svn.exit.code" />
    244                                 </not>
    245                         </condition>
    246                 </fail>
    247                 <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
    248                         <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
    249                         <condition>
    250                                 <isfailure code="${svn.exit.code}" />
    251                         </condition>
    252                 </fail>
    253         </target>
    254 
    255         <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
    256         </target>
     141    <target name="install" depends="dist">
     142        <property environment="env"/>
     143        <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
     144            <and>
     145                <os family="windows"/>
     146            </and>
     147        </condition>
     148        <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
     149    </target>
     150    <!--
     151    ************************** Publishing the plugin ***********************************
     152    -->
     153    <!--
     154        ** extracts the JOSM release for the JOSM version in ../core and saves it in the
     155        ** property ${coreversion.info.entry.revision}
     156        **
     157        -->
     158    <target name="core-info">
     159        <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
     160            <env key="LANG" value="C"/>
     161            <arg value="info"/>
     162            <arg value="--xml"/>
     163            <arg value="../../core"/>
     164        </exec>
     165        <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
     166        <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
     167        <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
     168        <delete file="core.info.xml"/>
     169    </target>
     170    <!--
     171        ** commits the source tree for this plugin
     172        -->
     173    <target name="commit-current">
     174        <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
     175        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     176            <env key="LANG" value="C"/>
     177            <arg value="commit"/>
     178            <arg value="-m '${commit.message}'"/>
     179            <arg value="."/>
     180        </exec>
     181    </target>
     182    <!--
     183        ** updates (svn up) the source tree for this plugin
     184        -->
     185    <target name="update-current">
     186        <echo>Updating plugin source ...</echo>
     187        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     188            <env key="LANG" value="C"/>
     189            <arg value="up"/>
     190            <arg value="."/>
     191        </exec>
     192        <echo>Updating ${plugin.jar} ...</echo>
     193        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     194            <env key="LANG" value="C"/>
     195            <arg value="up"/>
     196            <arg value="../dist/${plugin.jar}"/>
     197        </exec>
     198    </target>
     199    <!--
     200        ** commits the plugin.jar
     201        -->
     202    <target name="commit-dist">
     203        <echo>
     204    ***** Properties of published ${plugin.jar} *****
     205    Commit message    : '${commit.message}'                 
     206    Plugin-Mainversion: ${plugin.main.version}
     207    JOSM build version: ${coreversion.info.entry.revision}
     208    Plugin-Version    : ${version.entry.commit.revision}
     209    ***** / Properties of published ${plugin.jar} *****                 
     210                       
     211    Now commiting ${plugin.jar} ...
     212    </echo>
     213        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     214            <env key="LANG" value="C"/>
     215            <arg value="-m '${commit.message}'"/>
     216            <arg value="commit"/>
     217            <arg value="${plugin.jar}"/>
     218        </exec>
     219    </target>
     220    <!-- ** make sure svn is present as a command line tool ** -->
     221    <target name="ensure-svn-present">
     222        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
     223            <env key="LANG" value="C"/>
     224            <arg value="--version"/>
     225        </exec>
     226        <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
     227            <!-- return code not set at all? Most likely svn isn't installed -->
     228            <condition>
     229                <not>
     230                    <isset property="svn.exit.code"/>
     231                </not>
     232            </condition>
     233        </fail>
     234        <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
     235            <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
     236            <condition>
     237                <isfailure code="${svn.exit.code}"/>
     238            </condition>
     239        </fail>
     240    </target>
     241    <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
     242    </target>
    257243</project>
  • applications/editors/josm/plugins/rgisopen/build.xml

    r23351 r26174  
    1 <?xml version="1.0" encoding="UTF-8"?>
     1<?xml version="1.0" encoding="utf-8"?>
    22<!--
    33** This is a template build file for a JOSM  plugin.
     
    2929-->
    3030<project name="rgisopen" default="dist" basedir=".">
    31 
    3231    <!-- enter the SVN commit message -->
    33     <property name="commit.message" value="New plugin, rgisopen" />
     32    <property name="commit.message" value="New plugin, rgisopen"/>
    3433    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    35     <property name="plugin.main.version" value="3400" />
    36 
    37 
     34    <property name="plugin.main.version" value="3400"/>
    3835    <!--
    3936      ************************************************
    4037      ** should not be necessary to change the following properties
    4138     -->
    42     <property name="josm"                   location="../../josm-latest.jar"/>
    43     <property name="plugin.build.dir"       value="build"/>
    44     <property name="plugin.src.dir"         value="src"/>
     39    <property name="josm" location="../../josm-latest.jar"/>
     40    <property name="plugin.build.dir" value="build"/>
     41    <property name="plugin.src.dir" value="src"/>
    4542    <!-- this is the directory where the plugin jar is copied to -->
    46     <property name="plugin.dist.dir"        value="../../dist"/>
     43    <property name="plugin.dist.dir" value="../../dist"/>
    4744    <property name="ant.build.javac.target" value="1.5"/>
    48     <property name="plugin.dist.dir"        value="../../dist"/>
    49     <property name="plugin.jar"             value="${plugin.dist.dir}/${ant.project.name}.jar"/>
    50 
     45    <property name="plugin.dist.dir" value="../../dist"/>
     46    <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/>
    5147    <!--
    5248    **********************************************************
     
    5753        <mkdir dir="${plugin.build.dir}"/>
    5854    </target>
    59 
    6055    <!--
    6156    **********************************************************
     
    7065        </javac>
    7166    </target>
    72 
    7367    <!--
    7468    **********************************************************
     
    8478            <fileset dir="images"/>
    8579        </copy>
     80        <copy todir="${plugin.build.dir}/data">
     81            <fileset dir="data"/>
     82        </copy>
    8683        <copy todir="${plugin.build.dir}">
    8784            <fileset dir=".">
    88                 <include name="README" />
    89                 <include name="LICENSE" />
     85                <include name="README"/>
     86                <include name="LICENSE"/>
    9087            </fileset>
    9188        </copy>
     
    108105                <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
    109106                <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
    110                 <attribute name="Plugin-Requires" value="PicLayer"/>
     107                <attribute name="Plugin-Requires" value="PicLayer"/>
    111108            </manifest>
    112109        </jar>
    113110    </target>
    114 
    115111    <!--
    116112    **********************************************************
     
    121117    -->
    122118    <target name="revision">
    123 
    124119        <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
    125120            <env key="LANG" value="C"/>
     
    131126        <delete file="REVISION"/>
    132127    </target>
    133 
    134128    <!--
    135129    **********************************************************
     
    141135        <delete file="${plugin.jar}"/>
    142136    </target>
    143 
    144137    <!--
    145138    **********************************************************
     
    156149        <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
    157150    </target>
    158 
    159 
    160151    <!--
    161152    ************************** Publishing the plugin ***********************************
     
    176167        <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
    177168        <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
    178         <delete file="core.info.xml" />
    179     </target>
    180 
     169        <delete file="core.info.xml"/>
     170    </target>
    181171    <!--
    182172        ** commits the source tree for this plugin
     
    191181        </exec>
    192182    </target>
    193 
    194183    <!--
    195184        ** updates (svn up) the source tree for this plugin
     
    209198        </exec>
    210199    </target>
    211 
    212200    <!--
    213201        ** commits the plugin.jar
     
    231219        </exec>
    232220    </target>
    233 
    234221    <!-- ** make sure svn is present as a command line tool ** -->
    235222    <target name="ensure-svn-present">
    236223        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
    237             <env key="LANG" value="C" />
    238             <arg value="--version" />
     224            <env key="LANG" value="C"/>
     225            <arg value="--version"/>
    239226        </exec>
    240227        <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
     
    242229            <condition>
    243230                <not>
    244                     <isset property="svn.exit.code" />
     231                    <isset property="svn.exit.code"/>
    245232                </not>
    246233            </condition>
     
    249236            <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
    250237            <condition>
    251                 <isfailure code="${svn.exit.code}" />
     238                <isfailure code="${svn.exit.code}"/>
    252239            </condition>
    253240        </fail>
    254241    </target>
    255 
    256242    <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
    257243    </target>
  • applications/editors/josm/plugins/roadsigns/build.xml

    r25192 r26174  
    1 <?xml version="1.0" encoding="UTF-8"?>
     1<?xml version="1.0" encoding="utf-8"?>
    22<!--
    33** This is a template build file for a JOSM  plugin.
     
    2929-->
    3030<project name="RoadSigns" default="dist" basedir=".">
    31 
    32         <!-- enter the SVN commit message -->
    33         <property name="commit.message" value="preset maintenance" />
    34         <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    35         <property name="plugin.main.version" value="3835" />
    36 
    37 
    38         <!--
     31    <!-- enter the SVN commit message -->
     32    <property name="commit.message" value="preset maintenance"/>
     33    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
     34    <property name="plugin.main.version" value="3835"/>
     35    <!--
    3936      ************************************************
    4037      ** should not be necessary to change the following properties
    4138     -->
    42         <property name="josm"                   location="../../core/dist/josm-custom.jar"/>
    43         <property name="plugin.build.dir"       value="build"/>
    44         <property name="plugin.src.dir"         value="src"/>
    45         <!-- this is the directory where the plugin jar is copied to -->
    46         <property name="plugin.dist.dir"        value="../../dist"/>
    47         <property name="ant.build.javac.target" value="1.5"/>
    48         <property name="plugin.dist.dir"        value="../../dist"/>
    49         <property name="plugin.jar"             value="${plugin.dist.dir}/${ant.project.name}.jar"/>
    50 
    51         <!--
     39    <property name="josm" location="../../core/dist/josm-custom.jar"/>
     40    <property name="plugin.build.dir" value="build"/>
     41    <property name="plugin.src.dir" value="src"/>
     42    <!-- this is the directory where the plugin jar is copied to -->
     43    <property name="plugin.dist.dir" value="../../dist"/>
     44    <property name="ant.build.javac.target" value="1.5"/>
     45    <property name="plugin.dist.dir" value="../../dist"/>
     46    <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/>
     47    <!--
    5248    **********************************************************
    5349    ** init - initializes the build
    5450    **********************************************************
    5551    -->
    56         <target name="init">
    57                 <mkdir dir="${plugin.build.dir}"/>
    58         </target>
    59 
    60         <!--
     52    <target name="init">
     53        <mkdir dir="${plugin.build.dir}"/>
     54    </target>
     55    <!--
    6156    **********************************************************
    6257    ** compile - complies the source tree
    6358    **********************************************************
    6459    -->
    65         <target name="compile" depends="init">
    66                 <echo message="compiling sources for  ${plugin.jar} ... "/>
    67                 <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}">
    68                         <compilerarg value="-Xlint:deprecation"/>
    69                         <compilerarg value="-Xlint:unchecked"/>
    70                 </javac>
    71         </target>
    72 
    73         <!--
     60    <target name="compile" depends="init">
     61        <echo message="compiling sources for  ${plugin.jar} ... "/>
     62        <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}">
     63            <compilerarg value="-Xlint:deprecation"/>
     64            <compilerarg value="-Xlint:unchecked"/>
     65        </javac>
     66    </target>
     67    <!--
    7468    **********************************************************
    7569    ** dist - creates the plugin jar
    7670    **********************************************************
    7771    -->
    78         <target name="dist" depends="compile,revision">
    79                 <echo message="creating ${ant.project.name}.jar ... "/>
    80                 <copy todir="${plugin.build.dir}/images">
    81                         <fileset dir="images"/>
    82                 </copy>
    83                 <copy todir="${plugin.build.dir}/data">
    84                         <fileset dir="data"/>
    85                 </copy>
    86                 <copy todir="${plugin.build.dir}">
    87                         <fileset dir=".">
    88                                 <include name="README" />
    89                                 <include name="LICENSE" />
    90                         </fileset>
    91                 </copy>
    92                 <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
    93                         <!--
    94         ************************************************
    95         ** configure these properties. Most of them will be copied to the plugins
    96         ** manifest file. Property values will also show up in the list available
    97         ** plugins: http://josm.openstreetmap.de/wiki/Plugins.
    98         **
    99         ************************************************
    100     -->
    101                         <manifest>
    102                                 <attribute name="Author" value="Sebastian Klein"/>
    103                                 <attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.roadsigns.RoadSignsPlugin"/>
    104                                 <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
    105                                 <attribute name="Plugin-Description" value="Plugin for tagging of objects based on a selection of road signs. The dialog can be opened by clicking a small icon in the upper right corner of the properties window. Available country presets: Germany."/>
    106                                 <attribute name="Plugin-Icon" value="images/pref/roadsigns.png"/>
    107                                 <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/wiki/JOSM/Plugins/RoadSigns"/>
    108                                 <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
    109                                 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
    110                         </manifest>
    111                 </jar>
    112         </target>
    113 
    114         <!--
     72    <target name="dist" depends="compile,revision">
     73        <echo message="creating ${ant.project.name}.jar ... "/>
     74        <copy todir="${plugin.build.dir}/images">
     75            <fileset dir="images"/>
     76        </copy>
     77        <copy todir="${plugin.build.dir}/data">
     78            <fileset dir="data"/>
     79        </copy>
     80        <copy todir="${plugin.build.dir}">
     81            <fileset dir=".">
     82                <include name="README"/>
     83                <include name="LICENSE"/>
     84            </fileset>
     85        </copy>
     86        <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
     87            <!--
     88            ************************************************
     89            ** configure these properties. Most of them will be copied to the plugins
     90            ** manifest file. Property values will also show up in the list available
     91            ** plugins: http://josm.openstreetmap.de/wiki/Plugins.
     92            **
     93            ************************************************
     94            -->
     95            <manifest>
     96                <attribute name="Author" value="Sebastian Klein"/>
     97                <attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.roadsigns.RoadSignsPlugin"/>
     98                <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
     99                <attribute name="Plugin-Description" value="Plugin for tagging of objects based on a selection of road signs. The dialog can be opened by clicking a small icon in the upper right corner of the properties window. Available country presets: Germany."/>
     100                <attribute name="Plugin-Icon" value="images/pref/roadsigns.png"/>
     101                <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/wiki/JOSM/Plugins/RoadSigns"/>
     102                <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
     103                <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
     104            </manifest>
     105        </jar>
     106    </target>
     107    <!--
    115108    **********************************************************
    116109    ** revision - extracts the current revision number for the
     
    119112    **********************************************************
    120113    -->
    121         <target name="revision">
    122 
    123                 <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
    124                         <env key="LANG" value="C"/>
    125                         <arg value="info"/>
    126                         <arg value="--xml"/>
    127                         <arg value="."/>
    128                 </exec>
    129                 <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
    130                 <delete file="REVISION"/>
    131         </target>
    132 
    133         <!--
     114    <target name="revision">
     115        <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
     116            <env key="LANG" value="C"/>
     117            <arg value="info"/>
     118            <arg value="--xml"/>
     119            <arg value="."/>
     120        </exec>
     121        <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
     122        <delete file="REVISION"/>
     123    </target>
     124    <!--
    134125    **********************************************************
    135126    ** clean - clean up the build environment
    136127    **********************************************************
    137128    -->
    138         <target name="clean">
    139                 <delete dir="${plugin.build.dir}"/>
    140                 <delete file="${plugin.jar}"/>
    141         </target>
    142 
    143         <!--
     129    <target name="clean">
     130        <delete dir="${plugin.build.dir}"/>
     131        <delete file="${plugin.jar}"/>
     132    </target>
     133    <!--
    144134    **********************************************************
    145135    ** install - install the plugin in your local JOSM installation
    146136    **********************************************************
    147137    -->
    148         <target name="install" depends="dist">
    149                 <property environment="env"/>
    150                 <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
    151                         <and>
    152                                 <os family="windows"/>
    153                         </and>
    154                 </condition>
    155                 <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
    156         </target>
    157 
    158 
    159         <!--
    160         ************************** Publishing the plugin ***********************************
    161         -->
    162         <!--
    163                 ** extracts the JOSM release for the JOSM version in ../core and saves it in the
    164                 ** property ${coreversion.info.entry.revision}
    165                 **
    166                 -->
    167         <target name="core-info">
    168                 <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
    169                         <env key="LANG" value="C"/>
    170                         <arg value="info"/>
    171                         <arg value="--xml"/>
    172                         <arg value="../../core"/>
    173                 </exec>
    174                 <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
    175                 <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
    176                 <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
    177                 <delete file="core.info.xml" />
    178         </target>
    179 
    180         <!--
    181                 ** commits the source tree for this plugin
    182                 -->
    183         <target name="commit-current">
    184                 <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
    185                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    186                         <env key="LANG" value="C"/>
    187                         <arg value="commit"/>
    188                         <arg value="-m '${commit.message}'"/>
    189                         <arg value="."/>
    190                 </exec>
    191         </target>
    192 
    193         <!--
    194                 ** updates (svn up) the source tree for this plugin
    195                 -->
    196         <target name="update-current">
    197                 <echo>Updating plugin source ...</echo>
    198                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    199                         <env key="LANG" value="C"/>
    200                         <arg value="up"/>
    201                         <arg value="."/>
    202                 </exec>
    203                 <echo>Updating ${plugin.jar} ...</echo>
    204                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    205                         <env key="LANG" value="C"/>
    206                         <arg value="up"/>
    207                         <arg value="../dist/${plugin.jar}"/>
    208                 </exec>
    209         </target>
    210 
    211         <!--
    212                 ** commits the plugin.jar
    213                 -->
    214         <target name="commit-dist">
    215                 <echo>
    216         ***** Properties of published ${plugin.jar} *****
    217         Commit message    : '${commit.message}'                                 
    218         Plugin-Mainversion: ${plugin.main.version}
    219         JOSM build version: ${coreversion.info.entry.revision}
    220         Plugin-Version    : ${version.entry.commit.revision}
    221         ***** / Properties of published ${plugin.jar} *****                                     
    222                                                
    223         Now commiting ${plugin.jar} ...
    224         </echo>
    225                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    226                         <env key="LANG" value="C"/>
    227                         <arg value="-m '${commit.message}'"/>
    228                         <arg value="commit"/>
    229                         <arg value="${plugin.jar}"/>
    230                 </exec>
    231         </target>
    232 
    233         <!-- ** make sure svn is present as a command line tool ** -->
    234         <target name="ensure-svn-present">
    235                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
    236                         <env key="LANG" value="C" />
    237                         <arg value="--version" />
    238                 </exec>
    239                 <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
    240                         <!-- return code not set at all? Most likely svn isn't installed -->
    241                         <condition>
    242                                 <not>
    243                                         <isset property="svn.exit.code" />
    244                                 </not>
    245                         </condition>
    246                 </fail>
    247                 <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
    248                         <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
    249                         <condition>
    250                                 <isfailure code="${svn.exit.code}" />
    251                         </condition>
    252                 </fail>
    253         </target>
    254 
    255         <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
    256         </target>
     138    <target name="install" depends="dist">
     139        <property environment="env"/>
     140        <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
     141            <and>
     142                <os family="windows"/>
     143            </and>
     144        </condition>
     145        <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
     146    </target>
     147    <!--
     148    ************************** Publishing the plugin ***********************************
     149    -->
     150    <!--
     151        ** extracts the JOSM release for the JOSM version in ../core and saves it in the
     152        ** property ${coreversion.info.entry.revision}
     153        **
     154        -->
     155    <target name="core-info">
     156        <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
     157            <env key="LANG" value="C"/>
     158            <arg value="info"/>
     159            <arg value="--xml"/>
     160            <arg value="../../core"/>
     161        </exec>
     162        <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
     163        <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
     164        <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
     165        <delete file="core.info.xml"/>
     166    </target>
     167    <!--
     168        ** commits the source tree for this plugin
     169        -->
     170    <target name="commit-current">
     171        <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
     172        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     173            <env key="LANG" value="C"/>
     174            <arg value="commit"/>
     175            <arg value="-m '${commit.message}'"/>
     176            <arg value="."/>
     177        </exec>
     178    </target>
     179    <!--
     180        ** updates (svn up) the source tree for this plugin
     181        -->
     182    <target name="update-current">
     183        <echo>Updating plugin source ...</echo>
     184        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     185            <env key="LANG" value="C"/>
     186            <arg value="up"/>
     187            <arg value="."/>
     188        </exec>
     189        <echo>Updating ${plugin.jar} ...</echo>
     190        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     191            <env key="LANG" value="C"/>
     192            <arg value="up"/>
     193            <arg value="../dist/${plugin.jar}"/>
     194        </exec>
     195    </target>
     196    <!--
     197        ** commits the plugin.jar
     198        -->
     199    <target name="commit-dist">
     200        <echo>
     201    ***** Properties of published ${plugin.jar} *****
     202    Commit message    : '${commit.message}'                 
     203    Plugin-Mainversion: ${plugin.main.version}
     204    JOSM build version: ${coreversion.info.entry.revision}
     205    Plugin-Version    : ${version.entry.commit.revision}
     206    ***** / Properties of published ${plugin.jar} *****                 
     207                       
     208    Now commiting ${plugin.jar} ...
     209    </echo>
     210        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     211            <env key="LANG" value="C"/>
     212            <arg value="-m '${commit.message}'"/>
     213            <arg value="commit"/>
     214            <arg value="${plugin.jar}"/>
     215        </exec>
     216    </target>
     217    <!-- ** make sure svn is present as a command line tool ** -->
     218    <target name="ensure-svn-present">
     219        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
     220            <env key="LANG" value="C"/>
     221            <arg value="--version"/>
     222        </exec>
     223        <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
     224            <!-- return code not set at all? Most likely svn isn't installed -->
     225            <condition>
     226                <not>
     227                    <isset property="svn.exit.code"/>
     228                </not>
     229            </condition>
     230        </fail>
     231        <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
     232            <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
     233            <condition>
     234                <isfailure code="${svn.exit.code}"/>
     235            </condition>
     236        </fail>
     237    </target>
     238    <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
     239    </target>
    257240</project>
  • applications/editors/josm/plugins/routes/build.xml

    r25199 r26174  
    1 <?xml version="1.0" encoding="UTF-8"?>
     1<?xml version="1.0" encoding="utf-8"?>
    22<!--
    33** This is the build file for the routes plugin
     
    2626-->
    2727<project name="routes" default="dist" basedir=".">
     28    <property name="commit.message" value="Changed the constructor signature of the plugin main class"/>
     29    <property name="plugin.main.version" value="3835"/>
     30    <property name="josm" location="../../core/dist/josm-custom.jar"/>
     31    <property name="plugin.dist.dir" value="../../dist"/>
     32    <property name="plugin.build.dir" value="build"/>
     33    <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/>
     34    <property name="ant.build.javac.target" value="1.5"/>
     35    <target name="init">
     36        <mkdir dir="${plugin.build.dir}"/>
     37    </target>
     38    <target name="compile" depends="init">
     39        <echo message="creating ${plugin.jar}"/>
     40        <javac srcdir="src" debug="true" destdir="${plugin.build.dir}">
     41            <compilerarg value="-Xlint:deprecation"/>
     42            <compilerarg value="-Xlint:unchecked"/>
     43            <classpath>
     44                <pathelement location="${josm}"/>
     45                <fileset dir="lib">
     46                    <include name="**/*.jar"/>
     47                </fileset>
     48            </classpath>
     49        </javac>
     50        <copy file="src/org/openstreetmap/josm/plugins/routes/xml/routes.xml" todir="${plugin.build.dir}/org/openstreetmap/josm/plugins/routes/xml"/>
     51        <copy file="src/org/openstreetmap/josm/plugins/routes/xml/routes.xsd" todir="${plugin.build.dir}/org/openstreetmap/josm/plugins/routes/xml"/>
     52    </target>
     53    <target name="dist" depends="compile,revision">
     54        <copy todir="${plugin.build.dir}/data">
     55            <fileset dir="data"/>
     56        </copy>
     57        <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
     58            <zipfileset src="lib/jsr173-1.0_api.jar" includes="**/*"/>
     59            <zipfileset src="lib/jaxb-api.jar" includes="**/*"/>
     60            <zipfileset src="lib/jaxb-impl.jar" includes="**/*.class"/>
     61            <zipfileset src="lib/activation.jar" includes="**/*.class"/>
     62            <manifest>
     63                <attribute name="Author" value="Jiri Klement"/>
     64                <attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.routes.RoutesPlugin"/>
     65                <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
     66                <attribute name="Plugin-Description" value="Renders routes (bus, hiking trails, bicycle routes, ..). Route types must be defined in routes.xml file in plugin directory"/>
     67                <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
     68                <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
     69            </manifest>
     70        </jar>
     71    </target>
     72    <target name="revision">
     73        <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
     74            <env key="LANG" value="C"/>
     75            <arg value="info"/>
     76            <arg value="--xml"/>
     77            <arg value="."/>
     78        </exec>
     79        <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
     80        <delete file="REVISION"/>
     81    </target>
     82    <target name="clean">
     83        <delete dir="${plugin.build.dir}"/>
     84        <delete file="${plugin.jar}"/>
     85    </target>
     86    <target name="install" depends="dist">
     87        <property environment="env"/>
     88        <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
     89            <and>
     90                <os family="windows"/>
     91            </and>
     92        </condition>
     93        <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
     94    </target>
     95    <!--
     96         ************************** Publishing the plugin ***********************************
     97        -->
     98    <!--
     99        ** extracts the JOSM release for the JOSM version in ../core and saves it in the
     100        ** property ${coreversion.info.entry.revision}
     101        **
     102        -->
     103    <target name="core-info">
     104        <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
     105            <env key="LANG" value="C"/>
     106            <arg value="info"/>
     107            <arg value="--xml"/>
     108            <arg value="../../core"/>
     109        </exec>
     110        <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
     111        <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
     112        <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
     113        <delete file="core.info.xml"/>
     114    </target>
     115    <!--
     116        ** commits the source tree for this plugin
     117        -->
     118    <target name="commit-current">
     119        <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
     120        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     121            <env key="LANG" value="C"/>
     122            <arg value="commit"/>
     123            <arg value="-m '${commit.message}'"/>
     124            <arg value="."/>
     125        </exec>
     126    </target>
     127    <!--
     128        ** updates (svn up) the source tree for this plugin
     129        -->
     130    <target name="update-current">
     131        <echo>Updating plugin source ...</echo>
     132        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     133            <env key="LANG" value="C"/>
     134            <arg value="up"/>
     135            <arg value="."/>
     136        </exec>
     137        <echo>Updating ${plugin.jar} ...</echo>
     138        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     139            <env key="LANG" value="C"/>
     140            <arg value="up"/>
     141            <arg value="../dist/${plugin.jar}"/>
     142        </exec>
     143    </target>
     144    <!--
     145        ** commits the plugin.jar
     146        -->
     147    <target name="commit-dist">
     148        <echo>
     149    ***** Properties of published ${plugin.jar} *****
     150    Commit message    : '${commit.message}'
     151    Plugin-Mainversion: ${plugin.main.version}
     152    JOSM build version: ${coreversion.info.entry.revision}
     153    Plugin-Version    : ${version.entry.commit.revision}
     154    ***** / Properties of published ${plugin.jar} *****
    28155
    29         <property name="commit.message" value="Changed the constructor signature of the plugin main class" />
    30         <property name="plugin.main.version" value="3835" />
    31 
    32         <property name="josm"                   location="../../core/dist/josm-custom.jar"/>
    33         <property name="plugin.dist.dir"        value="../../dist"/>
    34         <property name="plugin.build.dir"       value="build"/>
    35         <property name="plugin.jar"             value="${plugin.dist.dir}/${ant.project.name}.jar"/>
    36         <property name="ant.build.javac.target" value="1.5"/>
    37         <target name="init">
    38                 <mkdir dir="${plugin.build.dir}"/>
    39         </target>
    40         <target name="compile" depends="init">
    41                 <echo message="creating ${plugin.jar}"/>
    42                 <javac srcdir="src" debug="true" destdir="${plugin.build.dir}">
    43                         <compilerarg value="-Xlint:deprecation"/>
    44                         <compilerarg value="-Xlint:unchecked"/>
    45                         <classpath>
    46                                 <pathelement location="${josm}"/>
    47                                 <fileset dir="lib">
    48                                         <include name="**/*.jar"/>
    49                                 </fileset>
    50                         </classpath>
    51                 </javac>
    52                 <copy file="src/org/openstreetmap/josm/plugins/routes/xml/routes.xml" todir="${plugin.build.dir}/org/openstreetmap/josm/plugins/routes/xml"/>
    53                 <copy file="src/org/openstreetmap/josm/plugins/routes/xml/routes.xsd" todir="${plugin.build.dir}/org/openstreetmap/josm/plugins/routes/xml"/>
    54 
    55         </target>
    56         <target name="dist" depends="compile,revision">
    57                 <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
    58                         <zipfileset src="lib/jsr173-1.0_api.jar" includes="**/*"/>
    59                         <zipfileset src="lib/jaxb-api.jar" includes="**/*"/>
    60                         <zipfileset src="lib/jaxb-impl.jar" includes="**/*.class"/>
    61                         <zipfileset src="lib/activation.jar" includes="**/*.class"/>
    62                         <manifest>
    63                                 <attribute name="Author" value="Jiri Klement"/>
    64                                 <attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.routes.RoutesPlugin"/>
    65                                 <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
    66                                 <attribute name="Plugin-Description" value="Renders routes (bus, hiking trails, bicycle routes, ..). Route types must be defined in routes.xml file in plugin directory"/>
    67                                 <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
    68                                 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
    69                         </manifest>
    70                 </jar>
    71         </target>
    72         <target name="revision">
    73                 <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
    74                         <env key="LANG" value="C"/>
    75                         <arg value="info"/>
    76                         <arg value="--xml"/>
    77                         <arg value="."/>
    78                 </exec>
    79                 <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
    80                 <delete file="REVISION"/>
    81         </target>
    82         <target name="clean">
    83                 <delete dir="${plugin.build.dir}"/>
    84                 <delete file="${plugin.jar}"/>
    85         </target>
    86         <target name="install" depends="dist">
    87                 <property environment="env"/>
    88                 <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
    89                         <and>
    90                                 <os family="windows"/>
    91                         </and>
    92                 </condition>
    93                 <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
    94         </target>
    95 
    96 
    97         <!--
    98                  ************************** Publishing the plugin ***********************************
    99                 -->
    100         <!--
    101                 ** extracts the JOSM release for the JOSM version in ../core and saves it in the
    102                 ** property ${coreversion.info.entry.revision}
    103                 **
    104                 -->
    105         <target name="core-info">
    106                 <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
    107                         <env key="LANG" value="C"/>
    108                         <arg value="info"/>
    109                         <arg value="--xml"/>
    110                         <arg value="../../core"/>
    111                 </exec>
    112                 <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
    113                 <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
    114                 <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
    115                 <delete file="core.info.xml" />
    116         </target>
    117 
    118         <!--
    119                 ** commits the source tree for this plugin
    120                 -->
    121         <target name="commit-current">
    122                 <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
    123                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    124                         <env key="LANG" value="C"/>
    125                         <arg value="commit"/>
    126                         <arg value="-m '${commit.message}'"/>
    127                         <arg value="."/>
    128                 </exec>
    129         </target>
    130 
    131         <!--
    132                 ** updates (svn up) the source tree for this plugin
    133                 -->
    134         <target name="update-current">
    135                 <echo>Updating plugin source ...</echo>
    136                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    137                         <env key="LANG" value="C"/>
    138                         <arg value="up"/>
    139                         <arg value="."/>
    140                 </exec>
    141                 <echo>Updating ${plugin.jar} ...</echo>
    142                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    143                         <env key="LANG" value="C"/>
    144                         <arg value="up"/>
    145                         <arg value="../dist/${plugin.jar}"/>
    146                 </exec>
    147         </target>
    148 
    149         <!--
    150                 ** commits the plugin.jar
    151                 -->
    152         <target name="commit-dist">
    153                 <echo>
    154         ***** Properties of published ${plugin.jar} *****
    155         Commit message    : '${commit.message}'
    156         Plugin-Mainversion: ${plugin.main.version}
    157         JOSM build version: ${coreversion.info.entry.revision}
    158         Plugin-Version    : ${version.entry.commit.revision}
    159         ***** / Properties of published ${plugin.jar} *****
    160 
    161         Now commiting ${plugin.jar} ...
    162         </echo>
    163                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    164                         <env key="LANG" value="C"/>
    165                         <arg value="-m '${commit.message}'"/>
    166                         <arg value="commit"/>
    167                         <arg value="${plugin.jar}"/>
    168                 </exec>
    169         </target>
    170 
    171         <!-- ** make sure svn is present as a command line tool ** -->
    172         <target name="ensure-svn-present">
    173                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
    174                         <env key="LANG" value="C" />
    175                         <arg value="--version" />
    176                 </exec>
    177                 <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
    178                         <!-- return code not set at all? Most likely svn isn't installed -->
    179                         <condition>
    180                                 <not>
    181                                         <isset property="svn.exit.code" />
    182                                 </not>
    183                         </condition>
    184                 </fail>
    185                 <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
    186                         <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
    187                         <condition>
    188                                 <isfailure code="${svn.exit.code}" />
    189                         </condition>
    190                 </fail>
    191         </target>
    192 
    193         <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
    194         </target>
     156    Now commiting ${plugin.jar} ...
     157    </echo>
     158        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     159            <env key="LANG" value="C"/>
     160            <arg value="-m '${commit.message}'"/>
     161            <arg value="commit"/>
     162            <arg value="${plugin.jar}"/>
     163        </exec>
     164    </target>
     165    <!-- ** make sure svn is present as a command line tool ** -->
     166    <target name="ensure-svn-present">
     167        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
     168            <env key="LANG" value="C"/>
     169            <arg value="--version"/>
     170        </exec>
     171        <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
     172            <!-- return code not set at all? Most likely svn isn't installed -->
     173            <condition>
     174                <not>
     175                    <isset property="svn.exit.code"/>
     176                </not>
     177            </condition>
     178        </fail>
     179        <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
     180            <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
     181            <condition>
     182                <isfailure code="${svn.exit.code}"/>
     183            </condition>
     184        </fail>
     185    </target>
     186    <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
     187    </target>
    195188</project>
  • applications/editors/josm/plugins/routing/build.xml

    r26119 r26174  
    1 <?xml version="1.0" encoding="UTF-8"?>
     1<?xml version="1.0" encoding="utf-8"?>
    22<!--
    33** This is the build file for the routing plugin
     
    2626-->
    2727<project name="routing" default="dist" basedir=".">
     28    <property name="commit.message" value="Changed the constructor signature of the plugin main class"/>
     29    <property name="plugin.main.version" value="3835"/>
     30    <!-- Define some properties -->
     31    <property name="josm" location="../../core/dist/josm-custom.jar"/>
     32    <property name="plugin.dist.dir" value="../../dist"/>
     33    <property name="plugin.build.dir" value="build"/>
     34    <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/>
     35    <property name="libdir" location="lib"/>
     36    <property name="jgrapht" value="${libdir}/jgrapht-jdk1.5.jar"/>
     37    <property name="log4j" value="${libdir}/log4j-1.2.15.jar"/>
     38    <property name="ant.build.javac.target" value="1.5"/>
     39    <!-- Some initializations for several other targets -->
     40    <target name="init">
     41        <mkdir dir="${plugin.dist.dir}"/>
     42        <mkdir dir="${plugin.build.dir}"/>
     43    </target>
     44    <!-- Compile sources -->
     45    <target name="compile" depends="init" description="Compile sources">
     46        <echo message="creating ${plugin.jar}"/>
     47        <javac srcdir="src" debug="true" destdir="${plugin.build.dir}">
     48            <compilerarg value="-Xlint:deprecation"/>
     49            <compilerarg value="-Xlint:unchecked"/>
     50            <classpath>
     51                <pathelement location="${josm}"/>
     52                <pathelement location="${jgrapht}"/>
     53                <pathelement location="${log4j}"/>
     54            </classpath>
     55        </javac>
     56    </target>
     57    <!-- Generate distribution -->
     58    <target name="dist" depends="compile,revision" description="Generate distribution">
     59        <unjar dest="${plugin.build.dir}" src="${jgrapht}"/>
     60        <unjar dest="${plugin.build.dir}" src="${log4j}"/>
     61        <copy todir="${plugin.build.dir}/">
     62            <fileset dir="resources">
     63                <include name="*.xml"/>
     64            </fileset>
     65        </copy>
     66        <copy todir="${plugin.build.dir}/images">
     67            <fileset dir="images"/>
     68        </copy>
     69        <copy todir="${plugin.build.dir}/data">
     70            <fileset dir="data"/>
     71        </copy>
     72        <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
     73            <manifest>
     74                <attribute name="Author" value="Jose Vidal &lt;vidalfree@gmail.com&gt;, Juangui Jordán &lt;juangui@gmail.com&gt;, Hassan S &lt;hassan.sabirin@gmail.com&gt;"/>
     75                <attribute name="Plugin-Class" value="com.innovant.josm.plugin.routing.RoutingPlugin"/>
     76                <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
     77                <attribute name="Plugin-Description" value="Provides routing capabilities."/>
     78                <attribute name="Plugin-Icon" value="images/preferences/routing.png"/>
     79                <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/index.php/JOSM/Plugins/Routing"/>
     80                <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
     81                <attribute name="Plugin-Stage" value="50"/>
     82                <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
     83            </manifest>
     84        </jar>
     85    </target>
     86    <target name="revision">
     87        <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
     88            <env key="LANG" value="C"/>
     89            <arg value="info"/>
     90            <arg value="--xml"/>
     91            <arg value="."/>
     92        </exec>
     93        <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
     94        <delete file="REVISION"/>
     95    </target>
     96    <target name="clean">
     97        <delete dir="${plugin.build.dir}"/>
     98        <delete file="${plugin.jar}"/>
     99    </target>
     100    <target name="install" depends="dist">
     101        <property environment="env"/>
     102        <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
     103            <and>
     104                <os family="windows"/>
     105            </and>
     106        </condition>
     107        <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
     108    </target>
     109    <!--
     110         ************************** Publishing the plugin ***********************************
     111        -->
     112    <!--
     113        ** extracts the JOSM release for the JOSM version in ../core and saves it in the
     114        ** property ${coreversion.info.entry.revision}
     115        **
     116        -->
     117    <target name="core-info">
     118        <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
     119            <env key="LANG" value="C"/>
     120            <arg value="info"/>
     121            <arg value="--xml"/>
     122            <arg value="../../core"/>
     123        </exec>
     124        <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
     125        <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
     126        <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
     127        <delete file="core.info.xml"/>
     128    </target>
     129    <!--
     130        ** commits the source tree for this plugin
     131        -->
     132    <target name="commit-current">
     133        <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
     134        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     135            <env key="LANG" value="C"/>
     136            <arg value="commit"/>
     137            <arg value="-m '${commit.message}'"/>
     138            <arg value="."/>
     139        </exec>
     140    </target>
     141    <!--
     142        ** updates (svn up) the source tree for this plugin
     143        -->
     144    <target name="update-current">
     145        <echo>Updating plugin source ...</echo>
     146        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     147            <env key="LANG" value="C"/>
     148            <arg value="up"/>
     149            <arg value="."/>
     150        </exec>
     151        <echo>Updating ${plugin.jar} ...</echo>
     152        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     153            <env key="LANG" value="C"/>
     154            <arg value="up"/>
     155            <arg value="../dist/${plugin.jar}"/>
     156        </exec>
     157    </target>
     158    <!--
     159        ** commits the plugin.jar
     160        -->
     161    <target name="commit-dist">
     162        <echo>
     163    ***** Properties of published ${plugin.jar} *****
     164    Commit message    : '${commit.message}'
     165    Plugin-Mainversion: ${plugin.main.version}
     166    JOSM build version: ${coreversion.info.entry.revision}
     167    Plugin-Version    : ${version.entry.commit.revision}
     168    ***** / Properties of published ${plugin.jar} *****
    28169
    29         <property name="commit.message" value="Changed the constructor signature of the plugin main class" />
    30         <property name="plugin.main.version" value="3835" />
    31 
    32         <!-- Define some properties -->
    33         <property name="josm"                   location="../../core/dist/josm-custom.jar"/>
    34         <property name="plugin.dist.dir"        value="../../dist"/>
    35         <property name="plugin.build.dir"       value="build"/>
    36         <property name="plugin.jar"             value="${plugin.dist.dir}/${ant.project.name}.jar"/>
    37         <property name="libdir"                 location="lib"/>
    38         <property name="jgrapht"                value="${libdir}/jgrapht-jdk1.5.jar"/>
    39         <property name="log4j"                  value="${libdir}/log4j-1.2.15.jar"/>
    40         <property name="ant.build.javac.target" value="1.5"/>
    41         <!-- Some initializations for several other targets -->
    42         <target name="init">
    43                 <mkdir dir="${plugin.dist.dir}"/>
    44                 <mkdir dir="${plugin.build.dir}"/>
    45         </target>
    46         <!-- Compile sources -->
    47         <target name="compile" depends="init" description="Compile sources">
    48                 <echo message="creating ${plugin.jar}"/>
    49                 <javac srcdir="src" debug="true" destdir="${plugin.build.dir}">
    50                         <compilerarg value="-Xlint:deprecation"/>
    51                         <compilerarg value="-Xlint:unchecked"/>
    52                         <classpath>
    53                                 <pathelement location="${josm}"/>
    54                                 <pathelement location="${jgrapht}"/>
    55                                 <pathelement location="${log4j}"/>
    56                         </classpath>
    57                 </javac>
    58         </target>
    59         <!-- Generate distribution -->
    60         <target name="dist" depends="compile,revision" description="Generate distribution">
    61                 <unjar dest="${plugin.build.dir}" src="${jgrapht}"/>
    62                 <unjar dest="${plugin.build.dir}" src="${log4j}"/>
    63                 <copy todir="${plugin.build.dir}/">
    64                         <fileset dir="resources">
    65                                 <include name="*.xml"/>
    66                         </fileset>
    67                 </copy>
    68                 <copy todir="${plugin.build.dir}/images">
    69                         <fileset dir="images"/>
    70                 </copy>
    71                 <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
    72                         <manifest>
    73                                 <attribute name="Author" value="Jose Vidal &lt;vidalfree@gmail.com&gt;, Juangui Jordán &lt;juangui@gmail.com&gt;, Hassan S &lt;hassan.sabirin@gmail.com&gt;"/>
    74                                 <attribute name="Plugin-Class" value="com.innovant.josm.plugin.routing.RoutingPlugin"/>
    75                                 <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
    76                                 <attribute name="Plugin-Description" value="Provides routing capabilities."/>
    77                                 <attribute name="Plugin-Icon" value="images/preferences/routing.png"/>
    78                                 <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/index.php/JOSM/Plugins/Routing"/>
    79                                 <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
    80                                 <attribute name="Plugin-Stage" value="50"/>
    81                                 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
    82                         </manifest>
    83                 </jar>
    84         </target>
    85         <target name="revision">
    86                 <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
    87                         <env key="LANG" value="C"/>
    88                         <arg value="info"/>
    89                         <arg value="--xml"/>
    90                         <arg value="."/>
    91                 </exec>
    92                 <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
    93                 <delete file="REVISION"/>
    94         </target>
    95         <target name="clean">
    96                 <delete dir="${plugin.build.dir}"/>
    97                 <delete file="${plugin.jar}"/>
    98         </target>
    99         <target name="install" depends="dist">
    100                 <property environment="env"/>
    101                 <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
    102                         <and>
    103                                 <os family="windows"/>
    104                         </and>
    105                 </condition>
    106                 <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
    107         </target>
    108 
    109         <!--
    110                  ************************** Publishing the plugin ***********************************
    111                 -->
    112         <!--
    113                 ** extracts the JOSM release for the JOSM version in ../core and saves it in the
    114                 ** property ${coreversion.info.entry.revision}
    115                 **
    116                 -->
    117         <target name="core-info">
    118                 <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
    119                         <env key="LANG" value="C"/>
    120                         <arg value="info"/>
    121                         <arg value="--xml"/>
    122                         <arg value="../../core"/>
    123                 </exec>
    124                 <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
    125                 <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
    126                 <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
    127                 <delete file="core.info.xml" />
    128         </target>
    129 
    130         <!--
    131                 ** commits the source tree for this plugin
    132                 -->
    133         <target name="commit-current">
    134                 <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
    135                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    136                         <env key="LANG" value="C"/>
    137                         <arg value="commit"/>
    138                         <arg value="-m '${commit.message}'"/>
    139                         <arg value="."/>
    140                 </exec>
    141         </target>
    142 
    143         <!--
    144                 ** updates (svn up) the source tree for this plugin
    145                 -->
    146         <target name="update-current">
    147                 <echo>Updating plugin source ...</echo>
    148                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    149                         <env key="LANG" value="C"/>
    150                         <arg value="up"/>
    151                         <arg value="."/>
    152                 </exec>
    153                 <echo>Updating ${plugin.jar} ...</echo>
    154                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    155                         <env key="LANG" value="C"/>
    156                         <arg value="up"/>
    157                         <arg value="../dist/${plugin.jar}"/>
    158                 </exec>
    159         </target>
    160 
    161         <!--
    162                 ** commits the plugin.jar
    163                 -->
    164         <target name="commit-dist">
    165                 <echo>
    166         ***** Properties of published ${plugin.jar} *****
    167         Commit message    : '${commit.message}'
    168         Plugin-Mainversion: ${plugin.main.version}
    169         JOSM build version: ${coreversion.info.entry.revision}
    170         Plugin-Version    : ${version.entry.commit.revision}
    171         ***** / Properties of published ${plugin.jar} *****
    172 
    173         Now commiting ${plugin.jar} ...
    174         </echo>
    175                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    176                         <env key="LANG" value="C"/>
    177                         <arg value="-m '${commit.message}'"/>
    178                         <arg value="commit"/>
    179                         <arg value="${plugin.jar}"/>
    180                 </exec>
    181         </target>
    182 
    183         <!-- ** make sure svn is present as a command line tool ** -->
    184         <target name="ensure-svn-present">
    185                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
    186                         <env key="LANG" value="C" />
    187                         <arg value="--version" />
    188                 </exec>
    189                 <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
    190                         <!-- return code not set at all? Most likely svn isn't installed -->
    191                         <condition>
    192                                 <not>
    193                                         <isset property="svn.exit.code" />
    194                                 </not>
    195                         </condition>
    196                 </fail>
    197                 <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
    198                         <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
    199                         <condition>
    200                                 <isfailure code="${svn.exit.code}" />
    201                         </condition>
    202                 </fail>
    203         </target>
    204 
    205         <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
    206         </target>
     170    Now commiting ${plugin.jar} ...
     171    </echo>
     172        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     173            <env key="LANG" value="C"/>
     174            <arg value="-m '${commit.message}'"/>
     175            <arg value="commit"/>
     176            <arg value="${plugin.jar}"/>
     177        </exec>
     178    </target>
     179    <!-- ** make sure svn is present as a command line tool ** -->
     180    <target name="ensure-svn-present">
     181        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
     182            <env key="LANG" value="C"/>
     183            <arg value="--version"/>
     184        </exec>
     185        <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
     186            <!-- return code not set at all? Most likely svn isn't installed -->
     187            <condition>
     188                <not>
     189                    <isset property="svn.exit.code"/>
     190                </not>
     191            </condition>
     192        </fail>
     193        <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
     194            <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
     195            <condition>
     196                <isfailure code="${svn.exit.code}"/>
     197            </condition>
     198        </fail>
     199    </target>
     200    <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
     201    </target>
    207202</project>
  • applications/editors/josm/plugins/simplifyarea/build.xml

    r25192 r26174  
    1 <?xml version="1.0" encoding="UTF-8"?>
     1<?xml version="1.0" encoding="utf-8"?>
    22<!--
    33** This is a template build file for a JOSM  plugin.
     
    2929-->
    3030<project name="SimplifyArea" default="dist" basedir=".">
    31 
    32         <!-- enter the SVN commit message -->
    33         <property name="commit.message" value="Initial commit" />
    34         <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    35         <property name="plugin.main.version" value="3835" />
    36 
    37 
    38         <!--
     31    <!-- enter the SVN commit message -->
     32    <property name="commit.message" value="Initial commit"/>
     33    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
     34    <property name="plugin.main.version" value="3835"/>
     35    <!--
    3936      ************************************************
    4037      ** should not be necessary to change the following properties
    4138     -->
    42         <property name="josm"                   location="../../core/dist/josm-custom.jar"/>
    43         <property name="plugin.build.dir"       value="build"/>
    44         <property name="plugin.src.dir"         value="src"/>
    45         <!-- this is the directory where the plugin jar is copied to -->
    46         <property name="plugin.dist.dir"        value="../../dist"/>
    47         <property name="ant.build.javac.target" value="1.5"/>
    48         <property name="plugin.dist.dir"        value="../../dist"/>
    49         <property name="plugin.jar"             value="${plugin.dist.dir}/${ant.project.name}.jar"/>
    50 
    51         <!--
     39    <property name="josm" location="../../core/dist/josm-custom.jar"/>
     40    <property name="plugin.build.dir" value="build"/>
     41    <property name="plugin.src.dir" value="src"/>
     42    <!-- this is the directory where the plugin jar is copied to -->
     43    <property name="plugin.dist.dir" value="../../dist"/>
     44    <property name="ant.build.javac.target" value="1.5"/>
     45    <property name="plugin.dist.dir" value="../../dist"/>
     46    <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/>
     47    <!--
    5248    **********************************************************
    5349    ** init - initializes the build
    5450    **********************************************************
    5551    -->
    56         <target name="init">
    57                 <mkdir dir="${plugin.build.dir}"/>
    58         </target>
    59 
    60         <!--
     52    <target name="init">
     53        <mkdir dir="${plugin.build.dir}"/>
     54    </target>
     55    <!--
    6156    **********************************************************
    6257    ** compile - complies the source tree
    6358    **********************************************************
    6459    -->
    65         <target name="compile" depends="init">
    66                 <echo message="compiling sources for  ${plugin.jar} ... "/>
    67                 <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}">
    68                         <compilerarg value="-Xlint:deprecation"/>
    69                         <compilerarg value="-Xlint:unchecked"/>
    70                 </javac>
    71         </target>
    72 
    73         <!--
     60    <target name="compile" depends="init">
     61        <echo message="compiling sources for  ${plugin.jar} ... "/>
     62        <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}">
     63            <compilerarg value="-Xlint:deprecation"/>
     64            <compilerarg value="-Xlint:unchecked"/>
     65        </javac>
     66    </target>
     67    <!--
    7468    **********************************************************
    7569    ** dist - creates the plugin jar
    7670    **********************************************************
    7771    -->
    78         <target name="dist" depends="compile,revision">
    79                 <echo message="creating ${ant.project.name}.jar ... "/>
    80                 <copy todir="${plugin.build.dir}/resources">
    81                         <fileset dir="resources"/>
    82                 </copy>
    83                 <copy todir="${plugin.build.dir}/images">
    84                         <fileset dir="images"/>
    85                 </copy>
    86                 <copy todir="${plugin.build.dir}">
    87                         <fileset dir=".">
    88                                 <include name="README" />
    89                                 <include name="LICENSE" />
    90                         </fileset>
    91                 </copy>
    92                 <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
    93                         <!--
     72    <target name="dist" depends="compile,revision">
     73        <echo message="creating ${ant.project.name}.jar ... "/>
     74        <copy todir="${plugin.build.dir}/resources">
     75            <fileset dir="resources"/>
     76        </copy>
     77        <copy todir="${plugin.build.dir}/images">
     78            <fileset dir="images"/>
     79        </copy>
     80        <copy todir="${plugin.build.dir}/data">
     81            <fileset dir="data"/>
     82        </copy>
     83        <copy todir="${plugin.build.dir}">
     84            <fileset dir=".">
     85                <include name="README"/>
     86                <include name="LICENSE"/>
     87            </fileset>
     88        </copy>
     89        <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
     90            <!--
    9491        ************************************************
    9592        ** configure these properties. Most of them will be copied to the plugins
     
    9996        ************************************************
    10097    -->
    101                         <manifest>
    102                                 <attribute name="Author" value="Martin Ždila &lt;m.zdila@gmail.com&gt;"/>
    103                                 <attribute name="Plugin-Class" value="sk.zdila.josm.plugin.simplify.SimplifyAreaPlugin"/>
    104                                 <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
    105                                 <attribute name="Plugin-Description" value="Simplify area by removing nodes on very obtuse angles. This can be constrained by maximum removed area size. Also average nearby nodes."/>
    106                                 <!--<attribute name="Plugin-Icon" value="..."/>
    107                                 <attribute name="Plugin-Link" value="..."/>-->
    108                                 <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
    109                                 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
    110                         </manifest>
    111                 </jar>
    112         </target>
    113 
    114         <!--
     98            <manifest>
     99                <attribute name="Author" value="Martin Ždila &lt;m.zdila@gmail.com&gt;"/>
     100                <attribute name="Plugin-Class" value="sk.zdila.josm.plugin.simplify.SimplifyAreaPlugin"/>
     101                <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
     102                <attribute name="Plugin-Description" value="Simplify area by removing nodes on very obtuse angles. This can be constrained by maximum removed area size. Also average nearby nodes."/>
     103                <!--<attribute name="Plugin-Icon" value="..."/>
     104                <attribute name="Plugin-Link" value="..."/>-->
     105                <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
     106                <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
     107            </manifest>
     108        </jar>
     109    </target>
     110    <!--
    115111    **********************************************************
    116112    ** revision - extracts the current revision number for the
     
    119115    **********************************************************
    120116    -->
    121         <target name="revision">
    122 
    123                 <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
    124                         <env key="LANG" value="C"/>
    125                         <arg value="info"/>
    126                         <arg value="--xml"/>
    127                         <arg value="."/>
    128                 </exec>
    129                 <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
    130                 <delete file="REVISION"/>
    131         </target>
    132 
    133         <!--
     117    <target name="revision">
     118        <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
     119            <env key="LANG" value="C"/>
     120            <arg value="info"/>
     121            <arg value="--xml"/>
     122            <arg value="."/>
     123        </exec>
     124        <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
     125        <delete file="REVISION"/>
     126    </target>
     127    <!--
    134128    **********************************************************
    135129    ** clean - clean up the build environment
    136130    **********************************************************
    137131    -->
    138         <target name="clean">
    139                 <delete dir="${plugin.build.dir}"/>
    140                 <delete file="${plugin.jar}"/>
    141         </target>
    142 
    143         <!--
     132    <target name="clean">
     133        <delete dir="${plugin.build.dir}"/>
     134        <delete file="${plugin.jar}"/>
     135    </target>
     136    <!--
    144137    **********************************************************
    145138    ** install - install the plugin in your local JOSM installation
    146139    **********************************************************
    147140    -->
    148         <target name="install" depends="dist">
    149                 <property environment="env"/>
    150                 <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
    151                         <and>
    152                                 <os family="windows"/>
    153                         </and>
    154                 </condition>
    155                 <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
    156         </target>
    157 
    158 
    159         <!--
    160         ************************** Publishing the plugin ***********************************
    161         -->
    162         <!--
    163                 ** extracts the JOSM release for the JOSM version in ../core and saves it in the
    164                 ** property ${coreversion.info.entry.revision}
    165                 **
    166                 -->
    167         <target name="core-info">
    168                 <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
    169                         <env key="LANG" value="C"/>
    170                         <arg value="info"/>
    171                         <arg value="--xml"/>
    172                         <arg value="../../core"/>
    173                 </exec>
    174                 <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
    175                 <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
    176                 <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
    177                 <delete file="core.info.xml" />
    178         </target>
    179 
    180         <!--
    181                 ** commits the source tree for this plugin
    182                 -->
    183         <target name="commit-current">
    184                 <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
    185                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    186                         <env key="LANG" value="C"/>
    187                         <arg value="commit"/>
    188                         <arg value="-m '${commit.message}'"/>
    189                         <arg value="."/>
    190                 </exec>
    191         </target>
    192 
    193         <!--
    194                 ** updates (svn up) the source tree for this plugin
    195                 -->
    196         <target name="update-current">
    197                 <echo>Updating plugin source ...</echo>
    198                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    199                         <env key="LANG" value="C"/>
    200                         <arg value="up"/>
    201                         <arg value="."/>
    202                 </exec>
    203                 <echo>Updating ${plugin.jar} ...</echo>
    204                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    205                         <env key="LANG" value="C"/>
    206                         <arg value="up"/>
    207                         <arg value="../dist/${plugin.jar}"/>
    208                 </exec>
    209         </target>
    210 
    211         <!--
    212                 ** commits the plugin.jar
    213                 -->
    214         <target name="commit-dist">
    215                 <echo>
    216         ***** Properties of published ${plugin.jar} *****
    217         Commit message    : '${commit.message}'                                 
    218         Plugin-Mainversion: ${plugin.main.version}
    219         JOSM build version: ${coreversion.info.entry.revision}
    220         Plugin-Version    : ${version.entry.commit.revision}
    221         ***** / Properties of published ${plugin.jar} *****                                     
    222                                                
    223         Now commiting ${plugin.jar} ...
    224         </echo>
    225                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    226                         <env key="LANG" value="C"/>
    227                         <arg value="-m '${commit.message}'"/>
    228                         <arg value="commit"/>
    229                         <arg value="${plugin.jar}"/>
    230                 </exec>
    231         </target>
    232 
    233         <!-- ** make sure svn is present as a command line tool ** -->
    234         <target name="ensure-svn-present">
    235                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
    236                         <env key="LANG" value="C" />
    237                         <arg value="--version" />
    238                 </exec>
    239                 <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
    240                         <!-- return code not set at all? Most likely svn isn't installed -->
    241                         <condition>
    242                                 <not>
    243                                         <isset property="svn.exit.code" />
    244                                 </not>
    245                         </condition>
    246                 </fail>
    247                 <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
    248                         <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
    249                         <condition>
    250                                 <isfailure code="${svn.exit.code}" />
    251                         </condition>
    252                 </fail>
    253         </target>
    254 
    255         <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
    256         </target>
     141    <target name="install" depends="dist">
     142        <property environment="env"/>
     143        <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
     144            <and>
     145                <os family="windows"/>
     146            </and>
     147        </condition>
     148        <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
     149    </target>
     150    <!--
     151    ************************** Publishing the plugin ***********************************
     152    -->
     153    <!--
     154        ** extracts the JOSM release for the JOSM version in ../core and saves it in the
     155        ** property ${coreversion.info.entry.revision}
     156        **
     157        -->
     158    <target name="core-info">
     159        <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
     160            <env key="LANG" value="C"/>
     161            <arg value="info"/>
     162            <arg value="--xml"/>
     163            <arg value="../../core"/>
     164        </exec>
     165        <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
     166        <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
     167        <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
     168        <delete file="core.info.xml"/>
     169    </target>
     170    <!--
     171        ** commits the source tree for this plugin
     172        -->
     173    <target name="commit-current">
     174        <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
     175        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     176            <env key="LANG" value="C"/>
     177            <arg value="commit"/>
     178            <arg value="-m '${commit.message}'"/>
     179            <arg value="."/>
     180        </exec>
     181    </target>
     182    <!--
     183        ** updates (svn up) the source tree for this plugin
     184        -->
     185    <target name="update-current">
     186        <echo>Updating plugin source ...</echo>
     187        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     188            <env key="LANG" value="C"/>
     189            <arg value="up"/>
     190            <arg value="."/>
     191        </exec>
     192        <echo>Updating ${plugin.jar} ...</echo>
     193        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     194            <env key="LANG" value="C"/>
     195            <arg value="up"/>
     196            <arg value="../dist/${plugin.jar}"/>
     197        </exec>
     198    </target>
     199    <!--
     200        ** commits the plugin.jar
     201        -->
     202    <target name="commit-dist">
     203        <echo>
     204    ***** Properties of published ${plugin.jar} *****
     205    Commit message    : '${commit.message}'                 
     206    Plugin-Mainversion: ${plugin.main.version}
     207    JOSM build version: ${coreversion.info.entry.revision}
     208    Plugin-Version    : ${version.entry.commit.revision}
     209    ***** / Properties of published ${plugin.jar} *****                 
     210                       
     211    Now commiting ${plugin.jar} ...
     212    </echo>
     213        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     214            <env key="LANG" value="C"/>
     215            <arg value="-m '${commit.message}'"/>
     216            <arg value="commit"/>
     217            <arg value="${plugin.jar}"/>
     218        </exec>
     219    </target>
     220    <!-- ** make sure svn is present as a command line tool ** -->
     221    <target name="ensure-svn-present">
     222        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
     223            <env key="LANG" value="C"/>
     224            <arg value="--version"/>
     225        </exec>
     226        <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
     227            <!-- return code not set at all? Most likely svn isn't installed -->
     228            <condition>
     229                <not>
     230                    <isset property="svn.exit.code"/>
     231                </not>
     232            </condition>
     233        </fail>
     234        <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
     235            <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
     236            <condition>
     237                <isfailure code="${svn.exit.code}"/>
     238            </condition>
     239        </fail>
     240    </target>
     241    <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
     242    </target>
    257243</project>
  • applications/editors/josm/plugins/smed/build.xml

    r25451 r26174  
    1 <?xml version="1.0" encoding="UTF-8"?>
     1<?xml version="1.0" encoding="utf-8"?>
    22<!--
    33** This is a template build file for a JOSM  plugin.
     
    2929-->
    3030<project name="smed" basedir=".">
    31 
    32         <!-- enter the SVN commit message -->
    33         <property name="commit.message" value="some new internationalized messages" />
    34         <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    35         <property name="plugin.main.version" value="3835" />
    36 
    37 
    38         <!--
     31    <!-- enter the SVN commit message -->
     32    <property name="commit.message" value="some new internationalized messages"/>
     33    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
     34    <property name="plugin.main.version" value="3835"/>
     35    <!--
    3936      ************************************************
    4037      ** should not be necessary to change the following properties
    4138     -->
    42         <property name="josm"                   location="../../core/dist/josm-custom.jar"/>
    43         <property name="plugin.build.dir"       value="build/"/>
    44         <property name="plugin.src.dir"         value="src/"/>
    45         <property name="smed.dist.dir"        value="dist/"/>
    46         <!-- this is the directory where the plugin jar is copied to -->
    47         <property name="plugin.dist.dir"        value="../../dist/"/>
    48         <property name="smed_core.dist.dir"     value="core/dist/"/>
    49         <property name="ant.build.javac.target" value="1.5"/>
    50         <property name="plugin.jar"             value="${plugin.dist.dir}${ant.project.name}.jar"/>
    51 
    52         <!--
     39    <property name="josm" location="../../core/dist/josm-custom.jar"/>
     40    <property name="plugin.build.dir" value="build/"/>
     41    <property name="plugin.src.dir" value="src/"/>
     42    <property name="smed.dist.dir" value="dist/"/>
     43    <!-- this is the directory where the plugin jar is copied to -->
     44    <property name="plugin.dist.dir" value="../../dist/"/>
     45    <property name="smed_core.dist.dir" value="core/dist/"/>
     46    <property name="ant.build.javac.target" value="1.5"/>
     47    <property name="plugin.jar" value="${plugin.dist.dir}${ant.project.name}.jar"/>
     48    <!--
    5349    **********************************************************
    5450    ** init - initializes the build
    5551    **********************************************************
    5652    -->
    57         <target name="init">
    58                 <mkdir dir="${plugin.build.dir}"/>
    59                 <mkdir dir="${smed_core.dist.dir}"/>
    60                 <mkdir dir="${smed.dist.dir}"/>
    61         </target>
    62 
    63         <!--
     53    <target name="init">
     54        <mkdir dir="${plugin.build.dir}"/>
     55        <mkdir dir="${smed_core.dist.dir}"/>
     56        <mkdir dir="${smed.dist.dir}"/>
     57    </target>
     58    <!--
    6459    **********************************************************
    6560    ** compile - complies the source tree
    6661    **********************************************************
    6762    -->
    68         <target name="compile" depends="init">
    69                 <echo message="compiling sources for  ${plugin.jar} ... "/>
    70                 <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}">
    71                         <compilerarg value="-Xlint:deprecation"/>
    72                         <compilerarg value="-Xlint:unchecked"/>
    73                 </javac>
    74         </target>
    75 
    76         <!--
     63    <target name="compile" depends="init">
     64        <echo message="compiling sources for  ${plugin.jar} ... "/>
     65        <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}">
     66            <compilerarg value="-Xlint:deprecation"/>
     67            <compilerarg value="-Xlint:unchecked"/>
     68        </javac>
     69    </target>
     70    <!--
    7771    **********************************************************
    7872    ** dist - creates the plugin jar
    7973    **********************************************************
    8074    -->
    81         <target name="dist" depends="compile, revision">
    82                 <echo message="creating ${ant.project.name}.jar ... "/>
    83 
     75    <target name="dist" depends="compile, revision">
     76        <echo message="creating ${ant.project.name}.jar ... "/>
    8477        <copy todir="${plugin.build.dir}/images">
    85             <fileset dir="${plugin.src.dir}/images"/>
     78            <fileset dir="images"/>
    8679        </copy>
    87 
    88                 <copy todir="${plugin.build.dir}/images">
    89                         <fileset dir="images"/>
    90                 </copy>
    91                
    92                 <copy todir="${plugin.build.dir}/smed/msg">
    93                         <fileset dir="${plugin.src.dir}/smed/msg"/>
    94                 </copy>
    95                
    96                 <copy todir="${plugin.build.dir}">
    97                         <fileset dir="${smed.dist.dir}"/>
    98                 </copy>
    99                                                
    100                 <copy todir="${plugin.build.dir}">
    101                         <fileset dir=".">
    102                 <include name="*.txt" />
    103                         </fileset>
    104                 </copy>
    105                 <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
    106                         <!--
     80        <copy todir="${plugin.build.dir}/data">
     81            <fileset dir="data"/>
     82        </copy>
     83        <copy todir="${plugin.build.dir}/smed/msg">
     84            <fileset dir="${plugin.src.dir}/smed/msg"/>
     85        </copy>
     86        <copy todir="${plugin.build.dir}">
     87            <fileset dir="${smed.dist.dir}"/>
     88        </copy>
     89        <copy todir="${plugin.build.dir}">
     90            <fileset dir=".">
     91                <include name="*.txt"/>
     92            </fileset>
     93        </copy>
     94        <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
     95            <!--
    10796        ************************************************
    10897        ** configure these properties. Most of them will be copied to the plugins
     
    112101        ************************************************
    113102    -->
    114                         <manifest>
    115                                 <attribute name="Author" value="Werner, Malcolm"/>
    116                                 <attribute name="Plugin-Class" value="smed.Smed"/>
    117                                 <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
    118                                 <attribute name="Plugin-Description" value="Create and edit seamaps for OpenSeaMap"/>
    119                                 <attribute name="Plugin-Icon" value="images/Smed.png"/>
    120                                 <attribute name="Plugin-Link" value="http://openseamap.org/"/>
    121                                 <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
    122                                 <!--
    123                                 <attribute name="Plugin-Version" value="23456"/>
    124                                 -->
    125                                 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
    126                                  
    127                         </manifest>
    128                 </jar>
    129                
    130                 <!-- install interface -->
    131                 <copy file="${plugin.jar}" todir="${smed_core.dist.dir}"/>
    132         </target>
    133        
    134         <!--
     103            <manifest>
     104                <attribute name="Author" value="Werner, Malcolm"/>
     105                <attribute name="Plugin-Class" value="smed.Smed"/>
     106                <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
     107                <attribute name="Plugin-Description" value="Create and edit seamaps for OpenSeaMap"/>
     108                <attribute name="Plugin-Icon" value="images/Smed.png"/>
     109                <attribute name="Plugin-Link" value="http://openseamap.org/"/>
     110                <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
     111                <!--
     112                <attribute name="Plugin-Version" value="23456"/>
     113                -->
     114                <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
     115            </manifest>
     116        </jar>
     117        <!-- install interface -->
     118        <copy file="${plugin.jar}" todir="${smed_core.dist.dir}"/>
     119    </target>
     120    <!--
    135121    **********************************************************
    136122    ** revision - extracts the current revision number for the
     
    139125    **********************************************************
    140126    -->
    141         <target name="revision">
    142 
    143                 <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
    144                         <env key="LANG" value="C"/>
    145                         <arg value="info"/>
    146                         <arg value="--xml"/>
    147                         <arg value="."/>
    148                 </exec>
    149                 <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
    150                 <!--
    151                 <delete file="REVISION"/>
    152                 -->     
    153         </target>
    154 
    155        
    156         <!--
     127    <target name="revision">
     128        <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
     129            <env key="LANG" value="C"/>
     130            <arg value="info"/>
     131            <arg value="--xml"/>
     132            <arg value="."/>
     133        </exec>
     134        <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
     135        <!--
     136        <delete file="REVISION"/>
     137        -->
     138    </target>
     139    <!--
    157140    **********************************************************
    158141    ** clean - clean up the build environment
    159142    **********************************************************
    160143    -->
    161         <target name="clean">
    162                 <delete dir="${plugin.build.dir}"/>
    163                 <delete file="${plugin.jar}"/>
    164         </target>
    165 
    166         <!--
     144    <target name="clean">
     145        <delete dir="${plugin.build.dir}"/>
     146        <delete file="${plugin.jar}"/>
     147    </target>
     148    <!--
    167149    **********************************************************
    168150    ** install - install the plugin in your local JOSM installation
    169151    **********************************************************
    170152    -->
    171         <target name="install" depends="dist">
    172                 <property environment="env"/>
    173                 <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
    174                         <and>
    175                                 <os family="windows"/>
    176                         </and>
    177                 </condition>
    178                 <delete dir="${josm.plugins.dir}/splug"/>
    179                 <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
    180         </target>
    181        
    182         <!--
    183                 ** commits the source tree for this plugin
    184                 -->
    185         <target name="commit-current">
    186                 <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
    187                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    188                         <env key="LANG" value="C"/>
    189                         <arg value="commit"/>
    190                         <arg value="-m '${commit.message}'"/>
    191                         <arg value="."/>
    192                 </exec>
    193         </target>
    194 
    195         <!--
    196                 ** updates (svn up) the source tree for this plugin
    197                 -->
    198         <target name="update-current">
    199                 <echo>Updating plugin source ...</echo>
    200                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    201                         <env key="LANG" value="C"/>
    202                         <arg value="up"/>
    203                         <arg value="."/>
    204                 </exec>
    205                 <echo>Updating ${plugin.jar} ...</echo>
    206                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    207                         <env key="LANG" value="C"/>
    208                         <arg value="up"/>
    209                         <arg value="../dist/${plugin.jar}"/>
    210                 </exec>
    211         </target>
    212 
     153    <target name="install" depends="dist">
     154        <property environment="env"/>
     155        <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
     156            <and>
     157                <os family="windows"/>
     158            </and>
     159        </condition>
     160        <delete dir="${josm.plugins.dir}/splug"/>
     161        <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
     162    </target>
     163    <!--
     164        ** commits the source tree for this plugin
     165        -->
     166    <target name="commit-current">
     167        <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
     168        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     169            <env key="LANG" value="C"/>
     170            <arg value="commit"/>
     171            <arg value="-m '${commit.message}'"/>
     172            <arg value="."/>
     173        </exec>
     174    </target>
     175    <!--
     176        ** updates (svn up) the source tree for this plugin
     177        -->
     178    <target name="update-current">
     179        <echo>Updating plugin source ...</echo>
     180        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     181            <env key="LANG" value="C"/>
     182            <arg value="up"/>
     183            <arg value="."/>
     184        </exec>
     185        <echo>Updating ${plugin.jar} ...</echo>
     186        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     187            <env key="LANG" value="C"/>
     188            <arg value="up"/>
     189            <arg value="../dist/${plugin.jar}"/>
     190        </exec>
     191    </target>
    213192</project>
  • applications/editors/josm/plugins/smed/plugs/harbour/build.xml

    r24519 r26174  
    1 <?xml version="1.0" encoding="UTF-8"?>
     1<?xml version="1.0" encoding="utf-8"?>
    22<!--
    33** This is a template build file for a JOSM  plugin.
     
    2929-->
    3030<project name="Harbour" default="dist" basedir=".">
    31 
    32         <!-- enter the SVN commit message -->
    33         <property name="commit.message" value="harbour: TristateChekBox added" />
    34         <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    35         <property name="plugin.main.version" value="3329" />
    36 
    37         <!-- Declaring  time-stamps-->
    38         <tstamp/>
    39 
    40         <!--
     31    <!-- enter the SVN commit message -->
     32    <property name="commit.message" value="harbour: TristateChekBox added"/>
     33    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
     34    <property name="plugin.main.version" value="3329"/>
     35    <!-- Declaring  time-stamps-->
     36    <tstamp/>
     37    <!--
    4138      ************************************************
    4239      ** should not be necessary to change the following properties
    4340     -->
    44         <property name="josm"                   location="../../../../core/dist/josm-custom.jar"/>
    45         <property name="smed"                                   location="../../core/dist/smed.jar"/>
    46         <property name="plugin.build.dir"       value="build"/>
    47         <property name="plugin.src.dir"         value="src"/>
    48         <property name="smed.build.dir"         value="../../../smed/build"/>
    49         <property name="delete_string"          value="*${ant.project.name}.jar"/>
    50         <!-- this is the directory where the plugin jar is copied to -->
    51         <property name="plugin.dist.dir"        value="../../dist"/>
    52         <property name="ant.build.javac.target" value="1.5"/>
    53         <property name="plugin.jar"             value="${plugin.dist.dir}/00_${DSTAMP}_${TSTAMP}_${ant.project.name}.jar"/>
    54 
    55         <!--
     41    <property name="josm" location="../../../../core/dist/josm-custom.jar"/>
     42    <property name="smed" location="../../core/dist/smed.jar"/>
     43    <property name="plugin.build.dir" value="build"/>
     44    <property name="plugin.src.dir" value="src"/>
     45    <property name="smed.build.dir" value="../../../smed/build"/>
     46    <property name="delete_string" value="*${ant.project.name}.jar"/>
     47    <!-- this is the directory where the plugin jar is copied to -->
     48    <property name="plugin.dist.dir" value="../../dist"/>
     49    <property name="ant.build.javac.target" value="1.5"/>
     50    <property name="plugin.jar" value="${plugin.dist.dir}/00_${DSTAMP}_${TSTAMP}_${ant.project.name}.jar"/>
     51    <!--
    5652    **********************************************************
    5753    ** init - initializes the build
    5854    **********************************************************
    5955    -->
    60         <target name="init">
    61                 <mkdir dir="${plugin.build.dir}"/>
    62                 <mkdir dir="${plugin.dist.dir}"/>
    63         </target>
    64        
    65         <!--
     56    <target name="init">
     57        <mkdir dir="${plugin.build.dir}"/>
     58        <mkdir dir="${plugin.dist.dir}"/>
     59    </target>
     60    <!--
    6661    **********************************************************
    6762    ** compile - complies the source tree
    6863    **********************************************************
    6964    -->
    70         <target name="compile" depends="init">
    71                 <echo message="compiling sources for  ${plugin.jar} ... "/>
    72                 <javac srcdir="src" classpath="${josm}:${smed}" debug="true" destdir="${plugin.build.dir}">
    73                         <compilerarg value="-Xlint:deprecation"/>
    74                         <compilerarg value="-Xlint:unchecked"/>
    75                 </javac>
    76         </target>
    77 
    78 
    79         <!--
     65    <target name="compile" depends="init">
     66        <echo message="compiling sources for  ${plugin.jar} ... "/>
     67        <javac srcdir="src" classpath="${josm}:${smed}" debug="true" destdir="${plugin.build.dir}">
     68            <compilerarg value="-Xlint:deprecation"/>
     69            <compilerarg value="-Xlint:unchecked"/>
     70        </javac>
     71    </target>
     72    <!--
    8073    **********************************************************
    8174    ** dist - creates the plugin jar
    8275    **********************************************************
    8376    -->
    84         <target name="dist" depends="compile,revision">
    85                 <echo message="creating ${ant.project.name}.jar ... "/>
    86 
     77    <target name="dist" depends="compile,revision">
     78        <echo message="creating ${ant.project.name}.jar ... "/>
    8779        <copy todir="${plugin.build.dir}/images">
    8880            <fileset dir="${plugin.src.dir}/images"/>
    8981        </copy>
    90 
    91                 <copy todir="${plugin.build.dir}/images">
    92                         <fileset dir="images"/>
    93                 </copy>
    94                 <copy todir="${plugin.build.dir}/harbour/msg">
    95                         <fileset dir="${plugin.src.dir}/harbour/msg"/>
    96                 </copy>
    97                 <copy todir="${plugin.build.dir}">
    98                         <fileset dir=".">
    99                 <include name="copyright.txt" />
    100                 <include name="LICENSE.txt" />
    101                         </fileset>
    102                 </copy>
    103                
    104                 <delete>
    105                         <fileset dir="${plugin.dist.dir}">
    106                         <include name="${delete_string}"/>
    107                         </fileset>
    108                 </delete>
    109 
    110                
    111                 <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
    112                         <!--
     82        <copy todir="${plugin.build.dir}/images">
     83            <fileset dir="images"/>
     84        </copy>
     85        <copy todir="${plugin.build.dir}/harbour/msg">
     86            <fileset dir="${plugin.src.dir}/harbour/msg"/>
     87        </copy>
     88        <copy todir="${plugin.build.dir}">
     89            <fileset dir=".">
     90                <include name="copyright.txt"/>
     91                <include name="LICENSE.txt"/>
     92            </fileset>
     93        </copy>
     94        <delete>
     95            <fileset dir="${plugin.dist.dir}">
     96                <include name="${delete_string}"/>
     97            </fileset>
     98        </delete>
     99        <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
     100            <!--
    113101        ************************************************
    114102        ** configure these properties. Most of them will be copied to the plugins
     
    118106        ************************************************
    119107    -->
    120                         <manifest>
    121                                 <attribute name="Author" value="Werner, Malcolm"/>
    122                                 <attribute name="Plugin-Class" value="toms.Toms"/>
    123                                 <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
    124                                 <attribute name="Plugin-Description" value="Create and edit seamarks for OpenSeaMap"/>
    125                                 <attribute name="Plugin-Icon" value="images/Smp.png"/>
    126                                 <attribute name="Plugin-Link" value="http://openseamap.org/"/>
    127                                 <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
    128                                 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
    129                         </manifest>
    130                 </jar>
    131         </target>
    132 
    133         <!--
     108            <manifest>
     109                <attribute name="Author" value="Werner, Malcolm"/>
     110                <attribute name="Plugin-Class" value="toms.Toms"/>
     111                <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
     112                <attribute name="Plugin-Description" value="Create and edit seamarks for OpenSeaMap"/>
     113                <attribute name="Plugin-Icon" value="images/Smp.png"/>
     114                <attribute name="Plugin-Link" value="http://openseamap.org/"/>
     115                <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
     116                <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
     117            </manifest>
     118        </jar>
     119    </target>
     120    <!--
    134121    **********************************************************
    135122    ** revision - extracts the current revision number for the
     
    138125    **********************************************************
    139126    -->
    140         <target name="revision">
    141 
    142                 <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
    143                         <env key="LANG" value="C"/>
    144                         <arg value="info"/>
    145                         <arg value="--xml"/>
    146                         <arg value="."/>
    147                 </exec>
    148                 <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
    149                 <delete file="REVISION"/>
    150         </target>
    151 
    152         <!--
     127    <target name="revision">
     128        <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
     129            <env key="LANG" value="C"/>
     130            <arg value="info"/>
     131            <arg value="--xml"/>
     132            <arg value="."/>
     133        </exec>
     134        <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
     135        <delete file="REVISION"/>
     136    </target>
     137    <!--
    153138    **********************************************************
    154139    ** clean - clean up the build environment
    155140    **********************************************************
    156141    -->
    157         <target name="clean">
    158                 <delete dir="${plugin.build.dir}"/>
    159                 <delete>
    160                         <fileset dir="${plugin.dist.dir}">
    161                         <include name="${delete_string}"/>
    162                         </fileset>
    163                 </delete>
    164         </target>
    165 
    166         <!--
     142    <target name="clean">
     143        <delete dir="${plugin.build.dir}"/>
     144        <delete>
     145            <fileset dir="${plugin.dist.dir}">
     146                <include name="${delete_string}"/>
     147            </fileset>
     148        </delete>
     149    </target>
     150    <!--
    167151    **********************************************************
    168152    ** install - install the plugin in your local JOSM installation
     
    170154    **********************************************************
    171155    -->
    172         <target name="install-develop" depends="dist">
    173                 <property environment="env"/>
    174                 <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins/splug" else="${user.home}/.josm/plugins/splug">
    175                         <and>
    176                                 <os family="windows"/>
    177                         </and>
    178                 </condition>
    179                
    180                 <delete>
    181                         <fileset dir="${josm.plugins.dir}">
    182                         <include name="${delete_string}"/>
    183                         </fileset>
    184                 </delete>
    185                
    186                 <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
    187 
    188                 <delete file="${plugin.jar}"/>
    189                
    190         </target>
    191 
    192         <!--
    193         ************************** Publishing the plugin ***********************************
    194         -->
    195         <!--
    196                 ** extracts the JOSM release for the JOSM version in ../core and saves it in the
    197                 ** property ${coreversion.info.entry.revision}
    198                 **
    199                 -->
    200        
    201         <target name="core-info">
    202                 <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
    203                         <env key="LANG" value="C"/>
    204                         <arg value="info"/>
    205                         <arg value="--xml"/>
    206                         <arg value="../../core"/>
    207                 </exec>
    208                 <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
    209                 <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
    210                 <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
    211                 <delete file="core.info.xml" />
    212         </target>
    213        
    214         <!--
    215                 ** commits the source tree for this plugin
    216                 -->
    217         <target name="commit-current">
    218                 <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
    219                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    220                         <env key="LANG" value="C"/>
    221                         <arg value="commit"/>
    222                         <arg value="-m '${commit.message}'"/>
    223                         <arg value="."/>
    224                 </exec>
    225         </target>
    226 
    227         <!--
    228                 ** updates (svn up) the source tree for this plugin
    229                 -->
    230         <target name="update-current">
    231                 <echo>Updating plugin source ...</echo>
    232                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    233                         <env key="LANG" value="C"/>
    234                         <arg value="up"/>
    235                         <arg value="."/>
    236                 </exec>
    237                 <echo>Updating ${plugin.jar} ...</echo>
    238                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    239                         <env key="LANG" value="C"/>
    240                         <arg value="up"/>
    241                         <arg value="../dist/${plugin.jar}"/>
    242                 </exec>
    243         </target>
    244 
    245         <!--
    246                 ** commits the plugin.jar
    247                 -->
    248         <target name="commit-dist">
    249                 <echo>
    250         ***** Properties of published ${plugin.jar} *****
    251         Commit message    : '${commit.message}'                                 
    252         Plugin-Mainversion: ${plugin.main.version}
    253         JOSM build version: ${coreversion.info.entry.revision}
    254         Plugin-Version    : ${version.entry.commit.revision}
    255         ***** / Properties of published ${plugin.jar} *****                                     
    256                                                
    257         Now commiting ${plugin.jar} ...
    258         </echo>
    259                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    260                         <env key="LANG" value="C"/>
    261                         <arg value="-m '${commit.message}'"/>
    262                         <arg value="commit"/>
    263                         <arg value="${plugin.jar}"/>
    264                 </exec>
    265         </target>
    266 
    267         <!-- ** make sure svn is present as a command line tool ** -->
    268         <target name="ensure-svn-present">
    269                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
    270                         <env key="LANG" value="C" />
    271                         <arg value="--version" />
    272                 </exec>
    273                 <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
    274                         <!-- return code not set at all? Most likely svn isn't installed -->
    275                         <condition>
    276                                 <not>
    277                                         <isset property="svn.exit.code" />
    278                                 </not>
    279                         </condition>
    280                 </fail>
    281                 <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
    282                         <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
    283                         <condition>
    284                                 <isfailure code="${svn.exit.code}" />
    285                         </condition>
    286                 </fail>
    287         </target>
    288 
    289         <target name="publish"> <!-- depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist" -->
    290                 <echo>No normal josm-plugin, publishing over smed !!!
    291                         1. ant - dist to each subplugin
    292                         2. ant publish to smed
    293                 </echo>
    294         </target>
     156    <target name="install-develop" depends="dist">
     157        <property environment="env"/>
     158        <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins/splug" else="${user.home}/.josm/plugins/splug">
     159            <and>
     160                <os family="windows"/>
     161            </and>
     162        </condition>
     163        <delete>
     164            <fileset dir="${josm.plugins.dir}">
     165                <include name="${delete_string}"/>
     166            </fileset>
     167        </delete>
     168        <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
     169        <delete file="${plugin.jar}"/>
     170    </target>
     171    <!--
     172    ************************** Publishing the plugin ***********************************
     173    -->
     174    <!--
     175        ** extracts the JOSM release for the JOSM version in ../core and saves it in the
     176        ** property ${coreversion.info.entry.revision}
     177        **
     178        -->
     179    <target name="core-info">
     180        <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
     181            <env key="LANG" value="C"/>
     182            <arg value="info"/>
     183            <arg value="--xml"/>
     184            <arg value="../../core"/>
     185        </exec>
     186        <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
     187        <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
     188        <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
     189        <delete file="core.info.xml"/>
     190    </target>
     191    <!--
     192        ** commits the source tree for this plugin
     193        -->
     194    <target name="commit-current">
     195        <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
     196        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     197            <env key="LANG" value="C"/>
     198            <arg value="commit"/>
     199            <arg value="-m '${commit.message}'"/>
     200            <arg value="."/>
     201        </exec>
     202    </target>
     203    <!--
     204        ** updates (svn up) the source tree for this plugin
     205        -->
     206    <target name="update-current">
     207        <echo>Updating plugin source ...</echo>
     208        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     209            <env key="LANG" value="C"/>
     210            <arg value="up"/>
     211            <arg value="."/>
     212        </exec>
     213        <echo>Updating ${plugin.jar} ...</echo>
     214        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     215            <env key="LANG" value="C"/>
     216            <arg value="up"/>
     217            <arg value="../dist/${plugin.jar}"/>
     218        </exec>
     219    </target>
     220    <!--
     221        ** commits the plugin.jar
     222        -->
     223    <target name="commit-dist">
     224        <echo>
     225    ***** Properties of published ${plugin.jar} *****
     226    Commit message    : '${commit.message}'                 
     227    Plugin-Mainversion: ${plugin.main.version}
     228    JOSM build version: ${coreversion.info.entry.revision}
     229    Plugin-Version    : ${version.entry.commit.revision}
     230    ***** / Properties of published ${plugin.jar} *****                 
     231                       
     232    Now commiting ${plugin.jar} ...
     233    </echo>
     234        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     235            <env key="LANG" value="C"/>
     236            <arg value="-m '${commit.message}'"/>
     237            <arg value="commit"/>
     238            <arg value="${plugin.jar}"/>
     239        </exec>
     240    </target>
     241    <!-- ** make sure svn is present as a command line tool ** -->
     242    <target name="ensure-svn-present">
     243        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
     244            <env key="LANG" value="C"/>
     245            <arg value="--version"/>
     246        </exec>
     247        <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
     248            <!-- return code not set at all? Most likely svn isn't installed -->
     249            <condition>
     250                <not>
     251                    <isset property="svn.exit.code"/>
     252                </not>
     253            </condition>
     254        </fail>
     255        <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
     256            <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
     257            <condition>
     258                <isfailure code="${svn.exit.code}"/>
     259            </condition>
     260        </fail>
     261    </target>
     262    <target name="publish">
     263        <!-- depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist" -->
     264        <echo>No normal josm-plugin, publishing over smed !!!
     265            1. ant - dist to each subplugin
     266            2. ant publish to smed
     267        </echo>
     268    </target>
    295269</project>
    296 
  • applications/editors/josm/plugins/smed/plugs/oseam/build.xml

    r23475 r26174  
    1 <?xml version="1.0" encoding="UTF-8"?>
     1<?xml version="1.0" encoding="utf-8"?>
    22<!--
    33** This is a template build file for a JOSM  plugin.
     
    2929-->
    3030<project name="OSeaM" default="dist" basedir=".">
    31 
    32         <!-- enter the SVN commit message -->
    33         <property name="commit.message" value="some new features in internationalising" />
    34         <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    35         <property name="plugin.main.version" value="3329" />
    36 
    37         <!-- Declaring  time-stamps-->
    38         <tstamp/>
    39 
    40         <!--
     31    <!-- enter the SVN commit message -->
     32    <property name="commit.message" value="some new features in internationalising"/>
     33    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
     34    <property name="plugin.main.version" value="3329"/>
     35    <!-- Declaring  time-stamps-->
     36    <tstamp/>
     37    <!--
    4138      ************************************************
    4239      ** should not be necessary to change the following properties
    4340     -->
    44         <property name="josm"                   location="../../../../core/dist/josm-custom.jar"/>
    45         <property name="smed"                                   location="../../core/dist/smed.jar"/>
    46         <property name="plugin.build.dir"       value="build"/>
    47         <property name="plugin.src.dir"         value="src"/>
    48         <property name="smed.build.dir"         value="../../../smed/build"/>
    49         <property name="delete_string"          value="*${ant.project.name}.jar"/>
    50         <!-- this is the directory where the plugin jar is copied to -->
    51         <property name="plugin.dist.dir"        value="../../dist"/>
    52         <property name="ant.build.javac.target" value="1.5"/>
    53         <property name="plugin.jar"             value="${plugin.dist.dir}/00_${DSTAMP}_${TSTAMP}_${ant.project.name}.jar"/>
    54 
    55         <!--
     41    <property name="josm" location="../../../../core/dist/josm-custom.jar"/>
     42    <property name="smed" location="../../core/dist/smed.jar"/>
     43    <property name="plugin.build.dir" value="build"/>
     44    <property name="plugin.src.dir" value="src"/>
     45    <property name="smed.build.dir" value="../../../smed/build"/>
     46    <property name="delete_string" value="*${ant.project.name}.jar"/>
     47    <!-- this is the directory where the plugin jar is copied to -->
     48    <property name="plugin.dist.dir" value="../../dist"/>
     49    <property name="ant.build.javac.target" value="1.5"/>
     50    <property name="plugin.jar" value="${plugin.dist.dir}/00_${DSTAMP}_${TSTAMP}_${ant.project.name}.jar"/>
     51    <!--
    5652    **********************************************************
    5753    ** init - initializes the build
    5854    **********************************************************
    5955    -->
    60         <target name="init">
    61                 <mkdir dir="${plugin.build.dir}"/>
    62                 <mkdir dir="${plugin.dist.dir}"/>
    63         </target>
    64        
    65         <!--
     56    <target name="init">
     57        <mkdir dir="${plugin.build.dir}"/>
     58        <mkdir dir="${plugin.dist.dir}"/>
     59    </target>
     60    <!--
    6661    **********************************************************
    6762    ** compile - complies the source tree
    6863    **********************************************************
    6964    -->
    70         <target name="compile" depends="init">
    71                 <echo message="compiling sources for  ${plugin.jar} ... "/>
    72                 <javac srcdir="src" classpath="${josm}:${smed}" debug="true" destdir="${plugin.build.dir}">
    73                         <compilerarg value="-Xlint:deprecation"/>
    74                         <compilerarg value="-Xlint:unchecked"/>
    75                 </javac>
    76         </target>
    77 
    78 
    79         <!--
     65    <target name="compile" depends="init">
     66        <echo message="compiling sources for  ${plugin.jar} ... "/>
     67        <javac srcdir="src" classpath="${josm}:${smed}" debug="true" destdir="${plugin.build.dir}">
     68            <compilerarg value="-Xlint:deprecation"/>
     69            <compilerarg value="-Xlint:unchecked"/>
     70        </javac>
     71    </target>
     72    <!--
    8073    **********************************************************
    8174    ** dist - creates the plugin jar
    8275    **********************************************************
    8376    -->
    84         <target name="dist" depends="compile,revision">
    85                 <echo message="creating ${ant.project.name}.jar ... "/>
    86 
     77    <target name="dist" depends="compile,revision">
     78        <echo message="creating ${ant.project.name}.jar ... "/>
    8779        <copy todir="${plugin.build.dir}/images">
    8880            <fileset dir="${plugin.src.dir}/images"/>
    8981        </copy>
    90 
    91                 <copy todir="${plugin.build.dir}/images">
    92                         <fileset dir="images"/>
    93                 </copy>
    94                 <copy todir="${plugin.build.dir}/oseam/msg">
    95                         <fileset dir="${plugin.src.dir}/oseam/msg"/>
    96                 </copy>
    97                 <copy todir="${plugin.build.dir}">
    98                         <fileset dir=".">
    99                 <include name="copyright.txt" />
    100                 <include name="LICENSE.txt" />
    101                         </fileset>
    102                 </copy>
    103                
    104                 <delete>
    105                         <fileset dir="${plugin.dist.dir}">
    106                         <include name="${delete_string}"/>
    107                         </fileset>
    108                 </delete>
    109 
    110                
    111                 <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
    112                         <!--
     82        <copy todir="${plugin.build.dir}/images">
     83            <fileset dir="images"/>
     84        </copy>
     85        <copy todir="${plugin.build.dir}/oseam/msg">
     86            <fileset dir="${plugin.src.dir}/oseam/msg"/>
     87        </copy>
     88        <copy todir="${plugin.build.dir}">
     89            <fileset dir=".">
     90                <include name="copyright.txt"/>
     91                <include name="LICENSE.txt"/>
     92            </fileset>
     93        </copy>
     94        <delete>
     95            <fileset dir="${plugin.dist.dir}">
     96                <include name="${delete_string}"/>
     97            </fileset>
     98        </delete>
     99        <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
     100            <!--
    113101        ************************************************
    114102        ** configure these properties. Most of them will be copied to the plugins
     
    118106        ************************************************
    119107    -->
    120                         <manifest>
    121                                 <attribute name="Author" value="Werner, Malcolm"/>
    122                                 <attribute name="Plugin-Class" value="toms.Toms"/>
    123                                 <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
    124                                 <attribute name="Plugin-Description" value="Create and edit seamarks for OpenSeaMap"/>
    125                                 <attribute name="Plugin-Icon" value="images/Smp.png"/>
    126                                 <attribute name="Plugin-Link" value="http://openseamap.org/"/>
    127                                 <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
    128                                 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
    129                         </manifest>
    130                 </jar>
    131         </target>
    132 
    133         <!--
     108            <manifest>
     109                <attribute name="Author" value="Werner, Malcolm"/>
     110                <attribute name="Plugin-Class" value="toms.Toms"/>
     111                <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
     112                <attribute name="Plugin-Description" value="Create and edit seamarks for OpenSeaMap"/>
     113                <attribute name="Plugin-Icon" value="images/Smp.png"/>
     114                <attribute name="Plugin-Link" value="http://openseamap.org/"/>
     115                <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
     116                <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
     117            </manifest>
     118        </jar>
     119    </target>
     120    <!--
    134121    **********************************************************
    135122    ** revision - extracts the current revision number for the
     
    138125    **********************************************************
    139126    -->
    140         <target name="revision">
    141 
    142                 <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
    143                         <env key="LANG" value="C"/>
    144                         <arg value="info"/>
    145                         <arg value="--xml"/>
    146                         <arg value="."/>
    147                 </exec>
    148                 <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
    149                 <delete file="REVISION"/>
    150         </target>
    151 
    152         <!--
     127    <target name="revision">
     128        <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
     129            <env key="LANG" value="C"/>
     130            <arg value="info"/>
     131            <arg value="--xml"/>
     132            <arg value="."/>
     133        </exec>
     134        <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
     135        <delete file="REVISION"/>
     136    </target>
     137    <!--
    153138    **********************************************************
    154139    ** clean - clean up the build environment
    155140    **********************************************************
    156141    -->
    157         <target name="clean">
    158                 <delete dir="${plugin.build.dir}"/>
    159                 <delete>
    160                         <fileset dir="${plugin.dist.dir}">
    161                         <include name="${delete_string}"/>
    162                         </fileset>
    163                 </delete>
    164         </target>
    165 
    166         <!--
     142    <target name="clean">
     143        <delete dir="${plugin.build.dir}"/>
     144        <delete>
     145            <fileset dir="${plugin.dist.dir}">
     146                <include name="${delete_string}"/>
     147            </fileset>
     148        </delete>
     149    </target>
     150    <!--
    167151    **********************************************************
    168152    ** install - install the plugin in your local JOSM installation
     
    170154    **********************************************************
    171155    -->
    172         <target name="install-develop" depends="dist">
    173                 <property environment="env"/>
    174                 <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins/splug" else="${user.home}/.josm/plugins/splug">
    175                         <and>
    176                                 <os family="windows"/>
    177                         </and>
    178                 </condition>
    179                
    180                 <delete>
    181                         <fileset dir="${josm.plugins.dir}">
    182                         <include name="${delete_string}"/>
    183                         </fileset>
    184                 </delete>
    185                
    186                 <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
    187 
    188                 <delete file="${plugin.jar}"/>
    189                
    190         </target>
    191 
    192         <!--
    193         ************************** Publishing the plugin ***********************************
    194         -->
    195         <!--
    196                 ** extracts the JOSM release for the JOSM version in ../core and saves it in the
    197                 ** property ${coreversion.info.entry.revision}
    198                 **
    199                 -->
    200        
    201         <target name="core-info">
    202                 <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
    203                         <env key="LANG" value="C"/>
    204                         <arg value="info"/>
    205                         <arg value="--xml"/>
    206                         <arg value="../../core"/>
    207                 </exec>
    208                 <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
    209                 <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
    210                 <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
    211                 <delete file="core.info.xml" />
    212         </target>
    213        
    214         <!--
    215                 ** commits the source tree for this plugin
    216                 -->
    217         <target name="commit-current">
    218                 <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
    219                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    220                         <env key="LANG" value="C"/>
    221                         <arg value="commit"/>
    222                         <arg value="-m '${commit.message}'"/>
    223                         <arg value="."/>
    224                 </exec>
    225         </target>
    226 
    227         <!--
    228                 ** updates (svn up) the source tree for this plugin
    229                 -->
    230         <target name="update-current">
    231                 <echo>Updating plugin source ...</echo>
    232                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    233                         <env key="LANG" value="C"/>
    234                         <arg value="up"/>
    235                         <arg value="."/>
    236                 </exec>
    237                 <echo>Updating ${plugin.jar} ...</echo>
    238                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    239                         <env key="LANG" value="C"/>
    240                         <arg value="up"/>
    241                         <arg value="../dist/${plugin.jar}"/>
    242                 </exec>
    243         </target>
    244 
    245         <!--
    246                 ** commits the plugin.jar
    247                 -->
    248         <target name="commit-dist">
    249                 <echo>
    250         ***** Properties of published ${plugin.jar} *****
    251         Commit message    : '${commit.message}'                                 
    252         Plugin-Mainversion: ${plugin.main.version}
    253         JOSM build version: ${coreversion.info.entry.revision}
    254         Plugin-Version    : ${version.entry.commit.revision}
    255         ***** / Properties of published ${plugin.jar} *****                                     
    256                                                
    257         Now commiting ${plugin.jar} ...
    258         </echo>
    259                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    260                         <env key="LANG" value="C"/>
    261                         <arg value="-m '${commit.message}'"/>
    262                         <arg value="commit"/>
    263                         <arg value="${plugin.jar}"/>
    264                 </exec>
    265         </target>
    266 
    267         <!-- ** make sure svn is present as a command line tool ** -->
    268         <target name="ensure-svn-present">
    269                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
    270                         <env key="LANG" value="C" />
    271                         <arg value="--version" />
    272                 </exec>
    273                 <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
    274                         <!-- return code not set at all? Most likely svn isn't installed -->
    275                         <condition>
    276                                 <not>
    277                                         <isset property="svn.exit.code" />
    278                                 </not>
    279                         </condition>
    280                 </fail>
    281                 <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
    282                         <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
    283                         <condition>
    284                                 <isfailure code="${svn.exit.code}" />
    285                         </condition>
    286                 </fail>
    287         </target>
    288 
    289         <target name="publish"> <!-- depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist" -->
    290                 <echo>No normal josm-plugin, publishing over smed !!!
    291                         1. ant - dist to each subplugin
    292                         2. ant publish to smed
    293                 </echo>
    294         </target>
     156    <target name="install-develop" depends="dist">
     157        <property environment="env"/>
     158        <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins/splug" else="${user.home}/.josm/plugins/splug">
     159            <and>
     160                <os family="windows"/>
     161            </and>
     162        </condition>
     163        <delete>
     164            <fileset dir="${josm.plugins.dir}">
     165                <include name="${delete_string}"/>
     166            </fileset>
     167        </delete>
     168        <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
     169        <delete file="${plugin.jar}"/>
     170    </target>
     171    <!--
     172    ************************** Publishing the plugin ***********************************
     173    -->
     174    <!--
     175        ** extracts the JOSM release for the JOSM version in ../core and saves it in the
     176        ** property ${coreversion.info.entry.revision}
     177        **
     178        -->
     179    <target name="core-info">
     180        <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
     181            <env key="LANG" value="C"/>
     182            <arg value="info"/>
     183            <arg value="--xml"/>
     184            <arg value="../../core"/>
     185        </exec>
     186        <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
     187        <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
     188        <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
     189        <delete file="core.info.xml"/>
     190    </target>
     191    <!--
     192        ** commits the source tree for this plugin
     193        -->
     194    <target name="commit-current">
     195        <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
     196        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     197            <env key="LANG" value="C"/>
     198            <arg value="commit"/>
     199            <arg value="-m '${commit.message}'"/>
     200            <arg value="."/>
     201        </exec>
     202    </target>
     203    <!--
     204        ** updates (svn up) the source tree for this plugin
     205        -->
     206    <target name="update-current">
     207        <echo>Updating plugin source ...</echo>
     208        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     209            <env key="LANG" value="C"/>
     210            <arg value="up"/>
     211            <arg value="."/>
     212        </exec>
     213        <echo>Updating ${plugin.jar} ...</echo>
     214        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     215            <env key="LANG" value="C"/>
     216            <arg value="up"/>
     217            <arg value="../dist/${plugin.jar}"/>
     218        </exec>
     219    </target>
     220    <!--
     221        ** commits the plugin.jar
     222        -->
     223    <target name="commit-dist">
     224        <echo>
     225    ***** Properties of published ${plugin.jar} *****
     226    Commit message    : '${commit.message}'                 
     227    Plugin-Mainversion: ${plugin.main.version}
     228    JOSM build version: ${coreversion.info.entry.revision}
     229    Plugin-Version    : ${version.entry.commit.revision}
     230    ***** / Properties of published ${plugin.jar} *****                 
     231                       
     232    Now commiting ${plugin.jar} ...
     233    </echo>
     234        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     235            <env key="LANG" value="C"/>
     236            <arg value="-m '${commit.message}'"/>
     237            <arg value="commit"/>
     238            <arg value="${plugin.jar}"/>
     239        </exec>
     240    </target>
     241    <!-- ** make sure svn is present as a command line tool ** -->
     242    <target name="ensure-svn-present">
     243        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
     244            <env key="LANG" value="C"/>
     245            <arg value="--version"/>
     246        </exec>
     247        <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
     248            <!-- return code not set at all? Most likely svn isn't installed -->
     249            <condition>
     250                <not>
     251                    <isset property="svn.exit.code"/>
     252                </not>
     253            </condition>
     254        </fail>
     255        <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
     256            <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
     257            <condition>
     258                <isfailure code="${svn.exit.code}"/>
     259            </condition>
     260        </fail>
     261    </target>
     262    <target name="publish">
     263        <!-- depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist" -->
     264        <echo>No normal josm-plugin, publishing over smed !!!
     265            1. ant - dist to each subplugin
     266            2. ant publish to smed
     267        </echo>
     268    </target>
    295269</project>
    296 
  • applications/editors/josm/plugins/smed/plugs/smed_about/build.xml

    r23500 r26174  
    1 <?xml version="1.0" encoding="UTF-8"?>
     1<?xml version="1.0" encoding="utf-8"?>
    22<!--
    33** This is a template build file for a JOSM  plugin.
     
    2929-->
    3030<project name="smed_about" basedir=".">
    31 
    32         <!-- enter the SVN commit message -->
    33         <property name="commit.message" value="added some security queries" />
    34         <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    35         <property name="plugin.main.version" value="3329" />
    36 
    37         <!-- Declaring  time-stamps-->
    38         <tstamp/>
    39 
    40         <!--
     31    <!-- enter the SVN commit message -->
     32    <property name="commit.message" value="added some security queries"/>
     33    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
     34    <property name="plugin.main.version" value="3329"/>
     35    <!-- Declaring  time-stamps-->
     36    <tstamp/>
     37    <!--
    4138      ************************************************
    4239      ** should not be necessary to change the following properties
    4340     -->
    44         <property name="josm"                   location="../../../../core/dist/josm-custom.jar"/>
    45         <property name="smed"                                   location="../../core/dist/smed.jar"/>
    46         <property name="plugin.build.dir"       value="build"/>
    47         <property name="plugin.src.dir"         value="src"/>
    48         <property name="smed.build.dir"         value="../../../smed/build"/>
    49         <!-- this is the directory where the plugin jar is copied to -->
    50         <property name="plugin.dist.dir"        value="../../dist"/>
    51         <property name="ant.build.javac.target" value="1.5"/>
    52         <property name="plugin.jar"             value="${plugin.dist.dir}/03_${DSTAMP}_${TSTAMP}_${ant.project.name}.jar"/>
    53 
    54         <!--
     41    <property name="josm" location="../../../../core/dist/josm-custom.jar"/>
     42    <property name="smed" location="../../core/dist/smed.jar"/>
     43    <property name="plugin.build.dir" value="build"/>
     44    <property name="plugin.src.dir" value="src"/>
     45    <property name="smed.build.dir" value="../../../smed/build"/>
     46    <!-- this is the directory where the plugin jar is copied to -->
     47    <property name="plugin.dist.dir" value="../../dist"/>
     48    <property name="ant.build.javac.target" value="1.5"/>
     49    <property name="plugin.jar" value="${plugin.dist.dir}/03_${DSTAMP}_${TSTAMP}_${ant.project.name}.jar"/>
     50    <!--
    5551    **********************************************************
    5652    ** init - initializes the build
    5753    **********************************************************
    5854    -->
    59         <target name="init">
    60                 <mkdir dir="${plugin.build.dir}"/>
    61                 <mkdir dir="${plugin.dist.dir}"/>
    62         </target>
    63        
    64         <!--
     55    <target name="init">
     56        <mkdir dir="${plugin.build.dir}"/>
     57        <mkdir dir="${plugin.dist.dir}"/>
     58    </target>
     59    <!--
    6560    **********************************************************
    6661    ** compile - complies the source tree
    6762    **********************************************************
    6863    -->
    69         <target name="compile" depends="init">
    70                 <echo message="compiling sources for  ${plugin.jar} ... "/>
    71                 <javac srcdir="src" classpath="${josm}:${smed}" debug="true" destdir="${plugin.build.dir}">
    72                         <compilerarg value="-Xlint:deprecation"/>
    73                         <compilerarg value="-Xlint:unchecked"/>
    74                 </javac>
    75         </target>
    76 
    77 
    78         <!--
     64    <target name="compile" depends="init">
     65        <echo message="compiling sources for  ${plugin.jar} ... "/>
     66        <javac srcdir="src" classpath="${josm}:${smed}" debug="true" destdir="${plugin.build.dir}">
     67            <compilerarg value="-Xlint:deprecation"/>
     68            <compilerarg value="-Xlint:unchecked"/>
     69        </javac>
     70    </target>
     71    <!--
    7972    **********************************************************
    8073    ** dist - creates the plugin jar
    8174    **********************************************************
    8275    -->
    83         <target name="dist" depends="compile,revision">
    84                 <echo message="creating ${ant.project.name}.jar ... "/>
    85 
     76    <target name="dist" depends="compile,revision">
     77        <echo message="creating ${ant.project.name}.jar ... "/>
    8678        <copy todir="${plugin.build.dir}/images">
    8779            <fileset dir="${plugin.src.dir}/images"/>
    8880        </copy>
    89 
    90                 <copy todir="${plugin.build.dir}/images">
    91                         <fileset dir="images"/>
    92                 </copy>
    93                 <copy todir="${plugin.build.dir}/${ant.project.name}/msg">
    94                         <fileset dir="${plugin.src.dir}/${ant.project.name}/msg"/>
    95                 </copy>
    96                 <copy todir="${plugin.build.dir}">
    97                         <fileset dir=".">
    98                 <include name="copyright.txt" />
    99                 <include name="LICENSE.txt" />
    100                         </fileset>
    101                 </copy>
    102                
    103                 <delete>
    104                         <fileset dir="${plugin.dist.dir}">
    105                         <include name="*${ant.project.name}.jar"/>
    106                         </fileset>
    107                 </delete>
    108 
    109                
    110                 <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
    111                         <!--
     81        <copy todir="${plugin.build.dir}/images">
     82            <fileset dir="images"/>
     83        </copy>
     84        <copy todir="${plugin.build.dir}/${ant.project.name}/msg">
     85            <fileset dir="${plugin.src.dir}/${ant.project.name}/msg"/>
     86        </copy>
     87        <copy todir="${plugin.build.dir}">
     88            <fileset dir=".">
     89                <include name="copyright.txt"/>
     90                <include name="LICENSE.txt"/>
     91            </fileset>
     92        </copy>
     93        <delete>
     94            <fileset dir="${plugin.dist.dir}">
     95                <include name="*${ant.project.name}.jar"/>
     96            </fileset>
     97        </delete>
     98        <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
     99            <!--
    112100        ************************************************
    113101        ** configure these properties. Most of them will be copied to the plugins
     
    117105        ************************************************
    118106    -->
    119                         <manifest>
    120                                 <attribute name="Author" value="Werner, Malcolm"/>
    121                                 <attribute name="Plugin-Class" value="toms.Toms"/>
    122                                 <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
    123                                 <attribute name="Plugin-Description" value="Create and edit seamarks for OpenSeaMap"/>
    124                                 <attribute name="Plugin-Icon" value="images/Smp.png"/>
    125                                 <attribute name="Plugin-Link" value="http://openseamap.org/"/>
    126                                 <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
    127                                 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
    128                         </manifest>
    129                 </jar>
    130         </target>
    131 
    132         <!--
     107            <manifest>
     108                <attribute name="Author" value="Werner, Malcolm"/>
     109                <attribute name="Plugin-Class" value="toms.Toms"/>
     110                <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
     111                <attribute name="Plugin-Description" value="Create and edit seamarks for OpenSeaMap"/>
     112                <attribute name="Plugin-Icon" value="images/Smp.png"/>
     113                <attribute name="Plugin-Link" value="http://openseamap.org/"/>
     114                <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
     115                <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
     116            </manifest>
     117        </jar>
     118    </target>
     119    <!--
    133120    **********************************************************
    134121    ** revision - extracts the current revision number for the
     
    137124    **********************************************************
    138125    -->
    139         <target name="revision">
    140 
    141                 <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
    142                         <env key="LANG" value="C"/>
    143                         <arg value="info"/>
    144                         <arg value="--xml"/>
    145                         <arg value="."/>
    146                 </exec>
    147                 <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
    148                 <delete file="REVISION"/>
    149         </target>
    150 
    151         <!--
     126    <target name="revision">
     127        <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
     128            <env key="LANG" value="C"/>
     129            <arg value="info"/>
     130            <arg value="--xml"/>
     131            <arg value="."/>
     132        </exec>
     133        <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
     134        <delete file="REVISION"/>
     135    </target>
     136    <!--
    152137    **********************************************************
    153138    ** clean - clean up the build environment
    154139    **********************************************************
    155140    -->
    156         <target name="clean">
    157                 <delete dir="${plugin.build.dir}"/>
    158                 <delete file="${plugin.jar}"/>
    159                 <delete>
    160                         <fileset dir="${plugin.dist.dir}">
    161                         <include name="*${ant.project.name}.jar"/>
    162                         </fileset>
    163                 </delete>
    164         </target>
    165 
    166         <!--
     141    <target name="clean">
     142        <delete dir="${plugin.build.dir}"/>
     143        <delete file="${plugin.jar}"/>
     144        <delete>
     145            <fileset dir="${plugin.dist.dir}">
     146                <include name="*${ant.project.name}.jar"/>
     147            </fileset>
     148        </delete>
     149    </target>
     150    <!--
    167151    **********************************************************
    168152    ** install - install the plugin in your local JOSM installation
    169153    **********************************************************
    170154    -->
    171         <target name="install-develop" depends="dist">
    172                 <property environment="env"/>
    173                 <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins/splug" else="${user.home}/.josm/plugins/splug">
    174                         <and>
    175                                 <os family="windows"/>
    176                         </and>
    177                 </condition>
    178                
    179                 <delete>
    180                         <fileset dir="${josm.plugins.dir}">
    181                         <include name="*${ant.project.name}.jar"/>
    182                         </fileset>
    183                 </delete>
    184 
    185                 <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
    186                
    187                 <delete file="${plugin.jar}"/>
    188         </target>
    189 
    190 
    191         <!--
    192         ************************** Publishing the plugin ***********************************
    193         -->
    194         <!--
    195                 ** extracts the JOSM release for the JOSM version in ../core and saves it in the
    196                 ** property ${coreversion.info.entry.revision}
    197                 **
    198                 -->
    199        
    200         <target name="core-info">
    201                 <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
    202                         <env key="LANG" value="C"/>
    203                         <arg value="info"/>
    204                         <arg value="--xml"/>
    205                         <arg value="../../core"/>
    206                 </exec>
    207                 <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
    208                 <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
    209                 <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
    210                 <delete file="core.info.xml" />
    211         </target>
    212        
    213         <!--
    214                 ** commits the source tree for this plugin
    215                 -->
    216         <target name="commit-current">
    217                 <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
    218                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    219                         <env key="LANG" value="C"/>
    220                         <arg value="commit"/>
    221                         <arg value="-m '${commit.message}'"/>
    222                         <arg value="."/>
    223                 </exec>
    224         </target>
    225 
    226         <!--
    227                 ** updates (svn up) the source tree for this plugin
    228                 -->
    229         <target name="update-current">
    230                 <echo>Updating plugin source ...</echo>
    231                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    232                         <env key="LANG" value="C"/>
    233                         <arg value="up"/>
    234                         <arg value="."/>
    235                 </exec>
    236                 <echo>Updating ${plugin.jar} ...</echo>
    237                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    238                         <env key="LANG" value="C"/>
    239                         <arg value="up"/>
    240                         <arg value="../dist/${plugin.jar}"/>
    241                 </exec>
    242         </target>
    243 
    244         <!--
    245                 ** commits the plugin.jar
    246                 -->
    247         <target name="commit-dist">
    248                 <echo>
    249         ***** Properties of published ${plugin.jar} *****
    250         Commit message    : '${commit.message}'                                 
    251         Plugin-Mainversion: ${plugin.main.version}
    252         JOSM build version: ${coreversion.info.entry.revision}
    253         Plugin-Version    : ${version.entry.commit.revision}
    254         ***** / Properties of published ${plugin.jar} *****                                     
    255                                                
    256         Now commiting ${plugin.jar} ...
    257         </echo>
    258                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    259                         <env key="LANG" value="C"/>
    260                         <arg value="-m '${commit.message}'"/>
    261                         <arg value="commit"/>
    262                         <arg value="${plugin.jar}"/>
    263                 </exec>
    264         </target>
    265 
    266         <!-- ** make sure svn is present as a command line tool ** -->
    267         <target name="ensure-svn-present">
    268                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
    269                         <env key="LANG" value="C" />
    270                         <arg value="--version" />
    271                 </exec>
    272                 <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
    273                         <!-- return code not set at all? Most likely svn isn't installed -->
    274                         <condition>
    275                                 <not>
    276                                         <isset property="svn.exit.code" />
    277                                 </not>
    278                         </condition>
    279                 </fail>
    280                 <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
    281                         <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
    282                         <condition>
    283                                 <isfailure code="${svn.exit.code}" />
    284                         </condition>
    285                 </fail>
    286         </target>
    287 
    288         <target name="publish"> <!-- depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist" -->
    289                 <echo>No normal josm-plugin, publishing over smed !!!
    290                         1. ant - dist to each subplugin
    291                         2. ant publish to smed
    292                 </echo>
    293         </target>       
     155    <target name="install-develop" depends="dist">
     156        <property environment="env"/>
     157        <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins/splug" else="${user.home}/.josm/plugins/splug">
     158            <and>
     159                <os family="windows"/>
     160            </and>
     161        </condition>
     162        <delete>
     163            <fileset dir="${josm.plugins.dir}">
     164                <include name="*${ant.project.name}.jar"/>
     165            </fileset>
     166        </delete>
     167        <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
     168        <delete file="${plugin.jar}"/>
     169    </target>
     170    <!--
     171    ************************** Publishing the plugin ***********************************
     172    -->
     173    <!--
     174        ** extracts the JOSM release for the JOSM version in ../core and saves it in the
     175        ** property ${coreversion.info.entry.revision}
     176        **
     177        -->
     178    <target name="core-info">
     179        <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
     180            <env key="LANG" value="C"/>
     181            <arg value="info"/>
     182            <arg value="--xml"/>
     183            <arg value="../../core"/>
     184        </exec>
     185        <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
     186        <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
     187        <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
     188        <delete file="core.info.xml"/>
     189    </target>
     190    <!--
     191        ** commits the source tree for this plugin
     192        -->
     193    <target name="commit-current">
     194        <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
     195        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     196            <env key="LANG" value="C"/>
     197            <arg value="commit"/>
     198            <arg value="-m '${commit.message}'"/>
     199            <arg value="."/>
     200        </exec>
     201    </target>
     202    <!--
     203        ** updates (svn up) the source tree for this plugin
     204        -->
     205    <target name="update-current">
     206        <echo>Updating plugin source ...</echo>
     207        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     208            <env key="LANG" value="C"/>
     209            <arg value="up"/>
     210            <arg value="."/>
     211        </exec>
     212        <echo>Updating ${plugin.jar} ...</echo>
     213        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     214            <env key="LANG" value="C"/>
     215            <arg value="up"/>
     216            <arg value="../dist/${plugin.jar}"/>
     217        </exec>
     218    </target>
     219    <!--
     220        ** commits the plugin.jar
     221        -->
     222    <target name="commit-dist">
     223        <echo>
     224    ***** Properties of published ${plugin.jar} *****
     225    Commit message    : '${commit.message}'                 
     226    Plugin-Mainversion: ${plugin.main.version}
     227    JOSM build version: ${coreversion.info.entry.revision}
     228    Plugin-Version    : ${version.entry.commit.revision}
     229    ***** / Properties of published ${plugin.jar} *****                 
     230                       
     231    Now commiting ${plugin.jar} ...
     232    </echo>
     233        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     234            <env key="LANG" value="C"/>
     235            <arg value="-m '${commit.message}'"/>
     236            <arg value="commit"/>
     237            <arg value="${plugin.jar}"/>
     238        </exec>
     239    </target>
     240    <!-- ** make sure svn is present as a command line tool ** -->
     241    <target name="ensure-svn-present">
     242        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
     243            <env key="LANG" value="C"/>
     244            <arg value="--version"/>
     245        </exec>
     246        <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
     247            <!-- return code not set at all? Most likely svn isn't installed -->
     248            <condition>
     249                <not>
     250                    <isset property="svn.exit.code"/>
     251                </not>
     252            </condition>
     253        </fail>
     254        <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
     255            <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
     256            <condition>
     257                <isfailure code="${svn.exit.code}"/>
     258            </condition>
     259        </fail>
     260    </target>
     261    <target name="publish">
     262        <!-- depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist" -->
     263        <echo>No normal josm-plugin, publishing over smed !!!
     264            1. ant - dist to each subplugin
     265            2. ant publish to smed
     266        </echo>
     267    </target>
    294268</project>
  • applications/editors/josm/plugins/smed_bfw/smed_bfw/build.xml

    r23984 r26174  
    1 <?xml version="1.0" encoding="UTF-8"?>
    2 <project name="project" default="build"> 
    3         <import file="../cnf/build.xml"/>
     1<?xml version="1.0" encoding="utf-8"?>
     2<project name="project" default="build">
     3    <import file="../cnf/build.xml"/>
    44</project>
  • applications/editors/josm/plugins/smed_fw/build.xml

    r25199 r26174  
    1 <?xml version="1.0" encoding="UTF-8"?>
     1<?xml version="1.0" encoding="utf-8"?>
    22<!--
    33** This is a template build file for a JOSM  plugin.
     
    2929-->
    3030<project name="smed_fw" basedir=".">
    31 
    32         <!-- enter the SVN commit message -->
    33         <property name="commit.message" value="smed with embeddes felix and DS" />
    34         <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    35         <property name="plugin.main.version" value="3835" />
    36 
    37 
    38         <!--
     31    <!-- enter the SVN commit message -->
     32    <property name="commit.message" value="smed with embeddes felix and DS"/>
     33    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
     34    <property name="plugin.main.version" value="3835"/>
     35    <!--
    3936      ************************************************
    4037      ** should not be necessary to change the following properties
    4138     -->
    42         <property name="josm" location="../../core/dist/josm-custom.jar" />
    43         <property name="felix"                                  location="core/dist/felix.jar"/>
    44         <property name="plugin.build.dir" value="build/" />
    45         <property name="plugin.src.dir" value="src/" />
    46         <property name="smed_fw.dist.dir" value="dist/" />
    47         <!-- this is the directory where the plugin jar is copied to -->
    48         <property name="plugin.dist.dir" value="../../dist/" />
    49         <property name="smed_fw_core.dist.dir" value="core/dist/" />
    50         <property name="ant.build.javac.target" value="1.5" />
    51         <property name="plugin.jar" value="${plugin.dist.dir}${ant.project.name}.jar" />
    52 
    53         <!--
     39    <property name="josm" location="../../core/dist/josm-custom.jar"/>
     40    <property name="felix" location="core/dist/felix.jar"/>
     41    <property name="plugin.build.dir" value="build/"/>
     42    <property name="plugin.src.dir" value="src/"/>
     43    <property name="smed_fw.dist.dir" value="dist/"/>
     44    <!-- this is the directory where the plugin jar is copied to -->
     45    <property name="plugin.dist.dir" value="../../dist/"/>
     46    <property name="smed_fw_core.dist.dir" value="core/dist/"/>
     47    <property name="ant.build.javac.target" value="1.5"/>
     48    <property name="plugin.jar" value="${plugin.dist.dir}${ant.project.name}.jar"/>
     49    <!--
    5450    **********************************************************
    5551    ** init - initializes the build
    5652    **********************************************************
    5753    -->
    58         <target name="init">
    59                 <mkdir dir="${plugin.build.dir}" />
    60                 <mkdir dir="${smed_fw_core.dist.dir}" />
    61                 <mkdir dir="${smed_fw.dist.dir}" />
    62         </target>
    63 
    64         <!--
     54    <target name="init">
     55        <mkdir dir="${plugin.build.dir}"/>
     56        <mkdir dir="${smed_fw_core.dist.dir}"/>
     57        <mkdir dir="${smed_fw.dist.dir}"/>
     58    </target>
     59    <!--
    6560    **********************************************************
    6661    ** compile - complies the source tree
    6762    **********************************************************
    6863    -->
    69         <target name="compile" depends="init">
    70                 <echo message="compiling sources for  ${plugin.jar} ... " />
    71                 <javac srcdir="src" classpath="${josm}:${felix}" debug="true" destdir="${plugin.build.dir}">
    72                         <compilerarg value="-Xlint:deprecation" />
    73                         <compilerarg value="-Xlint:unchecked" />
    74                 </javac>
    75         </target>
    76 
    77         <!--
     64    <target name="compile" depends="init">
     65        <echo message="compiling sources for  ${plugin.jar} ... "/>
     66        <javac srcdir="src" classpath="${josm}:${felix}" debug="true" destdir="${plugin.build.dir}">
     67            <compilerarg value="-Xlint:deprecation"/>
     68            <compilerarg value="-Xlint:unchecked"/>
     69        </javac>
     70    </target>
     71    <!--
    7872    **********************************************************
    7973    ** dist - creates the plugin jar
    8074    **********************************************************
    8175    -->
    82         <target name="dist" depends="compile, revision">
    83                 <echo message="creating ${ant.project.name}.jar ... " />
    84 
    85                 <copy todir="${plugin.build.dir}/images">
    86                         <fileset dir="${plugin.src.dir}/images" />
    87                 </copy>
    88 
    89                 <copy todir="${plugin.build.dir}/images">
    90                         <fileset dir="images" />
    91                 </copy>
    92 
    93                 <copy todir="${plugin.build.dir}/smed_fw/msg">
    94                         <fileset dir="${plugin.src.dir}/smed_fw/msg" />
    95                 </copy>
    96 
    97                 <copy todir="${plugin.build.dir}">
    98                         <fileset dir="${smed_fw.dist.dir}" />
    99                 </copy>
    100 
    101                 <copy todir="${plugin.build.dir}">
    102                         <fileset dir=".">
    103                                 <include name="*.txt" />
    104                         </fileset>
    105                 </copy>
    106                
    107                 <copy file="${felix}" todir="${plugin.build.dir}" />
    108                
    109                 <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
    110                         <!--
     76    <target name="dist" depends="compile, revision">
     77        <echo message="creating ${ant.project.name}.jar ... "/>
     78        <copy todir="${plugin.build.dir}/images">
     79            <fileset dir="images"/>
     80        </copy>
     81        <copy todir="${plugin.build.dir}/smed_fw/msg">
     82            <fileset dir="${plugin.src.dir}/smed_fw/msg"/>
     83        </copy>
     84        <copy todir="${plugin.build.dir}">
     85            <fileset dir="${smed_fw.dist.dir}"/>
     86        </copy>
     87        <copy todir="${plugin.build.dir}">
     88            <fileset dir=".">
     89                <include name="*.txt"/>
     90            </fileset>
     91        </copy>
     92        <copy file="${felix}" todir="${plugin.build.dir}"/>
     93        <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
     94            <!--
    11195        ************************************************
    11296        ** configure these properties. Most of them will be copied to the plugins
     
    116100        ************************************************
    117101    -->
    118                         <manifest>
    119                                 <attribute name="Author" value="Werner, Malcolm" />
    120                                 <attribute name="Plugin-Class" value="smed_fw.SmedFW" />
    121                                 <attribute name="Plugin-Date" value="${version.entry.commit.date}" />
    122                                 <attribute name="Plugin-Description" value="Create and edit seamaps for OpenSeaMap" />
    123                                 <attribute name="Plugin-Icon" value="images/Smed.png" />
    124                                 <attribute name="Plugin-Link" value="http://openseamap.org/" />
    125                                 <attribute name="Plugin-Mainversion" value="${plugin.main.version}" />
    126                                 <!--
    127                                 <attribute name="Plugin-Version" value="23456"/>
    128                                 -->
    129                                 <attribute name="Plugin-Version" value="${version.entry.commit.revision}" />
    130                                 <attribute name="Class-Path" value="bin/felix.jar"/>
    131 
    132                         </manifest>
    133                 </jar>
    134 
    135                 <!-- install interface -->
    136                 <copy file="${plugin.jar}" todir="${smed_fw_core.dist.dir}" />
    137         </target>
    138 
    139         <!--
     102            <manifest>
     103                <attribute name="Author" value="Werner, Malcolm"/>
     104                <attribute name="Plugin-Class" value="smed_fw.SmedFW"/>
     105                <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
     106                <attribute name="Plugin-Description" value="Create and edit seamaps for OpenSeaMap"/>
     107                <attribute name="Plugin-Icon" value="images/Smed.png"/>
     108                <attribute name="Plugin-Link" value="http://openseamap.org/"/>
     109                <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
     110                <!--
     111                <attribute name="Plugin-Version" value="23456"/>
     112                -->
     113                <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
     114                <attribute name="Class-Path" value="bin/felix.jar"/>
     115            </manifest>
     116        </jar>
     117        <!-- install interface -->
     118        <copy file="${plugin.jar}" todir="${smed_fw_core.dist.dir}"/>
     119    </target>
     120    <!--
    140121    **********************************************************
    141122    ** revision - extracts the current revision number for the
     
    144125    **********************************************************
    145126    -->
    146         <target name="revision">
    147 
    148                 <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
    149                         <env key="LANG" value="C" />
    150                         <arg value="info" />
    151                         <arg value="--xml" />
    152                         <arg value="." />
    153                 </exec>
    154                 <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true" />
    155                 <delete file="REVISION" />
    156         </target>
    157 
    158 
    159         <!--
     127    <target name="revision">
     128        <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
     129            <env key="LANG" value="C"/>
     130            <arg value="info"/>
     131            <arg value="--xml"/>
     132            <arg value="."/>
     133        </exec>
     134        <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
     135        <delete file="REVISION"/>
     136    </target>
     137    <!--
    160138    **********************************************************
    161139    ** clean - clean up the build environment
    162140    **********************************************************
    163141    -->
    164         <target name="clean">
    165                 <delete dir="${plugin.build.dir}" />
    166                 <delete file="${plugin.jar}" />
    167         </target>
    168 
    169         <!--
     142    <target name="clean">
     143        <delete dir="${plugin.build.dir}"/>
     144        <delete file="${plugin.jar}"/>
     145    </target>
     146    <!--
    170147    **********************************************************
    171148    ** install - install the plugin in your local JOSM installation
    172149    **********************************************************
    173150    -->
    174         <target name="install" depends="dist">
    175                 <property environment="env" />
    176                 <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
    177                         <and>
    178                                 <os family="windows" />
    179                         </and>
    180                 </condition>
    181                 <copy file="${plugin.jar}" todir="${josm.plugins.dir}" />
    182         </target>
    183 
    184         <!--
    185                 ** commits the source tree for this plugin
    186                 -->
    187         <target name="commit-current">
    188                 <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
    189                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    190                         <env key="LANG" value="C" />
    191                         <arg value="commit" />
    192                         <arg value="-m '${commit.message}'" />
    193                         <arg value="." />
    194                 </exec>
    195         </target>
    196 
    197         <!--
    198                 ** updates (svn up) the source tree for this plugin
    199                 -->
    200         <target name="update-current">
    201                 <echo>Updating plugin source ...</echo>
    202                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    203                         <env key="LANG" value="C" />
    204                         <arg value="up" />
    205                         <arg value="." />
    206                 </exec>
    207                 <echo>Updating ${plugin.jar} ...</echo>
    208                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    209                         <env key="LANG" value="C" />
    210                         <arg value="up" />
    211                         <arg value="../dist/${plugin.jar}" />
    212                 </exec>
    213         </target>
    214 
     151    <target name="install" depends="dist">
     152        <property environment="env"/>
     153        <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
     154            <and>
     155                <os family="windows"/>
     156            </and>
     157        </condition>
     158        <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
     159    </target>
     160    <!--
     161        ** commits the source tree for this plugin
     162        -->
     163    <target name="commit-current">
     164        <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
     165        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     166            <env key="LANG" value="C"/>
     167            <arg value="commit"/>
     168            <arg value="-m '${commit.message}'"/>
     169            <arg value="."/>
     170        </exec>
     171    </target>
     172    <!--
     173        ** updates (svn up) the source tree for this plugin
     174        -->
     175    <target name="update-current">
     176        <echo>Updating plugin source ...</echo>
     177        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     178            <env key="LANG" value="C"/>
     179            <arg value="up"/>
     180            <arg value="."/>
     181        </exec>
     182        <echo>Updating ${plugin.jar} ...</echo>
     183        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     184            <env key="LANG" value="C"/>
     185            <arg value="up"/>
     186            <arg value="../dist/${plugin.jar}"/>
     187        </exec>
     188    </target>
    215189</project>
  • applications/editors/josm/plugins/surveyor/build.xml

    r25199 r26174  
    1 <?xml version="1.0" encoding="UTF-8"?>
     1<?xml version="1.0" encoding="utf-8"?>
    22<!--
    33** This is the build file for the surveyor plugin.
     
    2929-->
    3030<project name="surveyor" default="dist" basedir=".">
    31 
    32         <!-- enter the SVN commit message -->
    33         <property name="commit.message" value="Changed the constructor signature of the plugin main class" />
    34         <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    35         <property name="plugin.main.version" value="3835" />
    36 
    37 
    38         <property name="josm"                   location="../../core/dist/josm-custom.jar"/>
    39         <property name="plugin.dist.dir"        value="../../dist"/>
    40         <property name="plugin.build.dir"       value="build"/>
    41         <property name="plugin.jar"             value="${plugin.dist.dir}/${ant.project.name}.jar"/>
    42         <property name="livegpsplugin.jar"      value="${plugin.dist.dir}/livegps.jar"/>
    43         <property name="ant.build.javac.target" value="1.5"/>
    44         <target name="init">
    45                 <mkdir dir="${plugin.build.dir}"/>
    46         </target>
    47         <target name="compile" depends="init">
    48                 <echo message="creating ${plugin.jar}"/>
    49                 <javac srcdir="src" debug="true" destdir="${plugin.build.dir}">
    50                         <compilerarg value="-Xlint:deprecation"/>
    51                         <compilerarg value="-Xlint:unchecked"/>
    52                         <classpath>
    53                                 <pathelement location="${josm}"/>
    54                                 <pathelement location="${livegpsplugin.jar}"/>
    55                         </classpath>
    56                 </javac>
    57         </target>
    58         <target name="dist" depends="compile,revision">
    59                 <copy todir="${plugin.build.dir}/">
    60                         <fileset dir="resources">
    61                                 <include name="*.xml"/>
    62                                 <include name="audio/*"/>
    63                         </fileset>
    64                 </copy>
    65                 <copy todir="${plugin.build.dir}/images">
    66                         <fileset dir="images"/>
    67                 </copy>
    68                 <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
    69                         <manifest>
    70                                 <attribute name="Author" value="Christof Dallermassl"/>
    71                                 <attribute name="Plugin-Class" value="at.dallermassl.josm.plugin.surveyor.SurveyorPlugin"/>
    72                                 <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
    73                                 <attribute name="Plugin-Description" value="Allow adding markers/nodes on current gps positions."/>
    74                                 <attribute name="Plugin-Icon" value="images/surveyormenu.png"/>
    75                                 <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/index.php/JOSM/Plugins/Surveyor"/>
    76                                 <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
    77                                 <attribute name="Plugin-Requires" value="livegps"/>
    78                                 <attribute name="Plugin-Stage" value="60"/>
    79                                 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
    80                         </manifest>
    81                 </jar>
    82         </target>
    83         <target name="revision">
    84                 <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
    85                         <env key="LANG" value="C"/>
    86                         <arg value="info"/>
    87                         <arg value="--xml"/>
    88                         <arg value="."/>
    89                 </exec>
    90                 <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
    91                 <delete file="REVISION"/>
    92         </target>
    93         <target name="clean">
    94                 <delete dir="${plugin.build.dir}"/>
    95                 <delete file="${plugin.jar}"/>
    96         </target>
    97         <target name="install" depends="dist">
    98                 <property environment="env"/>
    99                 <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
    100                         <and>
    101                                 <os family="windows"/>
    102                         </and>
    103                 </condition>
    104                 <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
    105         </target>
    106 
    107         <!--
    108                 ************************** Publishing the plugin ***********************************
    109                 -->
    110         <!--
    111                         ** extracts the JOSM release for the JOSM version in ../core and saves it in the
    112                         ** property ${coreversion.info.entry.revision}
    113                         **
    114                         -->
    115         <target name="core-info">
    116                 <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
    117                         <env key="LANG" value="C"/>
    118                         <arg value="info"/>
    119                         <arg value="--xml"/>
    120                         <arg value="../../core"/>
    121                 </exec>
    122                 <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
    123                 <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
    124                 <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
    125                 <delete file="core.info.xml" />
    126         </target>
    127 
    128         <!--
    129                         ** commits the source tree for this plugin
    130                         -->
    131         <target name="commit-current">
    132                 <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
    133                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    134                         <env key="LANG" value="C"/>
    135                         <arg value="commit"/>
    136                         <arg value="-m '${commit.message}'"/>
    137                         <arg value="."/>
    138                 </exec>
    139         </target>
    140 
    141         <!--
    142                         ** updates (svn up) the source tree for this plugin
    143                         -->
    144         <target name="update-current">
    145                 <echo>Updating plugin source ...</echo>
    146                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    147                         <env key="LANG" value="C"/>
    148                         <arg value="up"/>
    149                         <arg value="."/>
    150                 </exec>
    151                 <echo>Updating ${plugin.jar} ...</echo>
    152                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    153                         <env key="LANG" value="C"/>
    154                         <arg value="up"/>
    155                         <arg value="../dist/${plugin.jar}"/>
    156                 </exec>
    157         </target>
    158 
    159         <!--
    160                         ** commits the plugin.jar
    161                         -->
    162         <target name="commit-dist">
    163                 <echo>
    164                 ***** Properties of published ${plugin.jar} *****
    165                 Commit message    : '${commit.message}'                                 
    166                 Plugin-Mainversion: ${plugin.main.version}
    167                 JOSM build version: ${coreversion.info.entry.revision}
    168                 Plugin-Version    : ${version.entry.commit.revision}
    169                 ***** / Properties of published ${plugin.jar} *****                                     
    170                                                        
    171                 Now commiting ${plugin.jar} ...
    172                 </echo>
    173                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    174                         <env key="LANG" value="C"/>
    175                         <arg value="-m '${commit.message}'"/>
    176                         <arg value="commit"/>
    177                         <arg value="${plugin.jar}"/>
    178                 </exec>
    179         </target>
    180 
    181         <!-- ** make sure svn is present as a command line tool ** -->
    182         <target name="ensure-svn-present">
    183                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
    184                         <env key="LANG" value="C" />
    185                         <arg value="--version" />
    186                 </exec>
    187                 <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
    188                         <!-- return code not set at all? Most likely svn isn't installed -->
    189                         <condition>
    190                                 <not>
    191                                         <isset property="svn.exit.code" />
    192                                 </not>
    193                         </condition>
    194                 </fail>
    195                 <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
    196                         <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
    197                         <condition>
    198                                 <isfailure code="${svn.exit.code}" />
    199                         </condition>
    200                 </fail>
    201         </target>
    202 
    203         <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
    204         </target>
     31    <!-- enter the SVN commit message -->
     32    <property name="commit.message" value="Changed the constructor signature of the plugin main class"/>
     33    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
     34    <property name="plugin.main.version" value="3835"/>
     35    <property name="josm" location="../../core/dist/josm-custom.jar"/>
     36    <property name="plugin.dist.dir" value="../../dist"/>
     37    <property name="plugin.build.dir" value="build"/>
     38    <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/>
     39    <property name="livegpsplugin.jar" value="${plugin.dist.dir}/livegps.jar"/>
     40    <property name="ant.build.javac.target" value="1.5"/>
     41    <target name="init">
     42        <mkdir dir="${plugin.build.dir}"/>
     43    </target>
     44    <target name="compile" depends="init">
     45        <echo message="creating ${plugin.jar}"/>
     46        <javac srcdir="src" debug="true" destdir="${plugin.build.dir}">
     47            <compilerarg value="-Xlint:deprecation"/>
     48            <compilerarg value="-Xlint:unchecked"/>
     49            <classpath>
     50                <pathelement location="${josm}"/>
     51                <pathelement location="${livegpsplugin.jar}"/>
     52            </classpath>
     53        </javac>
     54    </target>
     55    <target name="dist" depends="compile,revision">
     56        <copy todir="${plugin.build.dir}/">
     57            <fileset dir="resources">
     58                <include name="*.xml"/>
     59                <include name="audio/*"/>
     60            </fileset>
     61        </copy>
     62        <copy todir="${plugin.build.dir}/images">
     63            <fileset dir="images"/>
     64        </copy>
     65        <copy todir="${plugin.build.dir}/data">
     66            <fileset dir="data"/>
     67        </copy>
     68        <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
     69            <manifest>
     70                <attribute name="Author" value="Christof Dallermassl"/>
     71                <attribute name="Plugin-Class" value="at.dallermassl.josm.plugin.surveyor.SurveyorPlugin"/>
     72                <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
     73                <attribute name="Plugin-Description" value="Allow adding markers/nodes on current gps positions."/>
     74                <attribute name="Plugin-Icon" value="images/surveyormenu.png"/>
     75                <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/index.php/JOSM/Plugins/Surveyor"/>
     76                <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
     77                <attribute name="Plugin-Requires" value="livegps"/>
     78                <attribute name="Plugin-Stage" value="60"/>
     79                <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
     80            </manifest>
     81        </jar>
     82    </target>
     83    <target name="revision">
     84        <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
     85            <env key="LANG" value="C"/>
     86            <arg value="info"/>
     87            <arg value="--xml"/>
     88            <arg value="."/>
     89        </exec>
     90        <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
     91        <delete file="REVISION"/>
     92    </target>
     93    <target name="clean">
     94        <delete dir="${plugin.build.dir}"/>
     95        <delete file="${plugin.jar}"/>
     96    </target>
     97    <target name="install" depends="dist">
     98        <property environment="env"/>
     99        <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
     100            <and>
     101                <os family="windows"/>
     102            </and>
     103        </condition>
     104        <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
     105    </target>
     106    <!--
     107        ************************** Publishing the plugin ***********************************
     108        -->
     109    <!--
     110            ** extracts the JOSM release for the JOSM version in ../core and saves it in the
     111            ** property ${coreversion.info.entry.revision}
     112            **
     113            -->
     114    <target name="core-info">
     115        <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
     116            <env key="LANG" value="C"/>
     117            <arg value="info"/>
     118            <arg value="--xml"/>
     119            <arg value="../../core"/>
     120        </exec>
     121        <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
     122        <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
     123        <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
     124        <delete file="core.info.xml"/>
     125    </target>
     126    <!--
     127            ** commits the source tree for this plugin
     128            -->
     129    <target name="commit-current">
     130        <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
     131        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     132            <env key="LANG" value="C"/>
     133            <arg value="commit"/>
     134            <arg value="-m '${commit.message}'"/>
     135            <arg value="."/>
     136        </exec>
     137    </target>
     138    <!--
     139            ** updates (svn up) the source tree for this plugin
     140            -->
     141    <target name="update-current">
     142        <echo>Updating plugin source ...</echo>
     143        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     144            <env key="LANG" value="C"/>
     145            <arg value="up"/>
     146            <arg value="."/>
     147        </exec>
     148        <echo>Updating ${plugin.jar} ...</echo>
     149        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     150            <env key="LANG" value="C"/>
     151            <arg value="up"/>
     152            <arg value="../dist/${plugin.jar}"/>
     153        </exec>
     154    </target>
     155    <!--
     156            ** commits the plugin.jar
     157            -->
     158    <target name="commit-dist">
     159        <echo>
     160        ***** Properties of published ${plugin.jar} *****
     161        Commit message    : '${commit.message}'                 
     162        Plugin-Mainversion: ${plugin.main.version}
     163        JOSM build version: ${coreversion.info.entry.revision}
     164        Plugin-Version    : ${version.entry.commit.revision}
     165        ***** / Properties of published ${plugin.jar} *****                 
     166                           
     167        Now commiting ${plugin.jar} ...
     168        </echo>
     169        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     170            <env key="LANG" value="C"/>
     171            <arg value="-m '${commit.message}'"/>
     172            <arg value="commit"/>
     173            <arg value="${plugin.jar}"/>
     174        </exec>
     175    </target>
     176    <!-- ** make sure svn is present as a command line tool ** -->
     177    <target name="ensure-svn-present">
     178        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
     179            <env key="LANG" value="C"/>
     180            <arg value="--version"/>
     181        </exec>
     182        <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
     183            <!-- return code not set at all? Most likely svn isn't installed -->
     184            <condition>
     185                <not>
     186                    <isset property="svn.exit.code"/>
     187                </not>
     188            </condition>
     189        </fail>
     190        <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
     191            <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
     192            <condition>
     193                <isfailure code="${svn.exit.code}"/>
     194            </condition>
     195        </fail>
     196    </target>
     197    <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
     198    </target>
    205199</project>
  • applications/editors/josm/plugins/tageditor/build.xml

    r25191 r26174  
    1 <?xml version="1.0" encoding="UTF-8"?>
     1<?xml version="1.0" encoding="utf-8"?>
    22<!--
    33** This is the build file for the tageditor plugin
     
    2626-->
    2727<project name="tageditor" default="dist" basedir=".">
    28 
    29 
    30         <property name="commit.message" value="Updating to JOSM 3210" />
    31         <property name="plugin.main.version" value="3835" />
    32 
    33         <!--
     28    <property name="commit.message" value="Updating to JOSM 3210"/>
     29    <property name="plugin.main.version" value="3835"/>
     30    <!--
    3431      ************************************************
    3532      ** should not be necessary to change the following properties
    3633     -->
    37         <property name="josm"                   location="../../core/dist/josm-custom.jar"/>
    38         <property name="plugin.build.dir"       value="build"/>
    39         <property name="plugin.src.dir"         value="src"/>
    40         <!-- this is the directory where the plugin jar is copied to -->
    41         <property name="plugin.dist.dir"        value="../../dist"/>
    42         <property name="ant.build.javac.target" value="1.5"/>
    43         <property name="plugin.dist.dir"        value="../../dist"/>
    44         <property name="plugin.jar"             value="${plugin.dist.dir}/${ant.project.name}.jar"/>
    45 
    46         <!--
     34    <property name="josm" location="../../core/dist/josm-custom.jar"/>
     35    <property name="plugin.build.dir" value="build"/>
     36    <property name="plugin.src.dir" value="src"/>
     37    <!-- this is the directory where the plugin jar is copied to -->
     38    <property name="plugin.dist.dir" value="../../dist"/>
     39    <property name="ant.build.javac.target" value="1.5"/>
     40    <property name="plugin.dist.dir" value="../../dist"/>
     41    <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/>
     42    <!--
    4743    **********************************************************
    4844    ** init - initializes the build
    4945    **********************************************************
    5046    -->
    51         <target name="init">
    52                 <mkdir dir="${plugin.build.dir}"/>
    53         </target>
    54 
    55         <!--
     47    <target name="init">
     48        <mkdir dir="${plugin.build.dir}"/>
     49    </target>
     50    <!--
    5651    **********************************************************
    5752    ** compile - complies the source tree
    5853    **********************************************************
    5954    -->
    60         <target name="compile" depends="init">
    61                 <echo message="compiling sources for  ${plugin.jar} ... "/>
    62                 <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}">
    63                         <compilerarg value="-Xlint:deprecation"/>
    64                         <compilerarg value="-Xlint:unchecked"/>
    65                 </javac>
    66         </target>
    67 
    68         <!--
     55    <target name="compile" depends="init">
     56        <echo message="compiling sources for  ${plugin.jar} ... "/>
     57        <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}">
     58            <compilerarg value="-Xlint:deprecation"/>
     59            <compilerarg value="-Xlint:unchecked"/>
     60        </javac>
     61    </target>
     62    <!--
    6963    **********************************************************
    7064    ** dist - creates the plugin jar
    7165    **********************************************************
    7266    -->
    73         <target name="dist" depends="compile,revision">
    74                 <echo message="creating ${plugin.jar} for version ${version.entry.commit.revision} ... "/>
    75                 <copy todir="${plugin.build.dir}/resources">
    76                         <fileset dir="resources"/>
    77                 </copy>
    78                 <copy todir="${plugin.build.dir}">
    79                         <fileset dir=".">
    80                                 <include name="README" />
    81                                 <include name="LICENSE" />
    82                         </fileset>
    83                 </copy>
    84                 <copy todir="${plugin.build.dir}">
    85                         <fileset dir="${plugin.src.dir}">
    86                                 <include name="**/*.dtd"/>
    87                         </fileset>
    88                 </copy>
    89                 <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
    90                         <manifest>
    91                                 <attribute name="Author" value="Karl Guggisberg"/>
    92                                 <attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.tageditor.TagEditorPlugin"/>
    93                                 <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
    94                                 <attribute name="Plugin-Description" value="Provides a dialog for editing tags in a tabular grid."/>
    95                                 <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/index.php/JOSM/Plugins/TagEditor"/>
    96                                 <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
    97                                 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
    98                         </manifest>
    99                 </jar>
    100         </target>
    101 
    102         <!--
     67    <target name="dist" depends="compile,revision">
     68        <echo message="creating ${plugin.jar} for version ${version.entry.commit.revision} ... "/>
     69        <copy todir="${plugin.build.dir}/resources">
     70            <fileset dir="resources"/>
     71        </copy>
     72        <copy todir="${plugin.build.dir}/data">
     73            <fileset dir="data"/>
     74        </copy>
     75        <copy todir="${plugin.build.dir}">
     76            <fileset dir=".">
     77                <include name="README"/>
     78                <include name="LICENSE"/>
     79            </fileset>
     80        </copy>
     81        <copy todir="${plugin.build.dir}">
     82            <fileset dir="${plugin.src.dir}">
     83                <include name="**/*.dtd"/>
     84            </fileset>
     85        </copy>
     86        <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
     87            <manifest>
     88                <attribute name="Author" value="Karl Guggisberg"/>
     89                <attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.tageditor.TagEditorPlugin"/>
     90                <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
     91                <attribute name="Plugin-Description" value="Provides a dialog for editing tags in a tabular grid."/>
     92                <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/index.php/JOSM/Plugins/TagEditor"/>
     93                <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
     94                <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
     95            </manifest>
     96        </jar>
     97    </target>
     98    <!--
    10399    **********************************************************
    104100    ** revision - extracts the current revision number for the
     
    107103    **********************************************************
    108104    -->
    109         <target name="revision">
    110                 <!-- extract the SVN revision information  -->
    111                 <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
    112                         <env key="LANG" value="C"/>
    113                         <arg value="info"/>
    114                         <arg value="--xml"/>
    115                         <arg value="."/>
    116                 </exec>
    117                 <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
    118                 <delete file="REVISION"/>
    119         </target>
    120 
    121         <!--
     105    <target name="revision">
     106        <!-- extract the SVN revision information  -->
     107        <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
     108            <env key="LANG" value="C"/>
     109            <arg value="info"/>
     110            <arg value="--xml"/>
     111            <arg value="."/>
     112        </exec>
     113        <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
     114        <delete file="REVISION"/>
     115    </target>
     116    <!--
    122117    **********************************************************
    123118    ** clean - clean up the build environment
    124119    **********************************************************
    125120    -->
    126         <target name="clean">
    127                 <delete dir="${plugin.build.dir}"/>
    128                 <delete file="${plugin.jar}"/>
    129         </target>
    130 
    131         <!--
     121    <target name="clean">
     122        <delete dir="${plugin.build.dir}"/>
     123        <delete file="${plugin.jar}"/>
     124    </target>
     125    <!--
    132126    **********************************************************
    133127    ** install - install the plugin in your local JOSM installation
    134128    **********************************************************
    135129    -->
    136         <target name="install" depends="dist">
    137                 <property environment="env"/>
    138                 <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
    139                         <and>
    140                                 <os family="windows"/>
    141                         </and>
    142                 </condition>
    143                 <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
    144         </target>
    145 
    146         <!--
    147          ************************** Publishing the plugin ***********************************
    148         -->
    149         <!--
    150         ** extracts the JOSM release for the JOSM version in ../core and saves it in the
    151         ** property ${coreversion.info.entry.revision}
    152         **
    153         -->
    154         <target name="core-info">
    155                 <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
    156                         <env key="LANG" value="C"/>
    157                         <arg value="info"/>
    158                         <arg value="--xml"/>
    159                         <arg value="../../core"/>
    160                 </exec>
    161                 <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
    162                 <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
    163                 <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
    164                 <delete file="core.info.xml" />
    165         </target>
    166 
    167         <!--
    168         ** commits the source tree for this plugin
    169         -->
    170         <target name="commit-current">
    171                 <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
    172                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    173                         <env key="LANG" value="C"/>
    174                         <arg value="commit"/>
    175                         <arg value="-m '${commit.message}'"/>
    176                         <arg value="."/>
    177                 </exec>
    178         </target>
    179 
    180         <!--
    181         ** updates (svn up) the source tree for this plugin
    182         -->
    183         <target name="update-current">
    184                 <echo>Updating plugin source ...</echo>
    185                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    186                         <env key="LANG" value="C"/>
    187                         <arg value="up"/>
    188                         <arg value="."/>
    189                 </exec>
    190                 <echo>Updating ${plugin.jar} ...</echo>
    191                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    192                         <env key="LANG" value="C"/>
    193                         <arg value="up"/>
    194                         <arg value="../dist/${plugin.jar}"/>
    195                 </exec>
    196         </target>
    197 
    198         <!--
    199         ** commits the plugin.jar
    200         -->
    201         <target name="commit-dist">
    202                 <echo>
     130    <target name="install" depends="dist">
     131        <property environment="env"/>
     132        <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
     133            <and>
     134                <os family="windows"/>
     135            </and>
     136        </condition>
     137        <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
     138    </target>
     139    <!--
     140     ************************** Publishing the plugin ***********************************
     141    -->
     142    <!--
     143    ** extracts the JOSM release for the JOSM version in ../core and saves it in the
     144    ** property ${coreversion.info.entry.revision}
     145    **
     146    -->
     147    <target name="core-info">
     148        <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
     149            <env key="LANG" value="C"/>
     150            <arg value="info"/>
     151            <arg value="--xml"/>
     152            <arg value="../../core"/>
     153        </exec>
     154        <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
     155        <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
     156        <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
     157        <delete file="core.info.xml"/>
     158    </target>
     159    <!--
     160    ** commits the source tree for this plugin
     161    -->
     162    <target name="commit-current">
     163        <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
     164        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     165            <env key="LANG" value="C"/>
     166            <arg value="commit"/>
     167            <arg value="-m '${commit.message}'"/>
     168            <arg value="."/>
     169        </exec>
     170    </target>
     171    <!--
     172    ** updates (svn up) the source tree for this plugin
     173    -->
     174    <target name="update-current">
     175        <echo>Updating plugin source ...</echo>
     176        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     177            <env key="LANG" value="C"/>
     178            <arg value="up"/>
     179            <arg value="."/>
     180        </exec>
     181        <echo>Updating ${plugin.jar} ...</echo>
     182        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     183            <env key="LANG" value="C"/>
     184            <arg value="up"/>
     185            <arg value="../dist/${plugin.jar}"/>
     186        </exec>
     187    </target>
     188    <!--
     189    ** commits the plugin.jar
     190    -->
     191    <target name="commit-dist">
     192        <echo>
    203193***** Properties of published ${plugin.jar} *****
    204 Commit message    : '${commit.message}'                                 
     194Commit message    : '${commit.message}'                 
    205195Plugin-Mainversion: ${plugin.main.version}
    206196JOSM build version: ${coreversion.info.entry.revision}
    207197Plugin-Version    : ${version.entry.commit.revision}
    208 ***** / Properties of published ${plugin.jar} *****                                     
    209                                        
     198***** / Properties of published ${plugin.jar} *****                 
     199                   
    210200Now commiting ${plugin.jar} ...
    211201</echo>
    212                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    213                         <env key="LANG" value="C"/>
    214                         <arg value="-m '${commit.message}'"/>
    215                         <arg value="commit"/>
    216                         <arg value="${plugin.jar}"/>
    217                 </exec>
    218         </target>
    219 
    220         <!-- ** make sure svn is present as a command line tool ** -->
    221         <target name="ensure-svn-present">
    222                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
    223                         <env key="LANG" value="C" />
    224                         <arg value="--version" />
    225                 </exec>
    226                 <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
    227                         <!-- return code not set at all? Most likely svn isn't installed -->
    228                         <condition>
    229                                 <not>
    230                                         <isset property="svn.exit.code" />
    231                                 </not>
    232                         </condition>
    233                 </fail>
    234                 <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
    235                         <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
    236                         <condition>
    237                                 <isfailure code="${svn.exit.code}" />
    238                         </condition>
    239                 </fail>
    240         </target>
    241 
    242         <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
    243         </target>
     202        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     203            <env key="LANG" value="C"/>
     204            <arg value="-m '${commit.message}'"/>
     205            <arg value="commit"/>
     206            <arg value="${plugin.jar}"/>
     207        </exec>
     208    </target>
     209    <!-- ** make sure svn is present as a command line tool ** -->
     210    <target name="ensure-svn-present">
     211        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
     212            <env key="LANG" value="C"/>
     213            <arg value="--version"/>
     214        </exec>
     215        <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
     216            <!-- return code not set at all? Most likely svn isn't installed -->
     217            <condition>
     218                <not>
     219                    <isset property="svn.exit.code"/>
     220                </not>
     221            </condition>
     222        </fail>
     223        <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
     224            <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
     225            <condition>
     226                <isfailure code="${svn.exit.code}"/>
     227            </condition>
     228        </fail>
     229    </target>
     230    <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
     231    </target>
    244232</project>
  • applications/editors/josm/plugins/tagging-preset-tester/build.xml

    r25191 r26174  
    1 <?xml version="1.0" encoding="UTF-8"?>
     1<?xml version="1.0" encoding="utf-8"?>
    22<!--
    33** This is the build file for the tagging-preset-tester plugin
     
    2626-->
    2727<project name="tagging-preset-tester" default="dist" basedir=".">
    28 
    29 
    30         <property name="commit.message" value="Changed the constructor signature of the plugin main class" />
    31         <property name="plugin.main.version" value="3835" />
    32 
    33 
    34         <property name="josm"                   location="../../core/dist/josm-custom.jar"/>
    35         <property name="plugin.dist.dir"        value="../../dist"/>
    36         <property name="plugin.build.dir"       value="build"/>
    37         <property name="plugin.jar"             value="${plugin.dist.dir}/${ant.project.name}.jar"/>
    38         <property name="ant.build.javac.target" value="1.5"/>
    39         <target name="init">
    40                 <mkdir dir="${plugin.build.dir}"/>
    41         </target>
    42         <target name="compile" depends="init">
    43                 <echo message="creating ${plugin.jar}"/>
    44                 <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}">
    45                         <compilerarg value="-Xlint:deprecation"/>
    46                         <compilerarg value="-Xlint:unchecked"/>
    47                 </javac>
    48         </target>
    49         <target name="dist" depends="compile,revision">
    50                 <copy todir="${plugin.build.dir}/images">
    51                         <fileset dir="images"/>
    52                 </copy>
    53                 <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
    54                         <manifest>
    55                                 <attribute name="Author" value="Imi"/>
    56                                 <attribute name="Main-Class" value="org.openstreetmap.josm.plugins.taggingpresettester.TaggingPresetTester"/>
    57                                 <attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.taggingpresettester.TaggingPresetTesterAction"/>
    58                                 <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
    59                                 <attribute name="Plugin-Description" value="Adds a tagging preset tester to the help menu, which helps you developing of tagging presets (quick preview of the dialog that will popup). You can start the jar-file as standalone as well."/>
    60                                 <attribute name="Plugin-Icon" value="images/tagging-preset-tester.png"/>
    61                                 <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
    62                                 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
    63                         </manifest>
    64                 </jar>
    65         </target>
    66         <target name="revision">
    67                 <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
    68                         <env key="LANG" value="C"/>
    69                         <arg value="info"/>
    70                         <arg value="--xml"/>
    71                         <arg value="."/>
    72                 </exec>
    73                 <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
    74                 <delete file="REVISION"/>
    75         </target>
    76         <target name="clean">
    77                 <delete dir="${plugin.build.dir}"/>
    78                 <delete file="${plugin.jar}"/>
    79         </target>
    80         <target name="install" depends="dist">
    81                 <property environment="env"/>
    82                 <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
    83                         <and>
    84                                 <os family="windows"/>
    85                         </and>
    86                 </condition>
    87                 <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
    88         </target>
    89 
    90         <!--
    91          ************************** Publishing the plugin ***********************************
    92         -->
    93         <!--
    94         ** extracts the JOSM release for the JOSM version in ../core and saves it in the
    95         ** property ${coreversion.info.entry.revision}
    96         **
    97         -->
    98         <target name="core-info">
    99                 <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
    100                         <env key="LANG" value="C"/>
    101                         <arg value="info"/>
    102                         <arg value="--xml"/>
    103                         <arg value="../../core"/>
    104                 </exec>
    105                 <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
    106                 <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
    107                 <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
    108                 <delete file="core.info.xml" />
    109         </target>
    110 
    111         <!--
    112         ** commits the source tree for this plugin
    113         -->
    114         <target name="commit-current">
    115                 <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
    116                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="true">
    117                         <env key="LANG" value="C"/>
    118                         <arg value="commit"/>
    119                         <arg value="-m '${commit.message}'"/>
    120                         <arg value="."/>
    121                 </exec>
    122         </target>
    123 
    124         <!--
    125         ** updates (svn up) the source tree for this plugin
    126         -->
    127         <target name="update-current">
    128                 <echo>Updating plugin source ...</echo>
    129                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    130                         <env key="LANG" value="C"/>
    131                         <arg value="up"/>
    132                         <arg value="."/>
    133                 </exec>
    134                 <echo>Updating ${plugin.jar} ...</echo>
    135                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    136                         <env key="LANG" value="C"/>
    137                         <arg value="up"/>
    138                         <arg value="../dist/${plugin.jar}"/>
    139                 </exec>
    140         </target>
    141 
    142         <!--
    143         ** commits the plugin.jar
    144         -->
    145         <target name="commit-dist">
    146                 <echo>
     28    <property name="commit.message" value="Changed the constructor signature of the plugin main class"/>
     29    <property name="plugin.main.version" value="3835"/>
     30    <property name="josm" location="../../core/dist/josm-custom.jar"/>
     31    <property name="plugin.dist.dir" value="../../dist"/>
     32    <property name="plugin.build.dir" value="build"/>
     33    <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/>
     34    <property name="ant.build.javac.target" value="1.5"/>
     35    <target name="init">
     36        <mkdir dir="${plugin.build.dir}"/>
     37    </target>
     38    <target name="compile" depends="init">
     39        <echo message="creating ${plugin.jar}"/>
     40        <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}">
     41            <compilerarg value="-Xlint:deprecation"/>
     42            <compilerarg value="-Xlint:unchecked"/>
     43        </javac>
     44    </target>
     45    <target name="dist" depends="compile,revision">
     46        <copy todir="${plugin.build.dir}/images">
     47            <fileset dir="images"/>
     48        </copy>
     49        <copy todir="${plugin.build.dir}/data">
     50            <fileset dir="data"/>
     51        </copy>
     52        <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
     53            <manifest>
     54                <attribute name="Author" value="Imi"/>
     55                <attribute name="Main-Class" value="org.openstreetmap.josm.plugins.taggingpresettester.TaggingPresetTester"/>
     56                <attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.taggingpresettester.TaggingPresetTesterAction"/>
     57                <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
     58                <attribute name="Plugin-Description" value="Adds a tagging preset tester to the help menu, which helps you developing of tagging presets (quick preview of the dialog that will popup). You can start the jar-file as standalone as well."/>
     59                <attribute name="Plugin-Icon" value="images/tagging-preset-tester.png"/>
     60                <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
     61                <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
     62            </manifest>
     63        </jar>
     64    </target>
     65    <target name="revision">
     66        <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
     67            <env key="LANG" value="C"/>
     68            <arg value="info"/>
     69            <arg value="--xml"/>
     70            <arg value="."/>
     71        </exec>
     72        <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
     73        <delete file="REVISION"/>
     74    </target>
     75    <target name="clean">
     76        <delete dir="${plugin.build.dir}"/>
     77        <delete file="${plugin.jar}"/>
     78    </target>
     79    <target name="install" depends="dist">
     80        <property environment="env"/>
     81        <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
     82            <and>
     83                <os family="windows"/>
     84            </and>
     85        </condition>
     86        <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
     87    </target>
     88    <!--
     89     ************************** Publishing the plugin ***********************************
     90    -->
     91    <!--
     92    ** extracts the JOSM release for the JOSM version in ../core and saves it in the
     93    ** property ${coreversion.info.entry.revision}
     94    **
     95    -->
     96    <target name="core-info">
     97        <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
     98            <env key="LANG" value="C"/>
     99            <arg value="info"/>
     100            <arg value="--xml"/>
     101            <arg value="../../core"/>
     102        </exec>
     103        <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
     104        <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
     105        <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
     106        <delete file="core.info.xml"/>
     107    </target>
     108    <!--
     109    ** commits the source tree for this plugin
     110    -->
     111    <target name="commit-current">
     112        <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
     113        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="true">
     114            <env key="LANG" value="C"/>
     115            <arg value="commit"/>
     116            <arg value="-m '${commit.message}'"/>
     117            <arg value="."/>
     118        </exec>
     119    </target>
     120    <!--
     121    ** updates (svn up) the source tree for this plugin
     122    -->
     123    <target name="update-current">
     124        <echo>Updating plugin source ...</echo>
     125        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     126            <env key="LANG" value="C"/>
     127            <arg value="up"/>
     128            <arg value="."/>
     129        </exec>
     130        <echo>Updating ${plugin.jar} ...</echo>
     131        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     132            <env key="LANG" value="C"/>
     133            <arg value="up"/>
     134            <arg value="../dist/${plugin.jar}"/>
     135        </exec>
     136    </target>
     137    <!--
     138    ** commits the plugin.jar
     139    -->
     140    <target name="commit-dist">
     141        <echo>
    147142***** Properties of published ${plugin.jar} *****
    148143Commit message    : '${commit.message}'
     
    154149Now commiting ${plugin.jar} ...
    155150</echo>
    156                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    157                         <env key="LANG" value="C"/>
    158                         <arg value="-m '${commit.message}'"/>
    159                         <arg value="commit"/>
    160                         <arg value="${plugin.jar}"/>
    161                 </exec>
    162         </target>
    163 
    164         <!-- ** make sure svn is present as a command line tool ** -->
    165         <target name="ensure-svn-present">
    166                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
    167                         <env key="LANG" value="C" />
    168                         <arg value="--version" />
    169                 </exec>
    170                 <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
    171                         <!-- return code not set at all? Most likely svn isn't installed -->
    172                         <condition>
    173                                 <not>
    174                                         <isset property="svn.exit.code" />
    175                                 </not>
    176                         </condition>
    177                 </fail>
    178                 <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
    179                         <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
    180                         <condition>
    181                                 <isfailure code="${svn.exit.code}" />
    182                         </condition>
    183                 </fail>
    184         </target>
    185 
    186         <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
    187         </target>
     151        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     152            <env key="LANG" value="C"/>
     153            <arg value="-m '${commit.message}'"/>
     154            <arg value="commit"/>
     155            <arg value="${plugin.jar}"/>
     156        </exec>
     157    </target>
     158    <!-- ** make sure svn is present as a command line tool ** -->
     159    <target name="ensure-svn-present">
     160        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
     161            <env key="LANG" value="C"/>
     162            <arg value="--version"/>
     163        </exec>
     164        <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
     165            <!-- return code not set at all? Most likely svn isn't installed -->
     166            <condition>
     167                <not>
     168                    <isset property="svn.exit.code"/>
     169                </not>
     170            </condition>
     171        </fail>
     172        <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
     173            <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
     174            <condition>
     175                <isfailure code="${svn.exit.code}"/>
     176            </condition>
     177        </fail>
     178    </target>
     179    <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
     180    </target>
    188181</project>
  • applications/editors/josm/plugins/terracer/build.xml

    r25199 r26174  
     1<?xml version="1.0" encoding="utf-8"?>
    12<!--
    23** This is a template build file for the terracer plugin
     
    2526-->
    2627<project name="terracer" default="dist" basedir=".">
    27     <property name="josm"                   location="../../core/dist/josm-custom.jar"/>
    28     <property name="plugin.dist.dir"        value="../../dist"/>
    29     <property name="plugin.build.dir"       value="build"/>
    30     <property name="plugin.jar"             value="${plugin.dist.dir}/${ant.project.name}.jar"/>
     28    <property name="josm" location="../../core/dist/josm-custom.jar"/>
     29    <property name="plugin.dist.dir" value="../../dist"/>
     30    <property name="plugin.build.dir" value="build"/>
     31    <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/>
    3132    <property name="ant.build.javac.target" value="1.5"/>
    32 
    33 
    34     <property name="commit.message" value="applied #j5760 (patch by robome) - Order of housenumbers not correct" />
    35     <property name="plugin.main.version" value="3835" />
    36 
    37 
     33    <property name="commit.message" value="applied #j5760 (patch by robome) - Order of housenumbers not correct"/>
     34    <property name="plugin.main.version" value="3835"/>
    3835    <target name="init">
    3936        <mkdir dir="${plugin.build.dir}"/>
     
    4946        <copy todir="${plugin.build.dir}/images">
    5047            <fileset dir="images"/>
     48        </copy>
     49        <copy todir="${plugin.build.dir}/data">
     50            <fileset dir="data"/>
    5151        </copy>
    5252        <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
     
    8686        <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
    8787    </target>
    88 
    8988    <!--
    9089         ************************** Publishing the plugin ***********************************
    9190        -->
    92             <!--
     91    <!--
    9392              ** extracts the JOSM release for the JOSM version in ../core and saves it in the
    9493              ** property ${coreversion.info.entry.revision}
    9594              **
    9695            -->
    97             <target name="core-info">
    98                 <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
    99                             <env key="LANG" value="C"/>
    100                             <arg value="info"/>
    101                             <arg value="--xml"/>
    102                             <arg value="../../core"/>
    103                 </exec>
    104                 <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
    105                 <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
    106                 <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
    107                 <delete file="core.info.xml" />
    108             </target>
    109 
    110             <!--
     96    <target name="core-info">
     97        <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
     98            <env key="LANG" value="C"/>
     99            <arg value="info"/>
     100            <arg value="--xml"/>
     101            <arg value="../../core"/>
     102        </exec>
     103        <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
     104        <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
     105        <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
     106        <delete file="core.info.xml"/>
     107    </target>
     108    <!--
    111109             ** commits the source tree for this plugin
    112110            -->
    113             <target name="commit-current">
    114                 <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
    115                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    116                                 <env key="LANG" value="C"/>
    117                                 <arg value="commit"/>
    118                                 <arg value="-m '${commit.message}'"/>
    119                                 <arg value="."/>
    120                 </exec>
    121             </target>
    122 
    123             <!--
     111    <target name="commit-current">
     112        <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
     113        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     114            <env key="LANG" value="C"/>
     115            <arg value="commit"/>
     116            <arg value="-m '${commit.message}'"/>
     117            <arg value="."/>
     118        </exec>
     119    </target>
     120    <!--
    124121            ** updates (svn up) the source tree for this plugin
    125122            -->
    126             <target name="update-current">
    127                 <echo>Updating plugin source ...</echo>
    128                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    129                                 <env key="LANG" value="C"/>
    130                                 <arg value="up"/>
    131                                 <arg value="."/>
    132                 </exec>
    133                 <echo>Updating ${plugin.jar} ...</echo>
    134                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    135                                 <env key="LANG" value="C"/>
    136                                 <arg value="up"/>
    137                                 <arg value="../dist/${plugin.jar}"/>
    138                 </exec>
    139             </target>
    140 
    141             <!--
     123    <target name="update-current">
     124        <echo>Updating plugin source ...</echo>
     125        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     126            <env key="LANG" value="C"/>
     127            <arg value="up"/>
     128            <arg value="."/>
     129        </exec>
     130        <echo>Updating ${plugin.jar} ...</echo>
     131        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     132            <env key="LANG" value="C"/>
     133            <arg value="up"/>
     134            <arg value="../dist/${plugin.jar}"/>
     135        </exec>
     136    </target>
     137    <!--
    142138             ** commits the plugin.jar
    143139             -->
    144             <target name="commit-dist">
    145                     <echo>
     140    <target name="commit-dist">
     141        <echo>
    146142    ***** Properties of published ${plugin.jar} *****
    147143    Commit message    : '${commit.message}'
     
    153149    Now commiting ${plugin.jar} ...
    154150    </echo>
    155                     <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    156                                     <env key="LANG" value="C"/>
    157                                     <arg value="-m '${commit.message}'"/>
    158                                     <arg value="commit"/>
    159                                     <arg value="${plugin.jar}"/>
    160                     </exec>
    161                </target>
    162 
    163             <target name="publish" depends="core-info,commit-current,update-current,clean,dist,commit-dist">
     151        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     152            <env key="LANG" value="C"/>
     153            <arg value="-m '${commit.message}'"/>
     154            <arg value="commit"/>
     155            <arg value="${plugin.jar}"/>
     156        </exec>
     157    </target>
     158    <target name="publish" depends="core-info,commit-current,update-current,clean,dist,commit-dist">
    164159            </target>
    165160</project>
  • applications/editors/josm/plugins/toms/build.xml

    r25144 r26174  
    1 <?xml version="1.0" encoding="UTF-8"?>
     1<?xml version="1.0" encoding="utf-8"?>
    22<!--
    33** This is a template build file for a JOSM  plugin.
     
    2929-->
    3030<project name="SeaMapEditor" default="dist" basedir=".">
    31 
    32         <!-- enter the SVN commit message -->
    33         <property name="commit.message" value="Bug fix release" />
    34         <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    35         <property name="plugin.main.version" value="3329" />
    36 
    37 
    38         <!--
     31    <!-- enter the SVN commit message -->
     32    <property name="commit.message" value="Bug fix release"/>
     33    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
     34    <property name="plugin.main.version" value="3329"/>
     35    <!--
    3936      ************************************************
    4037      ** should not be necessary to change the following properties
    4138     -->
    42         <property name="josm"                   location="../../core/dist/josm-custom.jar"/>
    43         <property name="plugin.build.dir"       value="build"/>
    44         <property name="plugin.src.dir"         value="src"/>
    45         <!-- this is the directory where the plugin jar is copied to -->
    46         <property name="plugin.dist.dir"        value="../../dist"/>
    47         <property name="ant.build.javac.target" value="1.5"/>
    48         <property name="plugin.dist.dir"        value="../../dist"/>
    49         <property name="plugin.jar"             value="${plugin.dist.dir}/${ant.project.name}.jar"/>
    50 
    51         <!--
     39    <property name="josm" location="../../core/dist/josm-custom.jar"/>
     40    <property name="plugin.build.dir" value="build"/>
     41    <property name="plugin.src.dir" value="src"/>
     42    <!-- this is the directory where the plugin jar is copied to -->
     43    <property name="plugin.dist.dir" value="../../dist"/>
     44    <property name="ant.build.javac.target" value="1.5"/>
     45    <property name="plugin.dist.dir" value="../../dist"/>
     46    <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/>
     47    <!--
    5248    **********************************************************
    5349    ** init - initializes the build
    5450    **********************************************************
    5551    -->
    56         <target name="init">
    57                 <mkdir dir="${plugin.build.dir}"/>
    58         </target>
    59 
    60         <!--
     52    <target name="init">
     53        <mkdir dir="${plugin.build.dir}"/>
     54    </target>
     55    <!--
    6156    **********************************************************
    6257    ** compile - complies the source tree
    6358    **********************************************************
    6459    -->
    65         <target name="compile" depends="init">
    66                 <echo message="compiling sources for  ${plugin.jar} ... "/>
    67                 <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}">
    68                         <compilerarg value="-Xlint:deprecation"/>
    69                         <compilerarg value="-Xlint:unchecked"/>
    70                 </javac>
    71         </target>
    72 
    73         <!--
     60    <target name="compile" depends="init">
     61        <echo message="compiling sources for  ${plugin.jar} ... "/>
     62        <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}">
     63            <compilerarg value="-Xlint:deprecation"/>
     64            <compilerarg value="-Xlint:unchecked"/>
     65        </javac>
     66    </target>
     67    <!--
    7468    **********************************************************
    7569    ** dist - creates the plugin jar
    7670    **********************************************************
    7771    -->
    78         <target name="dist" depends="compile,revision">
    79                 <echo message="creating ${ant.project.name}.jar ... "/>
    80 
     72    <target name="dist" depends="compile,revision">
     73        <echo message="creating ${ant.project.name}.jar ... "/>
    8174        <copy todir="${plugin.build.dir}/images">
    8275            <fileset dir="${plugin.src.dir}/images"/>
    8376        </copy>
    84 
    85                 <copy todir="${plugin.build.dir}/images">
    86                         <fileset dir="images"/>
    87                 </copy>
    88                 <copy todir="${plugin.build.dir}/toms/msg">
    89                         <fileset dir="${plugin.src.dir}/toms/msg"/>
    90                 </copy>
    91                 <copy todir="${plugin.build.dir}">
    92                         <fileset dir=".">
    93                 <include name="copyright.txt" />
    94                 <include name="LICENSE.txt" />
    95                         </fileset>
    96                 </copy>
    97                 <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
    98                         <!--
     77        <copy todir="${plugin.build.dir}/images">
     78            <fileset dir="images"/>
     79        </copy>
     80        <copy todir="${plugin.build.dir}/data">
     81            <fileset dir="data"/>
     82        </copy>
     83        <copy todir="${plugin.build.dir}/toms/msg">
     84            <fileset dir="${plugin.src.dir}/toms/msg"/>
     85        </copy>
     86        <copy todir="${plugin.build.dir}">
     87            <fileset dir=".">
     88                <include name="copyright.txt"/>
     89                <include name="LICENSE.txt"/>
     90            </fileset>
     91        </copy>
     92        <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
     93            <!--
    9994        ************************************************
    10095        ** configure these properties. Most of them will be copied to the plugins
     
    10499        ************************************************
    105100    -->
    106                         <manifest>
    107                                 <attribute name="Author" value="Werner, Malcolm"/>
    108                                 <attribute name="Plugin-Class" value="toms.Toms"/>
    109                                 <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
    110                                 <attribute name="Plugin-Description" value="Create and edit seamarks for OpenSeaMap"/>
    111                                 <attribute name="Plugin-Icon" value="images/Smp.png"/>
    112                                 <attribute name="Plugin-Link" value="http://openseamap.org/"/>
    113                                 <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
    114                                 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
    115                                 <attribute name="Class-Path" value="tplug/ifc.jar"/>
    116                         </manifest>
    117                 </jar>
    118         </target>
    119 
    120         <!--
     101            <manifest>
     102                <attribute name="Author" value="Werner, Malcolm"/>
     103                <attribute name="Plugin-Class" value="toms.Toms"/>
     104                <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
     105                <attribute name="Plugin-Description" value="Create and edit seamarks for OpenSeaMap"/>
     106                <attribute name="Plugin-Icon" value="images/Smp.png"/>
     107                <attribute name="Plugin-Link" value="http://openseamap.org/"/>
     108                <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
     109                <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
     110                <attribute name="Class-Path" value="tplug/ifc.jar"/>
     111            </manifest>
     112        </jar>
     113    </target>
     114    <!--
    121115    **********************************************************
    122116    ** revision - extracts the current revision number for the
     
    125119    **********************************************************
    126120    -->
    127         <target name="revision">
    128 
    129                 <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
    130                         <env key="LANG" value="C"/>
    131                         <arg value="info"/>
    132                         <arg value="--xml"/>
    133                         <arg value="."/>
    134                 </exec>
    135                 <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
    136                 <delete file="REVISION"/>
    137         </target>
    138 
    139         <!--
     121    <target name="revision">
     122        <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
     123            <env key="LANG" value="C"/>
     124            <arg value="info"/>
     125            <arg value="--xml"/>
     126            <arg value="."/>
     127        </exec>
     128        <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
     129        <delete file="REVISION"/>
     130    </target>
     131    <!--
    140132    **********************************************************
    141133    ** clean - clean up the build environment
    142134    **********************************************************
    143135    -->
    144         <target name="clean">
    145                 <delete dir="${plugin.build.dir}"/>
    146                 <delete file="${plugin.jar}"/>
    147         </target>
    148 
    149         <!--
     136    <target name="clean">
     137        <delete dir="${plugin.build.dir}"/>
     138        <delete file="${plugin.jar}"/>
     139    </target>
     140    <!--
    150141    **********************************************************
    151142    ** install - install the plugin in your local JOSM installation
    152143    **********************************************************
    153144    -->
    154         <target name="install" depends="dist">
    155                 <property environment="env"/>
    156                 <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
    157                         <and>
    158                                 <os family="windows"/>
    159                         </and>
    160                 </condition>
    161                 <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
    162         </target>
    163 
    164 
    165         <!--
    166         ************************** Publishing the plugin ***********************************
    167         -->
    168         <!--
    169                 ** extracts the JOSM release for the JOSM version in ../core and saves it in the
    170                 ** property ${coreversion.info.entry.revision}
    171                 **
    172                 -->
    173         <target name="core-info">
    174                 <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
    175                         <env key="LANG" value="C"/>
    176                         <arg value="info"/>
    177                         <arg value="--xml"/>
    178                         <arg value="../../core"/>
    179                 </exec>
    180                 <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
    181                 <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
    182                 <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
    183                 <delete file="core.info.xml" />
    184         </target>
    185 
    186         <!--
    187                 ** commits the source tree for this plugin
    188                 -->
    189         <target name="commit-current">
    190                 <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
    191                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    192                         <env key="LANG" value="C"/>
    193                         <arg value="commit"/>
    194                         <arg value="-m '${commit.message}'"/>
    195                         <arg value="."/>
    196                 </exec>
    197         </target>
    198 
    199         <!--
    200                 ** updates (svn up) the source tree for this plugin
    201                 -->
    202         <target name="update-current">
    203                 <echo>Updating plugin source ...</echo>
    204                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    205                         <env key="LANG" value="C"/>
    206                         <arg value="up"/>
    207                         <arg value="."/>
    208                 </exec>
    209                 <echo>Updating ${plugin.jar} ...</echo>
    210                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    211                         <env key="LANG" value="C"/>
    212                         <arg value="up"/>
    213                         <arg value="../dist/${plugin.jar}"/>
    214                 </exec>
    215         </target>
    216 
    217         <!--
    218                 ** commits the plugin.jar
    219                 -->
    220         <target name="commit-dist">
    221                 <echo>
    222         ***** Properties of published ${plugin.jar} *****
    223         Commit message    : '${commit.message}'                                 
    224         Plugin-Mainversion: ${plugin.main.version}
    225         JOSM build version: ${coreversion.info.entry.revision}
    226         Plugin-Version    : ${version.entry.commit.revision}
    227         ***** / Properties of published ${plugin.jar} *****                                     
    228                                                
    229         Now commiting ${plugin.jar} ...
    230         </echo>
    231                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    232                         <env key="LANG" value="C"/>
    233                         <arg value="-m '${commit.message}'"/>
    234                         <arg value="commit"/>
    235                         <arg value="${plugin.jar}"/>
    236                 </exec>
    237         </target>
    238 
    239         <!-- ** make sure svn is present as a command line tool ** -->
    240         <target name="ensure-svn-present">
    241                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
    242                         <env key="LANG" value="C" />
    243                         <arg value="--version" />
    244                 </exec>
    245                 <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
    246                         <!-- return code not set at all? Most likely svn isn't installed -->
    247                         <condition>
    248                                 <not>
    249                                         <isset property="svn.exit.code" />
    250                                 </not>
    251                         </condition>
    252                 </fail>
    253                 <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
    254                         <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
    255                         <condition>
    256                                 <isfailure code="${svn.exit.code}" />
    257                         </condition>
    258                 </fail>
    259         </target>
    260 
    261         <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
    262         </target>
     145    <target name="install" depends="dist">
     146        <property environment="env"/>
     147        <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
     148            <and>
     149                <os family="windows"/>
     150            </and>
     151        </condition>
     152        <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
     153    </target>
     154    <!--
     155    ************************** Publishing the plugin ***********************************
     156    -->
     157    <!--
     158        ** extracts the JOSM release for the JOSM version in ../core and saves it in the
     159        ** property ${coreversion.info.entry.revision}
     160        **
     161        -->
     162    <target name="core-info">
     163        <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
     164            <env key="LANG" value="C"/>
     165            <arg value="info"/>
     166            <arg value="--xml"/>
     167            <arg value="../../core"/>
     168        </exec>
     169        <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
     170        <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
     171        <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
     172        <delete file="core.info.xml"/>
     173    </target>
     174    <!--
     175        ** commits the source tree for this plugin
     176        -->
     177    <target name="commit-current">
     178        <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
     179        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     180            <env key="LANG" value="C"/>
     181            <arg value="commit"/>
     182            <arg value="-m '${commit.message}'"/>
     183            <arg value="."/>
     184        </exec>
     185    </target>
     186    <!--
     187        ** updates (svn up) the source tree for this plugin
     188        -->
     189    <target name="update-current">
     190        <echo>Updating plugin source ...</echo>
     191        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     192            <env key="LANG" value="C"/>
     193            <arg value="up"/>
     194            <arg value="."/>
     195        </exec>
     196        <echo>Updating ${plugin.jar} ...</echo>
     197        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     198            <env key="LANG" value="C"/>
     199            <arg value="up"/>
     200            <arg value="../dist/${plugin.jar}"/>
     201        </exec>
     202    </target>
     203    <!--
     204        ** commits the plugin.jar
     205        -->
     206    <target name="commit-dist">
     207        <echo>
     208    ***** Properties of published ${plugin.jar} *****
     209    Commit message    : '${commit.message}'                 
     210    Plugin-Mainversion: ${plugin.main.version}
     211    JOSM build version: ${coreversion.info.entry.revision}
     212    Plugin-Version    : ${version.entry.commit.revision}
     213    ***** / Properties of published ${plugin.jar} *****                 
     214                       
     215    Now commiting ${plugin.jar} ...
     216    </echo>
     217        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     218            <env key="LANG" value="C"/>
     219            <arg value="-m '${commit.message}'"/>
     220            <arg value="commit"/>
     221            <arg value="${plugin.jar}"/>
     222        </exec>
     223    </target>
     224    <!-- ** make sure svn is present as a command line tool ** -->
     225    <target name="ensure-svn-present">
     226        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
     227            <env key="LANG" value="C"/>
     228            <arg value="--version"/>
     229        </exec>
     230        <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
     231            <!-- return code not set at all? Most likely svn isn't installed -->
     232            <condition>
     233                <not>
     234                    <isset property="svn.exit.code"/>
     235                </not>
     236            </condition>
     237        </fail>
     238        <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
     239            <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
     240            <condition>
     241                <isfailure code="${svn.exit.code}"/>
     242            </condition>
     243        </fail>
     244    </target>
     245    <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
     246    </target>
    263247</project>
    264 
  • applications/editors/josm/plugins/touchscreenhelper/build.xml

    r25191 r26174  
    1 <?xml version="1.0" encoding="UTF-8"?>
     1<?xml version="1.0" encoding="utf-8"?>
    22<!--
    33** This is a template build file for a JOSM  plugin.
     
    2929-->
    3030<project name="touchscreenhelper" default="dist" basedir=".">
    31         <!-- enter the SVN commit message -->
    32         <property name="commit.message" value="Commit message" />
    33         <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    34         <property name="plugin.main.version" value="3835" />
    35 
    36         <property name="josm"                   location="../../core/dist/josm-custom.jar"/>
    37         <property name="plugin.build.dir"       value="build"/>
    38         <property name="plugin.src.dir"         value="src"/>
    39         <property name="plugin.dist.dir"        value="../../dist"/>
    40         <property name="ant.build.javac.target" value="1.5"/>
    41         <property name="plugin.dist.dir"        value="../../dist"/>
    42         <property name="plugin.jar"             value="${plugin.dist.dir}/${ant.project.name}.jar"/>
    43 
    44         <target name="init">
    45                 <mkdir dir="${plugin.build.dir}"/>
    46         </target>
    47 
    48         <target name="compile" depends="init">
    49                 <echo message="compiling sources for  ${plugin.jar} ... "/>
    50                 <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}">
    51                         <compilerarg value="-Xlint:deprecation"/>
    52                         <compilerarg value="-Xlint:unchecked"/>
    53                 </javac>
    54         </target>
    55 
    56         <target name="dist" depends="compile,revision">
    57                 <echo message="creating ${ant.project.name}.jar ... "/>
    58                 <copy todir="${plugin.build.dir}/resources">
    59                         <fileset dir="resources"/>
    60                 </copy>
    61                 <copy todir="${plugin.build.dir}/images">
    62                         <fileset dir="images"/>
    63                 </copy>
    64                 <copy todir="${plugin.build.dir}">
    65                         <fileset dir=".">
    66                                 <include name="README" />
    67                                 <include name="LICENSE" />
    68                         </fileset>
    69                 </copy>
    70                 <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
    71                 <manifest>
    72                         <attribute name="Author" value="glebius@glebius.int.ru"/>
    73                         <attribute name="Plugin-Class" value="touchscreenhelper.TouchScreenHelperPlugin"/>
    74                         <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
    75                         <attribute name="Plugin-Description" value="Provides helper buttons to allow working with single button mouse (stylus). Currently adds only one button to slip the map."/>
    76                         <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
    77                         <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
    78                 </manifest>
    79                 </jar>
    80         </target>
    81 
    82         <target name="revision">
    83 
    84                 <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
    85                         <env key="LANG" value="C"/>
    86                         <arg value="info"/>
    87                         <arg value="--xml"/>
    88                         <arg value="."/>
    89                 </exec>
    90                 <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
    91                 <delete file="REVISION"/>
    92         </target>
    93 
    94         <target name="clean">
    95                 <delete dir="${plugin.build.dir}"/>
    96                 <delete file="${plugin.jar}"/>
    97         </target>
    98 
    99         <target name="install" depends="dist">
    100                 <property environment="env"/>
    101                 <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
    102                         <and>
    103                                 <os family="windows"/>
    104                         </and>
    105                 </condition>
    106                 <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
    107         </target>
    108 
    109 
    110         <target name="core-info">
    111                 <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
    112                         <env key="LANG" value="C"/>
    113                         <arg value="info"/>
    114                         <arg value="--xml"/>
    115                         <arg value="../../core"/>
    116                 </exec>
    117                 <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
    118                 <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
    119                 <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
    120                 <delete file="core.info.xml" />
    121         </target>
    122 
    123         <target name="commit-current">
    124                 <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
    125                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    126                         <env key="LANG" value="C"/>
    127                         <arg value="commit"/>
    128                         <arg value="-m '${commit.message}'"/>
    129                         <arg value="."/>
    130                 </exec>
    131         </target>
    132 
    133         <target name="update-current">
    134                 <echo>Updating plugin source ...</echo>
    135                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    136                         <env key="LANG" value="C"/>
    137                         <arg value="up"/>
    138                         <arg value="."/>
    139                 </exec>
    140                 <echo>Updating ${plugin.jar} ...</echo>
    141                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    142                         <env key="LANG" value="C"/>
    143                         <arg value="up"/>
    144                         <arg value="../dist/${plugin.jar}"/>
    145                 </exec>
    146         </target>
    147 
    148         <target name="commit-dist">
    149                 <echo>
    150         ***** Properties of published ${plugin.jar} *****
    151         Commit message    : '${commit.message}'                                 
    152         Plugin-Mainversion: ${plugin.main.version}
    153         JOSM build version: ${coreversion.info.entry.revision}
    154         Plugin-Version    : ${version.entry.commit.revision}
    155         ***** / Properties of published ${plugin.jar} *****                                     
    156                                                
    157         Now commiting ${plugin.jar} ...
    158         </echo>
    159                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    160                         <env key="LANG" value="C"/>
    161                         <arg value="-m '${commit.message}'"/>
    162                         <arg value="commit"/>
    163                         <arg value="${plugin.jar}"/>
    164                 </exec>
    165         </target>
    166 
    167         <target name="ensure-svn-present">
    168                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
    169                         <env key="LANG" value="C" />
    170                         <arg value="--version" />
    171                 </exec>
    172                 <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
    173                         <!-- return code not set at all? Most likely svn isn't installed -->
    174                         <condition>
    175                                 <not>
    176                                         <isset property="svn.exit.code" />
    177                                 </not>
    178                         </condition>
    179                 </fail>
    180                 <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
    181                         <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
    182                         <condition>
    183                                 <isfailure code="${svn.exit.code}" />
    184                         </condition>
    185                 </fail>
    186         </target>
    187 
    188         <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
    189         </target>
     31    <!-- enter the SVN commit message -->
     32    <property name="commit.message" value="Commit message"/>
     33    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
     34    <property name="plugin.main.version" value="3835"/>
     35    <property name="josm" location="../../core/dist/josm-custom.jar"/>
     36    <property name="plugin.build.dir" value="build"/>
     37    <property name="plugin.src.dir" value="src"/>
     38    <property name="plugin.dist.dir" value="../../dist"/>
     39    <property name="ant.build.javac.target" value="1.5"/>
     40    <property name="plugin.dist.dir" value="../../dist"/>
     41    <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/>
     42    <target name="init">
     43        <mkdir dir="${plugin.build.dir}"/>
     44    </target>
     45    <target name="compile" depends="init">
     46        <echo message="compiling sources for  ${plugin.jar} ... "/>
     47        <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}">
     48            <compilerarg value="-Xlint:deprecation"/>
     49            <compilerarg value="-Xlint:unchecked"/>
     50        </javac>
     51    </target>
     52    <target name="dist" depends="compile,revision">
     53        <echo message="creating ${ant.project.name}.jar ... "/>
     54        <copy todir="${plugin.build.dir}/resources">
     55            <fileset dir="resources"/>
     56        </copy>
     57        <copy todir="${plugin.build.dir}/images">
     58            <fileset dir="images"/>
     59        </copy>
     60        <copy todir="${plugin.build.dir}/data">
     61            <fileset dir="data"/>
     62        </copy>
     63        <copy todir="${plugin.build.dir}">
     64            <fileset dir=".">
     65                <include name="README"/>
     66                <include name="LICENSE"/>
     67            </fileset>
     68        </copy>
     69        <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
     70            <manifest>
     71                <attribute name="Author" value="glebius@glebius.int.ru"/>
     72                <attribute name="Plugin-Class" value="touchscreenhelper.TouchScreenHelperPlugin"/>
     73                <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
     74                <attribute name="Plugin-Description" value="Provides helper buttons to allow working with single button mouse (stylus). Currently adds only one button to slip the map."/>
     75                <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
     76                <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
     77            </manifest>
     78        </jar>
     79    </target>
     80    <target name="revision">
     81        <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
     82            <env key="LANG" value="C"/>
     83            <arg value="info"/>
     84            <arg value="--xml"/>
     85            <arg value="."/>
     86        </exec>
     87        <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
     88        <delete file="REVISION"/>
     89    </target>
     90    <target name="clean">
     91        <delete dir="${plugin.build.dir}"/>
     92        <delete file="${plugin.jar}"/>
     93    </target>
     94    <target name="install" depends="dist">
     95        <property environment="env"/>
     96        <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
     97            <and>
     98                <os family="windows"/>
     99            </and>
     100        </condition>
     101        <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
     102    </target>
     103    <target name="core-info">
     104        <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
     105            <env key="LANG" value="C"/>
     106            <arg value="info"/>
     107            <arg value="--xml"/>
     108            <arg value="../../core"/>
     109        </exec>
     110        <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
     111        <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
     112        <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
     113        <delete file="core.info.xml"/>
     114    </target>
     115    <target name="commit-current">
     116        <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
     117        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     118            <env key="LANG" value="C"/>
     119            <arg value="commit"/>
     120            <arg value="-m '${commit.message}'"/>
     121            <arg value="."/>
     122        </exec>
     123    </target>
     124    <target name="update-current">
     125        <echo>Updating plugin source ...</echo>
     126        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     127            <env key="LANG" value="C"/>
     128            <arg value="up"/>
     129            <arg value="."/>
     130        </exec>
     131        <echo>Updating ${plugin.jar} ...</echo>
     132        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     133            <env key="LANG" value="C"/>
     134            <arg value="up"/>
     135            <arg value="../dist/${plugin.jar}"/>
     136        </exec>
     137    </target>
     138    <target name="commit-dist">
     139        <echo>
     140    ***** Properties of published ${plugin.jar} *****
     141    Commit message    : '${commit.message}'                 
     142    Plugin-Mainversion: ${plugin.main.version}
     143    JOSM build version: ${coreversion.info.entry.revision}
     144    Plugin-Version    : ${version.entry.commit.revision}
     145    ***** / Properties of published ${plugin.jar} *****                 
     146                       
     147    Now commiting ${plugin.jar} ...
     148    </echo>
     149        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     150            <env key="LANG" value="C"/>
     151            <arg value="-m '${commit.message}'"/>
     152            <arg value="commit"/>
     153            <arg value="${plugin.jar}"/>
     154        </exec>
     155    </target>
     156    <target name="ensure-svn-present">
     157        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
     158            <env key="LANG" value="C"/>
     159            <arg value="--version"/>
     160        </exec>
     161        <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
     162            <!-- return code not set at all? Most likely svn isn't installed -->
     163            <condition>
     164                <not>
     165                    <isset property="svn.exit.code"/>
     166                </not>
     167            </condition>
     168        </fail>
     169        <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
     170            <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
     171            <condition>
     172                <isfailure code="${svn.exit.code}"/>
     173            </condition>
     174        </fail>
     175    </target>
     176    <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
     177    </target>
    190178</project>
  • applications/editors/josm/plugins/tracer/build.xml

    r25191 r26174  
    1 <?xml version="1.0" encoding="UTF-8"?>
     1<?xml version="1.0" encoding="utf-8"?>
    22<!--
    33** This is a build file for a JOSM  plugin "Tracer".
     
    2929-->
    3030<project name="Tracer" default="dist" basedir=".">
    31 
    32         <!-- enter the SVN commit message -->
    33         <property name="commit.message" value="adapt to latest josm (getNodePairs changed)" />
    34         <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    35         <property name="plugin.main.version" value="3835" />
    36 
    37 
    38         <!--
     31    <!-- enter the SVN commit message -->
     32    <property name="commit.message" value="adapt to latest josm (getNodePairs changed)"/>
     33    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
     34    <property name="plugin.main.version" value="3835"/>
     35    <!--
    3936      ************************************************
    4037      ** should not be necessary to change the following properties
    4138     -->
    42         <property name="josm"                   location="../../core/dist/josm-custom.jar"/>
    43         <property name="plugin.build.dir"       value="build"/>
    44         <property name="plugin.src.dir"         value="src"/>
    45         <!-- this is the directory where the plugin jar is copied to -->
    46         <property name="plugin.dist.dir"        value="../../dist"/>
    47         <property name="ant.build.javac.target" value="1.5"/>
    48         <property name="plugin.dist.dir"        value="../../dist"/>
    49         <property name="plugin.jar"             value="${plugin.dist.dir}/${ant.project.name}.jar"/>
    50 
    51         <!--
     39    <property name="josm" location="../../core/dist/josm-custom.jar"/>
     40    <property name="plugin.build.dir" value="build"/>
     41    <property name="plugin.src.dir" value="src"/>
     42    <!-- this is the directory where the plugin jar is copied to -->
     43    <property name="plugin.dist.dir" value="../../dist"/>
     44    <property name="ant.build.javac.target" value="1.5"/>
     45    <property name="plugin.dist.dir" value="../../dist"/>
     46    <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/>
     47    <!--
    5248    **********************************************************
    5349    ** init - initializes the build
    5450    **********************************************************
    5551    -->
    56         <target name="init">
    57                 <mkdir dir="${plugin.build.dir}"/>
    58         </target>
    59 
    60         <!--
     52    <target name="init">
     53        <mkdir dir="${plugin.build.dir}"/>
     54    </target>
     55    <!--
    6156    **********************************************************
    6257    ** compile - complies the source tree
    6358    **********************************************************
    6459    -->
    65         <target name="compile" depends="init">
    66                 <echo message="compiling sources for  ${plugin.jar} ... "/>
    67                 <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}">
    68                         <compilerarg value="-Xlint:deprecation"/>
    69                         <compilerarg value="-Xlint:unchecked"/>
    70                 </javac>
    71         </target>
    72 
    73         <!--
     60    <target name="compile" depends="init">
     61        <echo message="compiling sources for  ${plugin.jar} ... "/>
     62        <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}">
     63            <compilerarg value="-Xlint:deprecation"/>
     64            <compilerarg value="-Xlint:unchecked"/>
     65        </javac>
     66    </target>
     67    <!--
    7468    **********************************************************
    7569    ** dist - creates the plugin jar
    7670    **********************************************************
    7771    -->
    78         <target name="dist" depends="compile,revision">
    79                 <echo message="creating ${ant.project.name}.jar ... "/>
    80                 <!--
    81                 <copy todir="${plugin.build.dir}/resources">
    82                         <fileset dir="resources"/>
    83                 </copy>
    84                 -->
    85                 <copy todir="${plugin.build.dir}/images">
    86                         <fileset dir="images"/>
    87                 </copy>
    88                 <copy todir="${plugin.build.dir}">
    89                         <fileset dir=".">
    90                                 <include name="README" />
    91                                 <include name="LICENSE" />
    92                         </fileset>
    93                 </copy>
    94                 <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
    95                         <!--
     72    <target name="dist" depends="compile,revision">
     73        <echo message="creating ${ant.project.name}.jar ... "/>
     74        <copy todir="${plugin.build.dir}/images">
     75            <fileset dir="images"/>
     76        </copy>
     77        <copy todir="${plugin.build.dir}/data">
     78            <fileset dir="data"/>
     79        </copy>
     80        <copy todir="${plugin.build.dir}">
     81            <fileset dir=".">
     82                <include name="README"/>
     83                <include name="LICENSE"/>
     84            </fileset>
     85        </copy>
     86        <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
     87        <!--
    9688        ************************************************
    9789        ** configure these properties. Most of them will be copied to the plugins
     
    10092        **
    10193        ************************************************
    102     -->
    103                         <manifest>
    104                                 <attribute name="Author" value="Jan Bilak, Petr Dlouhý" />
    105                                 <attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.tracer.TracerPlugin" />
    106                                 <attribute name="Plugin-Date" value="${version.entry.commit.date}" />
    107                                 <attribute name="Plugin-Description" value="Traces buildings from Czech cadastral map. Needs TracerServer (.NET or Mono) to be running." />
    108                                 <!-- <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/wiki/JOSM/Plugins/Tracer" /> -->
    109                                 <attribute name="Plugin-Mainversion" value="${plugin.main.version}" />
    110                                 <attribute name="Plugin-Version" value="${version.entry.commit.revision}" />
    111                         </manifest>
    112                 </jar>
    113         </target>
    114 
    115         <!--
     94        -->
     95            <manifest>
     96                <attribute name="Author" value="Jan Bilak, Petr Dlouhý"/>
     97                <attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.tracer.TracerPlugin"/>
     98                <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
     99                <attribute name="Plugin-Description" value="Traces buildings from Czech cadastral map. Needs TracerServer (.NET or Mono) to be running."/>
     100                <!-- <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/wiki/JOSM/Plugins/Tracer" /> -->
     101                <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
     102                <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
     103            </manifest>
     104        </jar>
     105    </target>
     106    <!--
    116107    **********************************************************
    117108    ** revision - extracts the current revision number for the
     
    120111    **********************************************************
    121112    -->
    122         <target name="revision">
     113    <target name="revision">
     114        <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
     115            <env key="LANG" value="C"/>
     116            <arg value="info"/>
     117            <arg value="--xml"/>
     118            <arg value="."/>
     119        </exec>
     120        <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
     121        <delete file="REVISION"/>
     122    </target>
     123    <!--
     124    **********************************************************
     125    ** clean - clean up the build environment
     126    **********************************************************
     127    -->
     128    <target name="clean">
     129        <delete dir="${plugin.build.dir}"/>
     130        <delete file="${plugin.jar}"/>
     131    </target>
     132    <!--
     133    **********************************************************
     134    ** install - install the plugin in your local JOSM installation
     135    **********************************************************
     136    -->
     137    <target name="install" depends="dist">
     138        <property environment="env"/>
     139        <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
     140            <and>
     141                <os family="windows"/>
     142            </and>
     143        </condition>
     144        <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
     145    </target>
     146    <!--
     147    ************************** Publishing the plugin ***********************************
     148    -->
     149    <!--
     150    ** extracts the JOSM release for the JOSM version in ../core and saves it in the
     151    ** property ${coreversion.info.entry.revision}
     152    -->
     153    <target name="core-info">
     154        <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
     155            <env key="LANG" value="C"/>
     156            <arg value="info"/>
     157            <arg value="--xml"/>
     158            <arg value="../../core"/>
     159        </exec>
     160        <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
     161        <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
     162        <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
     163        <delete file="core.info.xml"/>
     164    </target>
     165    <!--
     166        ** commits the source tree for this plugin
     167        -->
     168    <target name="commit-current">
     169        <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
     170        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     171            <env key="LANG" value="C"/>
     172            <arg value="commit"/>
     173            <arg value="-m '${commit.message}'"/>
     174            <arg value="."/>
     175        </exec>
     176    </target>
     177    <!--
     178        ** updates (svn up) the source tree for this plugin
     179        -->
     180    <target name="update-current">
     181        <echo>Updating plugin source ...</echo>
     182        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     183            <env key="LANG" value="C"/>
     184            <arg value="up"/>
     185            <arg value="."/>
     186        </exec>
     187        <echo>Updating ${plugin.jar} ...</echo>
     188        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     189            <env key="LANG" value="C"/>
     190            <arg value="up"/>
     191            <arg value="../dist/${plugin.jar}"/>
     192        </exec>
     193    </target>
     194    <!--
     195        ** commits the plugin.jar
     196        -->
     197    <target name="commit-dist">
     198        <echo>
     199    ***** Properties of published ${plugin.jar} *****
     200    Commit message    : '${commit.message}'
     201    Plugin-Mainversion: ${plugin.main.version}
     202    JOSM build version: ${coreversion.info.entry.revision}
     203    Plugin-Version    : ${version.entry.commit.revision}
     204    ***** / Properties of published ${plugin.jar} *****
    123205
    124                 <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
    125                         <env key="LANG" value="C"/>
    126                         <arg value="info"/>
    127                         <arg value="--xml"/>
    128                         <arg value="."/>
    129                 </exec>
    130                 <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
    131                 <delete file="REVISION"/>
    132         </target>
    133 
    134         <!--
    135     **********************************************************
    136     ** clean - clean up the build environment
    137     **********************************************************
    138     -->
    139         <target name="clean">
    140                 <delete dir="${plugin.build.dir}"/>
    141                 <delete file="${plugin.jar}"/>
    142         </target>
    143 
    144         <!--
    145     **********************************************************
    146     ** install - install the plugin in your local JOSM installation
    147     **********************************************************
    148     -->
    149         <target name="install" depends="dist">
    150                 <property environment="env"/>
    151                 <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
    152                         <and>
    153                                 <os family="windows"/>
    154                         </and>
    155                 </condition>
    156                 <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
    157         </target>
    158 
    159 
    160         <!--
    161         ************************** Publishing the plugin ***********************************
    162         -->
    163         <!--
    164                 ** extracts the JOSM release for the JOSM version in ../core and saves it in the
    165                 ** property ${coreversion.info.entry.revision}
    166                 **
    167                 -->
    168         <target name="core-info">
    169                 <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
    170                         <env key="LANG" value="C"/>
    171                         <arg value="info"/>
    172                         <arg value="--xml"/>
    173                         <arg value="../../core"/>
    174                 </exec>
    175                 <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
    176                 <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
    177                 <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
    178                 <delete file="core.info.xml" />
    179         </target>
    180 
    181         <!--
    182                 ** commits the source tree for this plugin
    183                 -->
    184         <target name="commit-current">
    185                 <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
    186                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    187                         <env key="LANG" value="C"/>
    188                         <arg value="commit"/>
    189                         <arg value="-m '${commit.message}'"/>
    190                         <arg value="."/>
    191                 </exec>
    192         </target>
    193 
    194         <!--
    195                 ** updates (svn up) the source tree for this plugin
    196                 -->
    197         <target name="update-current">
    198                 <echo>Updating plugin source ...</echo>
    199                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    200                         <env key="LANG" value="C"/>
    201                         <arg value="up"/>
    202                         <arg value="."/>
    203                 </exec>
    204                 <echo>Updating ${plugin.jar} ...</echo>
    205                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    206                         <env key="LANG" value="C"/>
    207                         <arg value="up"/>
    208                         <arg value="../dist/${plugin.jar}"/>
    209                 </exec>
    210         </target>
    211 
    212         <!--
    213                 ** commits the plugin.jar
    214                 -->
    215         <target name="commit-dist">
    216                 <echo>
    217         ***** Properties of published ${plugin.jar} *****
    218         Commit message    : '${commit.message}'
    219         Plugin-Mainversion: ${plugin.main.version}
    220         JOSM build version: ${coreversion.info.entry.revision}
    221         Plugin-Version    : ${version.entry.commit.revision}
    222         ***** / Properties of published ${plugin.jar} *****
    223 
    224         Now commiting ${plugin.jar} ...
    225         </echo>
    226                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    227                         <env key="LANG" value="C"/>
    228                         <arg value="-m '${commit.message}'"/>
    229                         <arg value="commit"/>
    230                         <arg value="${plugin.jar}"/>
    231                 </exec>
    232         </target>
    233 
    234         <!-- ** make sure svn is present as a command line tool ** -->
    235         <target name="ensure-svn-present">
    236                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
    237                         <env key="LANG" value="C" />
    238                         <arg value="--version" />
    239                 </exec>
    240                 <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
    241                         <!-- return code not set at all? Most likely svn isn't installed -->
    242                         <condition>
    243                                 <not>
    244                                         <isset property="svn.exit.code" />
    245                                 </not>
    246                         </condition>
    247                 </fail>
    248                 <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
    249                         <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
    250                         <condition>
    251                                 <isfailure code="${svn.exit.code}" />
    252                         </condition>
    253                 </fail>
    254         </target>
    255 
    256         <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
    257         </target>
     206    Now commiting ${plugin.jar} ...
     207    </echo>
     208        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     209            <env key="LANG" value="C"/>
     210            <arg value="-m '${commit.message}'"/>
     211            <arg value="commit"/>
     212            <arg value="${plugin.jar}"/>
     213        </exec>
     214    </target>
     215    <!-- ** make sure svn is present as a command line tool ** -->
     216    <target name="ensure-svn-present">
     217        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
     218            <env key="LANG" value="C"/>
     219            <arg value="--version"/>
     220        </exec>
     221        <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
     222            <!-- return code not set at all? Most likely svn isn't installed -->
     223            <condition>
     224                <not>
     225                    <isset property="svn.exit.code"/>
     226                </not>
     227            </condition>
     228        </fail>
     229        <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
     230            <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
     231            <condition>
     232                <isfailure code="${svn.exit.code}"/>
     233            </condition>
     234        </fail>
     235    </target>
     236    <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
     237    </target>
    258238</project>
  • applications/editors/josm/plugins/trustosm/build.xml

    r26056 r26174  
    1 <?xml version="1.0" encoding="UTF-8"?>
     1<?xml version="1.0" encoding="utf-8"?>
    22<!--
    33** This is a template build file for a JOSM  plugin.
     
    2929-->
    3030<project name="trustosm" default="dist" basedir=".">
    31 
    32         <!-- enter the SVN commit message -->
    33         <property name="commit.message" value="New plugin for digital signing osm data" />
    34         <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    35         <property name="plugin.main.version" value="3329" />
    36 
    37 
     31    <!-- enter the SVN commit message -->
     32    <property name="commit.message" value="New plugin for digital signing osm data"/>
     33    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
     34    <property name="plugin.main.version" value="3329"/>
    3835    <!--
    3936      ************************************************
    4037      ** should not be necessary to change the following properties
    4138     -->
    42         <property name="josm"                   location="../../core/dist/josm-custom.jar"/>
    43         <property name="plugin.build.dir"       value="build"/>
    44         <property name="plugin.src.dir"         value="src"/>
    45         <property name="plugin.lib.dir"         value="lib"/>
    46         <!-- this is the directory where the plugin jar is copied to -->
    47         <property name="plugin.dist.dir"        value="../../dist"/>
    48         <property name="ant.build.javac.target" value="1.6"/>
    49         <property name="plugin.dist.dir"        value="../../dist"/>
    50         <property name="plugin.jar"             value="${plugin.dist.dir}/${ant.project.name}.jar"/>
    51 
     39    <property name="josm" location="../../core/dist/josm-custom.jar"/>
     40    <property name="plugin.build.dir" value="build"/>
     41    <property name="plugin.src.dir" value="src"/>
     42    <property name="plugin.lib.dir" value="lib"/>
     43    <!-- this is the directory where the plugin jar is copied to -->
     44    <property name="plugin.dist.dir" value="../../dist"/>
     45    <property name="ant.build.javac.target" value="1.6"/>
     46    <property name="plugin.dist.dir" value="../../dist"/>
     47    <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/>
    5248    <!--
    5349    **********************************************************
     
    5854        <mkdir dir="${plugin.build.dir}"/>
    5955    </target>
    60 
    6156    <!--
    6257    **********************************************************
     
    6459    **********************************************************
    6560    -->
    66         <target name="compile" depends="init">
    67                 <echo message="compiling sources for  ${plugin.jar} ... "/>
    68                 <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}">
    69                         <compilerarg value="-Xlint:deprecation"/>
    70                         <compilerarg value="-Xlint:unchecked"/>
    71                         <classpath>
    72                                 <pathelement location="${josm}"/>
    73                                 <fileset dir="${plugin.lib.dir}">
    74                                         <include name="**/*.jar"/>
    75                                 </fileset>
    76                         </classpath>
    77                 </javac>
    78         </target>
    79 
    80        
    81         <!-- create a property containing all .jar files, prefix lib/, and seperated with a space -->
    82           <pathconvert property="libs.project" pathsep=" ">
    83             <mapper>
    84               <chainedmapper>
    85 
    86                 <!-- remove absolute path -->
    87                 <flattenmapper />
    88 
    89                 <!-- add lib/ prefix -->
    90                 <globmapper from="*" to="${ant.project.name}/lib/*" />
    91               </chainedmapper>
    92             </mapper>
    93 
    94             <path>
    95 
    96               <!-- plugin.lib.dir contains all jar files -->
    97               <fileset dir="${plugin.lib.dir}">
    98                 <include name="**/*.jar" />
    99               </fileset>
    100             </path>
    101           </pathconvert>
    102 
    103        
    104         <!--
     61    <target name="compile" depends="init">
     62        <echo message="compiling sources for  ${plugin.jar} ... "/>
     63        <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}">
     64            <compilerarg value="-Xlint:deprecation"/>
     65            <compilerarg value="-Xlint:unchecked"/>
     66            <classpath>
     67                <pathelement location="${josm}"/>
     68                <fileset dir="${plugin.lib.dir}">
     69                    <include name="**/*.jar"/>
     70                </fileset>
     71            </classpath>
     72        </javac>
     73    </target>
     74    <!-- create a property containing all .jar files, prefix lib/, and seperated with a space -->
     75    <pathconvert property="libs.project" pathsep=" ">
     76        <mapper>
     77            <chainedmapper>
     78                <!-- remove absolute path -->
     79                <flattenmapper/>
     80                <!-- add lib/ prefix -->
     81                <globmapper from="*" to="${ant.project.name}/lib/*"/>
     82            </chainedmapper>
     83        </mapper>
     84        <path>
     85            <!-- plugin.lib.dir contains all jar files -->
     86            <fileset dir="${plugin.lib.dir}">
     87                <include name="**/*.jar"/>
     88            </fileset>
     89        </path>
     90    </pathconvert>
     91    <!--
    10592    **********************************************************
    10693    ** dist - creates the plugin jar
    10794    **********************************************************
    10895    -->
    109         <target name="dist" depends="compile,revision">
    110                 <echo message="creating ${ant.project.name}.jar ... "/>
    111                 <copy todir="${plugin.build.dir}/lib">
    112                         <fileset dir="${plugin.lib.dir}"/>
    113                 </copy>
    114                 <copy todir="${plugin.build.dir}/resources">
    115                         <fileset dir="resources"/>
    116                 </copy>
    117                 <copy todir="${plugin.build.dir}/images">
    118                         <fileset dir="images"/>
    119                 </copy>
    120                 <copy todir="${plugin.build.dir}">
    121                         <fileset dir=".">
    122                                 <include name="README" />
    123                                 <include name="LICENSE" />
    124                         </fileset>
    125                 </copy>
    126                 <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
    127                         <!--
     96    <target name="dist" depends="compile,revision">
     97        <echo message="creating ${ant.project.name}.jar ... "/>
     98        <copy todir="${plugin.build.dir}/lib">
     99            <fileset dir="${plugin.lib.dir}"/>
     100        </copy>
     101        <copy todir="${plugin.build.dir}/resources">
     102            <fileset dir="resources"/>
     103        </copy>
     104        <copy todir="${plugin.build.dir}/images">
     105            <fileset dir="images"/>
     106        </copy>
     107        <copy todir="${plugin.build.dir}/data">
     108            <fileset dir="data"/>
     109        </copy>
     110        <copy todir="${plugin.build.dir}">
     111            <fileset dir=".">
     112                <include name="README"/>
     113                <include name="LICENSE"/>
     114            </fileset>
     115        </copy>
     116        <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
     117            <!--
    128118        ************************************************
    129119        ** configure these properties. Most of them will be copied to the plugins
     
    133123        ************************************************
    134124    -->
    135                         <manifest>
    136                                 <attribute name="Author" value="Christoph Wagner"/>
    137                                 <attribute name="Class-Path" value="${libs.project}" />
    138                                 <attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.trustosm.TrustOSMplugin"/>
    139                                 <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
    140                                 <attribute name="Plugin-Description" value="Plugin to digital sign OSM-Data"/>
    141                                 <attribute name="Plugin-Icon" value="trustosm"/>
    142                                 <attribute name="Plugin-Link" value="..."/>
    143                                 <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
    144                                 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
    145                         </manifest>
    146                 </jar>
    147         </target>
    148 
     125            <manifest>
     126                <attribute name="Author" value="Christoph Wagner"/>
     127                <attribute name="Class-Path" value="${libs.project}"/>
     128                <attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.trustosm.TrustOSMplugin"/>
     129                <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
     130                <attribute name="Plugin-Description" value="Plugin to digital sign OSM-Data"/>
     131                <attribute name="Plugin-Icon" value="trustosm"/>
     132                <attribute name="Plugin-Link" value="..."/>
     133                <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
     134                <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
     135            </manifest>
     136        </jar>
     137    </target>
    149138    <!--
    150139    **********************************************************
     
    155144    -->
    156145    <target name="revision">
    157 
    158146        <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
    159147            <env key="LANG" value="C"/>
     
    165153        <delete file="REVISION"/>
    166154    </target>
    167 
    168155    <!--
    169156    **********************************************************
     
    175162        <delete file="${plugin.jar}"/>
    176163    </target>
    177 
    178164    <!--
    179165    **********************************************************
     
    190176        <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
    191177    </target>
    192 
    193 
    194178    <!--
    195179    ************************** Publishing the plugin ***********************************
     
    210194        <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
    211195        <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
    212         <delete file="core.info.xml" />
    213     </target>
    214 
     196        <delete file="core.info.xml"/>
     197    </target>
    215198    <!--
    216199        ** commits the source tree for this plugin
     
    225208        </exec>
    226209    </target>
    227 
    228210    <!--
    229211        ** updates (svn up) the source tree for this plugin
     
    243225        </exec>
    244226    </target>
    245 
    246227    <!--
    247228        ** commits the plugin.jar
     
    265246        </exec>
    266247    </target>
    267 
    268248    <!-- ** make sure svn is present as a command line tool ** -->
    269249    <target name="ensure-svn-present">
    270250        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
    271             <env key="LANG" value="C" />
    272             <arg value="--version" />
     251            <env key="LANG" value="C"/>
     252            <arg value="--version"/>
    273253        </exec>
    274254        <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
     
    276256            <condition>
    277257                <not>
    278                     <isset property="svn.exit.code" />
     258                    <isset property="svn.exit.code"/>
    279259                </not>
    280260            </condition>
     
    283263            <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
    284264            <condition>
    285                 <isfailure code="${svn.exit.code}" />
     265                <isfailure code="${svn.exit.code}"/>
    286266            </condition>
    287267        </fail>
    288268    </target>
    289 
    290269    <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
    291270    </target>
  • applications/editors/josm/plugins/turnlanes

    • Property svn:ignore set to
      build
  • applications/editors/josm/plugins/turnlanes/build.xml

    r26154 r26174  
    1 <?xml version="1.0" encoding="UTF-8"?>
     1<?xml version="1.0" encoding="utf-8"?>
    22<!--
    33** This is a template build file for a JOSM  plugin.
     
    2929-->
    3030<project name="turnlanes" default="dist" basedir=".">
    31 
    32         <!-- enter the SVN commit message -->
    33         <property name="commit.message" value="Commit message" />
    34         <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    35         <property name="plugin.main.version" value="4126" />
    36 
    37         <!--
     31    <!-- enter the SVN commit message -->
     32    <property name="commit.message" value="Commit message"/>
     33    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
     34    <property name="plugin.main.version" value="4126"/>
     35    <!--
    3836      ************************************************
    3937      ** should not be necessary to change the following properties
    4038     -->
    41         <property name="josm" location="../../core/dist/josm-custom.jar" />
    42         <property name="plugin.build.dir" value="build" />
    43         <property name="plugin.src.dir" value="src" />
    44         <!-- this is the directory where the plugin jar is copied to -->
    45         <property name="plugin.dist.dir" value="../../dist" />
    46         <property name="ant.build.javac.target" value="1.5" />
    47         <property name="plugin.dist.dir" value="../../dist" />
    48         <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar" />
    49 
    50         <!--
     39    <property name="josm" location="../../core/dist/josm-custom.jar"/>
     40    <property name="plugin.build.dir" value="build"/>
     41    <property name="plugin.src.dir" value="src"/>
     42    <!-- this is the directory where the plugin jar is copied to -->
     43    <property name="plugin.dist.dir" value="../../dist"/>
     44    <property name="ant.build.javac.target" value="1.5"/>
     45    <property name="plugin.dist.dir" value="../../dist"/>
     46    <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/>
     47    <!--
    5148    **********************************************************
    5249    ** init - initializes the build
    5350    **********************************************************
    5451    -->
    55         <target name="init">
    56                 <mkdir dir="${plugin.build.dir}" />
    57         </target>
    58 
    59         <!--
     52    <target name="init">
     53        <mkdir dir="${plugin.build.dir}"/>
     54    </target>
     55    <!--
    6056    **********************************************************
    6157    ** compile - complies the source tree
    6258    **********************************************************
    6359    -->
    64         <target name="compile" depends="init">
    65                 <echo message="compiling sources for  ${plugin.jar} ... " />
    66                 <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}">
    67                         <compilerarg value="-Xlint:deprecation" />
    68                         <compilerarg value="-Xlint:unchecked" />
    69                 </javac>
    70         </target>
    71 
    72         <!--
     60    <target name="compile" depends="init">
     61        <echo message="compiling sources for  ${plugin.jar} ... "/>
     62        <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}">
     63            <compilerarg value="-Xlint:deprecation"/>
     64            <compilerarg value="-Xlint:unchecked"/>
     65        </javac>
     66    </target>
     67    <!--
    7368    **********************************************************
    7469    ** dist - creates the plugin jar
    7570    **********************************************************
    7671    -->
    77         <target name="dist" depends="compile,revision">
    78                 <echo message="creating ${ant.project.name}.jar ... " />
    79                 <copy todir="${plugin.build.dir}/resources">
    80                         <fileset dir="resources" />
    81                 </copy>
    82                 <copy todir="${plugin.build.dir}/images">
    83                         <fileset dir="images" />
    84                 </copy>
    85                 <copy todir="${plugin.build.dir}">
    86                         <fileset dir=".">
    87                                 <include name="README" />
    88                                 <include name="LICENSE" />
    89                         </fileset>
    90                 </copy>
    91                 <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
    92                         <!--
     72    <target name="dist" depends="compile,revision">
     73        <echo message="creating ${ant.project.name}.jar ... "/>
     74        <copy todir="${plugin.build.dir}/resources">
     75            <fileset dir="resources"/>
     76        </copy>
     77        <copy todir="${plugin.build.dir}/images">
     78            <fileset dir="images"/>
     79        </copy>
     80        <copy todir="${plugin.build.dir}/data">
     81            <fileset dir="data"/>
     82        </copy>
     83        <copy todir="${plugin.build.dir}">
     84            <fileset dir=".">
     85                <include name="README"/>
     86                <include name="LICENSE"/>
     87            </fileset>
     88        </copy>
     89        <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
     90            <!--
    9391        ************************************************
    9492        ** configure these properties. Most of them will be copied to the plugins
     
    9896        ************************************************
    9997    -->
    100                         <manifest>
    101                                 <attribute name="Author" value="Benjamin Schulz" />
    102                                 <attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.turnlanes.TurnLanesPlugin" />
    103                                 <attribute name="Plugin-Date" value="2011-03-17" />
    104                                 <attribute name="Plugin-Description" value="Provides a straightforward GUI for adding, editing and deleting turn lanes." />
    105                                 <!--<attribute name="Plugin-Icon" value="..." />-->
    106                                 <!--<attribute name="Plugin-Link" value="..." />-->
    107                                 <attribute name="Plugin-Mainversion" value="${plugin.main.version}" />
    108                                 <attribute name="Plugin-Version" value="${version.entry.commit.revision}" />
    109                         </manifest>
    110                 </jar>
    111         </target>
    112 
    113         <!--
     98            <manifest>
     99                <attribute name="Author" value="Benjamin Schulz"/>
     100                <attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.turnlanes.TurnLanesPlugin"/>
     101                <attribute name="Plugin-Date" value="2011-03-17"/>
     102                <attribute name="Plugin-Description" value="Provides a straightforward GUI for adding, editing and deleting turn lanes."/>
     103                <!--<attribute name="Plugin-Icon" value="..." />-->
     104                <!--<attribute name="Plugin-Link" value="..." />-->
     105                <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
     106                <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
     107            </manifest>
     108        </jar>
     109    </target>
     110    <!--
    114111    **********************************************************
    115112    ** revision - extracts the current revision number for the
     
    118115    **********************************************************
    119116    -->
    120         <target name="revision">
    121 
    122                 <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
    123                         <env key="LANG" value="C" />
    124                         <arg value="info" />
    125                         <arg value="--xml" />
    126                         <arg value="." />
    127                 </exec>
    128                 <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true" />
    129                 <delete file="REVISION" />
    130         </target>
    131 
    132         <!--
     117    <target name="revision">
     118        <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
     119            <env key="LANG" value="C"/>
     120            <arg value="info"/>
     121            <arg value="--xml"/>
     122            <arg value="."/>
     123        </exec>
     124        <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
     125        <delete file="REVISION"/>
     126    </target>
     127    <!--
    133128    **********************************************************
    134129    ** clean - clean up the build environment
    135130    **********************************************************
    136131    -->
    137         <target name="clean">
    138                 <delete dir="${plugin.build.dir}" />
    139                 <delete file="${plugin.jar}" />
    140         </target>
    141 
    142         <!--
     132    <target name="clean">
     133        <delete dir="${plugin.build.dir}"/>
     134        <delete file="${plugin.jar}"/>
     135    </target>
     136    <!--
    143137    **********************************************************
    144138    ** install - install the plugin in your local JOSM installation
    145139    **********************************************************
    146140    -->
    147         <target name="install" depends="dist">
    148                 <property environment="env" />
    149                 <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
    150                         <and>
    151                                 <os family="windows" />
    152                         </and>
    153                 </condition>
    154                 <copy file="${plugin.jar}" todir="${josm.plugins.dir}" />
    155         </target>
    156 
    157 
    158         <!--
     141    <target name="install" depends="dist">
     142        <property environment="env"/>
     143        <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
     144            <and>
     145                <os family="windows"/>
     146            </and>
     147        </condition>
     148        <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
     149    </target>
     150    <!--
    159151    ************************** Publishing the plugin ***********************************
    160152    -->
    161         <!--
     153    <!--
    162154        ** extracts the JOSM release for the JOSM version in ../core and saves it in the
    163155        ** property ${coreversion.info.entry.revision}
    164156        **
    165157        -->
    166         <target name="core-info">
    167                 <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
    168                         <env key="LANG" value="C" />
    169                         <arg value="info" />
    170                         <arg value="--xml" />
    171                         <arg value="../../core" />
    172                 </exec>
    173                 <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true" />
    174                 <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
    175                 <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
    176                 <delete file="core.info.xml" />
    177         </target>
    178 
    179         <!--
     158    <target name="core-info">
     159        <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
     160            <env key="LANG" value="C"/>
     161            <arg value="info"/>
     162            <arg value="--xml"/>
     163            <arg value="../../core"/>
     164        </exec>
     165        <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
     166        <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
     167        <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
     168        <delete file="core.info.xml"/>
     169    </target>
     170    <!--
    180171        ** commits the source tree for this plugin
    181172        -->
    182         <target name="commit-current">
    183                 <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
    184                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    185                         <env key="LANG" value="C" />
    186                         <arg value="commit" />
    187                         <arg value="-m '${commit.message}'" />
    188                         <arg value="." />
    189                 </exec>
    190         </target>
    191 
    192         <!--
     173    <target name="commit-current">
     174        <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
     175        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     176            <env key="LANG" value="C"/>
     177            <arg value="commit"/>
     178            <arg value="-m '${commit.message}'"/>
     179            <arg value="."/>
     180        </exec>
     181    </target>
     182    <!--
    193183        ** updates (svn up) the source tree for this plugin
    194184        -->
    195         <target name="update-current">
    196                 <echo>Updating plugin source ...</echo>
    197                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    198                         <env key="LANG" value="C" />
    199                         <arg value="up" />
    200                         <arg value="." />
    201                 </exec>
    202                 <echo>Updating ${plugin.jar} ...</echo>
    203                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    204                         <env key="LANG" value="C" />
    205                         <arg value="up" />
    206                         <arg value="../dist/${plugin.jar}" />
    207                 </exec>
    208         </target>
    209 
    210         <!--
     185    <target name="update-current">
     186        <echo>Updating plugin source ...</echo>
     187        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     188            <env key="LANG" value="C"/>
     189            <arg value="up"/>
     190            <arg value="."/>
     191        </exec>
     192        <echo>Updating ${plugin.jar} ...</echo>
     193        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     194            <env key="LANG" value="C"/>
     195            <arg value="up"/>
     196            <arg value="../dist/${plugin.jar}"/>
     197        </exec>
     198    </target>
     199    <!--
    211200        ** commits the plugin.jar
    212201        -->
    213         <target name="commit-dist">
    214                 <echo>
     202    <target name="commit-dist">
     203        <echo>
    215204    ***** Properties of published ${plugin.jar} *****
    216205    Commit message    : '${commit.message}'                   
     
    222211    Now commiting ${plugin.jar} ...
    223212    </echo>
    224                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    225                         <env key="LANG" value="C" />
    226                         <arg value="-m '${commit.message}'" />
    227                         <arg value="commit" />
    228                         <arg value="${plugin.jar}" />
    229                 </exec>
    230         </target>
    231 
    232         <!-- ** make sure svn is present as a command line tool ** -->
    233         <target name="ensure-svn-present">
    234                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
    235                         <env key="LANG" value="C" />
    236                         <arg value="--version" />
    237                 </exec>
    238                 <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
    239                         <!-- return code not set at all? Most likely svn isn't installed -->
    240                         <condition>
    241                                 <not>
    242                                         <isset property="svn.exit.code" />
    243                                 </not>
    244                         </condition>
    245                 </fail>
    246                 <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
    247                         <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
    248                         <condition>
    249                                 <isfailure code="${svn.exit.code}" />
    250                         </condition>
    251                 </fail>
    252         </target>
    253 
    254         <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
    255         </target>
     213        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     214            <env key="LANG" value="C"/>
     215            <arg value="-m '${commit.message}'"/>
     216            <arg value="commit"/>
     217            <arg value="${plugin.jar}"/>
     218        </exec>
     219    </target>
     220    <!-- ** make sure svn is present as a command line tool ** -->
     221    <target name="ensure-svn-present">
     222        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
     223            <env key="LANG" value="C"/>
     224            <arg value="--version"/>
     225        </exec>
     226        <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
     227            <!-- return code not set at all? Most likely svn isn't installed -->
     228            <condition>
     229                <not>
     230                    <isset property="svn.exit.code"/>
     231                </not>
     232            </condition>
     233        </fail>
     234        <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
     235            <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
     236            <condition>
     237                <isfailure code="${svn.exit.code}"/>
     238            </condition>
     239        </fail>
     240    </target>
     241    <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
     242    </target>
    256243</project>
  • applications/editors/josm/plugins/turnrestrictions/build.xml

    r26079 r26174  
    1 <?xml version="1.0" encoding="UTF-8"?>
     1<?xml version="1.0" encoding="utf-8"?>
    22<!--
    33** This is the build file for the turnrestrictions plugin
     
    2929-->
    3030<project name="turnrestrictions" default="dist" basedir=".">
    31 
    32         <!-- enter the SVN commit message -->
    33         <property name="commit.message" value="Adapt to JOSM core change (DefaultNameFormatter)" />
    34         <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    35         <property name="plugin.main.version" value="4100" />
    36 
    37         <!--
     31    <!-- enter the SVN commit message -->
     32    <property name="commit.message" value="Adapt to JOSM core change (DefaultNameFormatter)"/>
     33    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
     34    <property name="plugin.main.version" value="4100"/>
     35    <!--
    3836      ************************************************
    3937      ** should not be necessary to change the following properties
    4038     -->
    41         <property name="josm" location="../../core/dist/josm-custom.jar" />
    42         <property name="plugin.build.dir" value="build" />
    43         <property name="plugin.src.dir" value="src" />
    44         <!-- this is the directory where the plugin jar is copied to -->
    45         <property name="plugin.dist.dir" value="dist" />
    46         <property name="ant.build.javac.target" value="1.6" />
    47         <property name="plugin.jar" value="../../dist/${ant.project.name}.jar" />
    48         <property name="test.build.dir" value="test/build" />
    49         <!--
     39    <property name="josm" location="../../core/dist/josm-custom.jar"/>
     40    <property name="plugin.build.dir" value="build"/>
     41    <property name="plugin.src.dir" value="src"/>
     42    <!-- this is the directory where the plugin jar is copied to -->
     43    <property name="plugin.dist.dir" value="dist"/>
     44    <property name="ant.build.javac.target" value="1.6"/>
     45    <property name="plugin.jar" value="../../dist/${ant.project.name}.jar"/>
     46    <property name="test.build.dir" value="test/build"/>
     47    <!--
    5048    **********************************************************
    5149    ** init - initializes the build
    5250    **********************************************************
    5351    -->
    54         <target name="init">
    55                 <mkdir dir="${plugin.build.dir}" />
    56                 <mkdir dir="${test.build.dir}" />
    57         </target>
    58 
    59         <!--
     52    <target name="init">
     53        <mkdir dir="${plugin.build.dir}"/>
     54        <mkdir dir="${test.build.dir}"/>
     55    </target>
     56    <!--
    6057    **********************************************************
    6158    ** compile - complies the source tree
    6259    **********************************************************
    6360    -->
    64         <target name="compile" depends="init">
    65                 <echo message="compiling sources for  ${plugin.jar} ... " />
    66                 <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}">
    67                         <compilerarg value="-Xlint:deprecation" />
    68                         <compilerarg value="-Xlint:unchecked" />
    69                 </javac>
    70         </target>
    71 
    72         <!--
     61    <target name="compile" depends="init">
     62        <echo message="compiling sources for  ${plugin.jar} ... "/>
     63        <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}">
     64            <compilerarg value="-Xlint:deprecation"/>
     65            <compilerarg value="-Xlint:unchecked"/>
     66        </javac>
     67    </target>
     68    <!--
    7369    **********************************************************
    7470    ** dist - creates the plugin jar
    7571    **********************************************************
    7672    -->
    77         <target name="dist" depends="compile,revision">
    78                 <echo message="creating ${ant.project.name}.jar ... " />
    79                 <copy todir="${plugin.build.dir}/resources">
    80                         <fileset dir="resources" />
    81                 </copy>
    82                 <copy todir="${plugin.build.dir}/images">
    83                         <fileset dir="images" />
    84                 </copy>
    85                 <copy todir="${plugin.build.dir}">
    86                         <fileset dir=".">
    87                                 <include name="README" />
    88                                 <include name="LICENSE" />
    89                         </fileset>
    90                 </copy>
    91                 <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
    92                         <!--
     73    <target name="dist" depends="compile,revision">
     74        <echo message="creating ${ant.project.name}.jar ... "/>
     75        <copy todir="${plugin.build.dir}/resources">
     76            <fileset dir="resources"/>
     77        </copy>
     78        <copy todir="${plugin.build.dir}/images">
     79            <fileset dir="images"/>
     80        </copy>
     81        <copy todir="${plugin.build.dir}/data">
     82            <fileset dir="data"/>
     83        </copy>
     84        <copy todir="${plugin.build.dir}">
     85            <fileset dir=".">
     86                <include name="README"/>
     87                <include name="LICENSE"/>
     88            </fileset>
     89        </copy>
     90        <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
     91            <!--
    9392        ************************************************
    9493        ** configure these properties. Most of them will be copied to the plugins
     
    9897        ************************************************
    9998    -->
    100                         <manifest>
    101                                 <attribute name="Author" value="Karl Guggisberg" />
    102                                 <attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.turnrestrictions.TurnRestrictionsPlugin" />
    103                                 <attribute name="Plugin-Date" value="${version.entry.commit.date}" />
    104                                 <attribute name="Plugin-Description" value="The turnrestrictions plugin allows to enter maintain information about turn restrictions in the OpenStreetMap database." />
    105                                 <attribute name="Plugin-Icon" value="images/preferences/turnrestrictions.png" />
    106                                 <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/wiki/JOSM/Plugins/turnrestrictions" />
    107                                 <attribute name="Plugin-Mainversion" value="${plugin.main.version}" />
    108                                 <attribute name="Plugin-Version" value="${version.entry.commit.revision}" />
    109                         </manifest>
    110                 </jar>
    111         </target>
    112 
    113         <!--
     99            <manifest>
     100                <attribute name="Author" value="Karl Guggisberg"/>
     101                <attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.turnrestrictions.TurnRestrictionsPlugin"/>
     102                <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
     103                <attribute name="Plugin-Description" value="The turnrestrictions plugin allows to enter maintain information about turn restrictions in the OpenStreetMap database."/>
     104                <attribute name="Plugin-Icon" value="images/preferences/turnrestrictions.png"/>
     105                <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/wiki/JOSM/Plugins/turnrestrictions"/>
     106                <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
     107                <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
     108            </manifest>
     109        </jar>
     110    </target>
     111    <!--
    114112    **********************************************************
    115113    ** revision - extracts the current revision number for the
     
    118116    **********************************************************
    119117    -->
    120         <target name="revision">
     118    <target name="revision">
     119        <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
     120            <env key="LANG" value="C"/>
     121            <arg value="info"/>
     122            <arg value="--xml"/>
     123            <arg value="."/>
     124        </exec>
     125        <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
     126        <delete file="REVISION"/>
     127    </target>
     128    <!--
     129    **********************************************************
     130    ** clean - clean up the build environment
     131    **********************************************************
     132    -->
     133    <target name="clean">
     134        <delete dir="${plugin.build.dir}"/>
     135        <delete file="${plugin.jar}"/>
     136    </target>
     137    <!--
     138    **********************************************************
     139    ** install - install the plugin in your local JOSM installation
     140    **********************************************************
     141    -->
     142    <target name="install" depends="dist">
     143        <property environment="env"/>
     144        <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
     145            <and>
     146                <os family="windows"/>
     147            </and>
     148        </condition>
     149        <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
     150    </target>
     151    <!--
     152    ************************** Publishing the plugin ***********************************
     153    -->
     154    <!--
     155        ** extracts the JOSM release for the JOSM version in ../core and saves it in the
     156        ** property ${coreversion.info.entry.revision}
     157        **
     158        -->
     159    <target name="core-info">
     160        <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
     161            <env key="LANG" value="C"/>
     162            <arg value="info"/>
     163            <arg value="--xml"/>
     164            <arg value="../../core"/>
     165        </exec>
     166        <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
     167        <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
     168        <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
     169        <delete file="core.info.xml"/>
     170    </target>
     171    <!--
     172        ** commits the source tree for this plugin
     173        -->
     174    <target name="commit-current">
     175        <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
     176        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     177            <env key="LANG" value="C"/>
     178            <arg value="commit"/>
     179            <arg value="-m '${commit.message}'"/>
     180            <arg value="."/>
     181        </exec>
     182    </target>
     183    <!--
     184        ** updates (svn up) the source tree for this plugin
     185        -->
     186    <target name="update-current">
     187        <echo>Updating plugin source ...</echo>
     188        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     189            <env key="LANG" value="C"/>
     190            <arg value="up"/>
     191            <arg value="."/>
     192        </exec>
     193        <echo>Updating ${plugin.jar} ...</echo>
     194        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     195            <env key="LANG" value="C"/>
     196            <arg value="up"/>
     197            <arg value="../dist/${plugin.jar}"/>
     198        </exec>
     199    </target>
     200    <!--
     201        ** commits the plugin.jar
     202        -->
     203    <target name="commit-dist">
     204        <echo>
     205    ***** Properties of published ${plugin.jar} *****
     206    Commit message    : '${commit.message}'
     207    Plugin-Mainversion: ${plugin.main.version}
     208    JOSM build version: ${coreversion.info.entry.revision}
     209    Plugin-Version    : ${version.entry.commit.revision}
     210    ***** / Properties of published ${plugin.jar} *****
    121211
    122                 <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
    123                         <env key="LANG" value="C" />
    124                         <arg value="info" />
    125                         <arg value="--xml" />
    126                         <arg value="." />
    127                 </exec>
    128                 <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true" />
    129                 <delete file="REVISION" />
    130         </target>
    131 
    132         <!--
    133     **********************************************************
    134     ** clean - clean up the build environment
    135     **********************************************************
    136     -->
    137         <target name="clean">
    138                 <delete dir="${plugin.build.dir}" />
    139                 <delete file="${plugin.jar}" />
    140         </target>
    141 
    142         <!--
    143     **********************************************************
    144     ** install - install the plugin in your local JOSM installation
    145     **********************************************************
    146     -->
    147         <target name="install" depends="dist">
    148                 <property environment="env" />
    149                 <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
    150                         <and>
    151                                 <os family="windows" />
    152                         </and>
    153                 </condition>
    154                 <copy file="${plugin.jar}" todir="${josm.plugins.dir}" />
    155         </target>
    156 
    157         <!--
    158         ************************** Publishing the plugin ***********************************
    159         -->
    160         <!--
    161                 ** extracts the JOSM release for the JOSM version in ../core and saves it in the
    162                 ** property ${coreversion.info.entry.revision}
    163                 **
    164                 -->
    165         <target name="core-info">
    166                 <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
    167                         <env key="LANG" value="C" />
    168                         <arg value="info" />
    169                         <arg value="--xml" />
    170                         <arg value="../../core" />
    171                 </exec>
    172                 <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true" />
    173                 <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
    174                 <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
    175                 <delete file="core.info.xml" />
    176         </target>
    177 
    178         <!--
    179                 ** commits the source tree for this plugin
    180                 -->
    181         <target name="commit-current">
    182                 <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
    183                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    184                         <env key="LANG" value="C" />
    185                         <arg value="commit" />
    186                         <arg value="-m '${commit.message}'" />
    187                         <arg value="." />
    188                 </exec>
    189         </target>
    190 
    191         <!--
    192                 ** updates (svn up) the source tree for this plugin
    193                 -->
    194         <target name="update-current">
    195                 <echo>Updating plugin source ...</echo>
    196                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    197                         <env key="LANG" value="C" />
    198                         <arg value="up" />
    199                         <arg value="." />
    200                 </exec>
    201                 <echo>Updating ${plugin.jar} ...</echo>
    202                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    203                         <env key="LANG" value="C" />
    204                         <arg value="up" />
    205                         <arg value="../dist/${plugin.jar}" />
    206                 </exec>
    207         </target>
    208 
    209         <!--
    210                 ** commits the plugin.jar
    211                 -->
    212         <target name="commit-dist">
    213                 <echo>
    214         ***** Properties of published ${plugin.jar} *****
    215         Commit message    : '${commit.message}'
    216         Plugin-Mainversion: ${plugin.main.version}
    217         JOSM build version: ${coreversion.info.entry.revision}
    218         Plugin-Version    : ${version.entry.commit.revision}
    219         ***** / Properties of published ${plugin.jar} *****
    220 
    221         Now commiting ${plugin.jar} ...
    222         </echo>
    223                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    224                         <env key="LANG" value="C" />
    225                         <arg value="-m '${commit.message}'" />
    226                         <arg value="commit" />
    227                         <arg value="${plugin.jar}" />
    228                 </exec>
    229         </target>
    230 
    231         <!-- ** make sure svn is present as a command line tool ** -->
    232         <target name="ensure-svn-present">
    233                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
    234                         <env key="LANG" value="C" />
    235                         <arg value="--version" />
    236                 </exec>
    237                 <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
    238                         <!-- return code not set at all? Most likely svn isn't installed -->
    239                         <condition>
    240                                 <not>
    241                                         <isset property="svn.exit.code" />
    242                                 </not>
    243                         </condition>
    244                 </fail>
    245                 <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
    246                         <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
    247                         <condition>
    248                                 <isfailure code="${svn.exit.code}" />
    249                         </condition>
    250                 </fail>
    251         </target>
    252 
    253         <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
    254         </target>
    255 
    256 
    257         <!-- ************************************************************************************ -->
    258         <!-- * Targets for compiling and running tests                                            -->
    259         <!-- ************************************************************************************ -->
    260         <property name="eclipse.plugin.dir" value="C:\software\eclipse-3.6.1\plugins" />
    261 
    262         <path id="groovy.path">
    263                 <pathelement location="${eclipse.plugin.dir}/org.codehaus.groovy_1.7.5.xx-20100926-2000-e36-RC1\lib\groovy-all-1.7.5.jar" />
    264         </path>
    265 
    266         <path id="junit.path">
    267                 <pathelement location="${eclipse.plugin.dir}/org.junit_4.8.1.v4_8_1_v20100427-1100\junit.jar" />
    268         </path>
    269        
    270         <path id="fest.library.path">
    271                 <fileset dir="test/lib">
    272                         <include name="fest-*.jar" />
    273                         <include name="jcp-*.jar" />
    274                 </fileset>
    275     </path>
    276 
    277         <path id="test.class.path">
    278                 <pathelement location="${josm}" />
    279                 <pathelement location="${plugin.build.dir}" />
    280                 <path refid="groovy.path" />
    281                 <path refid="junit.path" />
    282                 <path refid="fest.library.path" />
    283         </path>
    284 
    285         <path id="groovyc.path">
    286                 <path refid="junit.path" />
    287                 <path refid="groovy.path" />
    288                 <path refid="fest.library.path" />
    289                 <pathelement location="${josm}" />
    290                 <pathelement location="${test.build.dir}" />
    291                 <pathelement location="${plugin.build.dir}" />
    292                 <!-- if we didn't explicitly put hamcrest on the class path, groovyc would
    293                      abort and report it is missing a hamcrest class -->
    294                 <pathelement location="test/lib/hamcrest-all-1.2.jar" />
    295         </path>
    296 
    297         <target name="test-clean">
    298                 <delete dir="${test.build.dir}" />
    299                 <mkdir dir="${test.build.dir}" />
    300         </target>
    301 
    302         <target name="test-compile" depends="compile,test-clean" description="Compiles the test files">
    303 
    304                 <taskdef name="groovyc" classname="org.codehaus.groovy.ant.Groovyc" classpathref="groovy.path" />
    305 
    306                 <echo message="compiling test infrastructor for ${plugin.jar} ... " />
    307                 <javac srcdir="test/src" classpathref="test.class.path" debug="true" destdir="${test.build.dir}" includes="org/openstreetmap/josm/plugins/turnrestrictions/fixtures/**/*">
    308                         <compilerarg value="-Xlint:deprecation" />
    309                         <compilerarg value="-Xlint:unchecked" />
    310                 </javac>
    311 
    312                 <echo message="compiling groovy test cases for ${plugin.jar} ... " />
    313                 <groovyc srcdir="test/src" destdir="${test.build.dir}" classpathref="groovyc.path">
    314                 </groovyc>
    315 
    316                 <echo message="compiling java test cases for ${plugin.jar} ... " />
    317                 <javac srcdir="test/src" classpathref="test.class.path" debug="true" destdir="${test.build.dir}">
    318                         <compilerarg value="-Xlint:deprecation" />
    319                         <compilerarg value="-Xlint:unchecked" />
    320                 </javac>
    321         </target>
    322 
    323         <target name="test-run" depends="test-compile" description="Runs the junit tests">
    324                 <delete dir="test/output" />
    325                 <mkdir dir="test/output" />
    326 
    327                 <junit printsummary="true" failureproperty="junit.failure">
    328                         <classpath>
    329                                 <path refid="groovyc.path" />
    330                                 <pathelement location="test/config" />
    331                                 <!-- required for test config file -->
    332                                 <pathelement location="." />
    333                                 <!-- required to load images from subdir 'images/' -->
    334                         </classpath>
    335 
    336                         <test todir="test/output" name='org.openstreetmap.josm.plugins.turnrestrictions.AllUnitTests'>
    337                                 <formatter type="xml" />
    338                         </test>
    339                 </junit>
    340         </target>
     212    Now commiting ${plugin.jar} ...
     213    </echo>
     214        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     215            <env key="LANG" value="C"/>
     216            <arg value="-m '${commit.message}'"/>
     217            <arg value="commit"/>
     218            <arg value="${plugin.jar}"/>
     219        </exec>
     220    </target>
     221    <!-- ** make sure svn is present as a command line tool ** -->
     222    <target name="ensure-svn-present">
     223        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
     224            <env key="LANG" value="C"/>
     225            <arg value="--version"/>
     226        </exec>
     227        <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
     228            <!-- return code not set at all? Most likely svn isn't installed -->
     229            <condition>
     230                <not>
     231                    <isset property="svn.exit.code"/>
     232                </not>
     233            </condition>
     234        </fail>
     235        <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
     236            <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
     237            <condition>
     238                <isfailure code="${svn.exit.code}"/>
     239            </condition>
     240        </fail>
     241    </target>
     242    <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
     243    </target>
     244    <!-- ************************************************************************************ -->
     245    <!-- * Targets for compiling and running tests                                            -->
     246    <!-- ************************************************************************************ -->
     247    <property name="eclipse.plugin.dir" value="C:\software\eclipse-3.6.1\plugins"/>
     248    <path id="groovy.path">
     249        <pathelement location="${eclipse.plugin.dir}/org.codehaus.groovy_1.7.5.xx-20100926-2000-e36-RC1\lib\groovy-all-1.7.5.jar"/>
     250    </path>
     251    <path id="junit.path">
     252        <pathelement location="${eclipse.plugin.dir}/org.junit_4.8.1.v4_8_1_v20100427-1100\junit.jar"/>
     253    </path>
     254    <path id="fest.library.path">
     255        <fileset dir="test/lib">
     256            <include name="fest-*.jar"/>
     257            <include name="jcp-*.jar"/>
     258        </fileset>
     259    </path>
     260    <path id="test.class.path">
     261        <pathelement location="${josm}"/>
     262        <pathelement location="${plugin.build.dir}"/>
     263        <path refid="groovy.path"/>
     264        <path refid="junit.path"/>
     265        <path refid="fest.library.path"/>
     266    </path>
     267    <path id="groovyc.path">
     268        <path refid="junit.path"/>
     269        <path refid="groovy.path"/>
     270        <path refid="fest.library.path"/>
     271        <pathelement location="${josm}"/>
     272        <pathelement location="${test.build.dir}"/>
     273        <pathelement location="${plugin.build.dir}"/>
     274        <!-- if we didn't explicitly put hamcrest on the class path, groovyc would
     275             abort and report it is missing a hamcrest class -->
     276        <pathelement location="test/lib/hamcrest-all-1.2.jar"/>
     277    </path>
     278    <target name="test-clean">
     279        <delete dir="${test.build.dir}"/>
     280        <mkdir dir="${test.build.dir}"/>
     281    </target>
     282    <target name="test-compile" depends="compile,test-clean" description="Compiles the test files">
     283        <taskdef name="groovyc" classname="org.codehaus.groovy.ant.Groovyc" classpathref="groovy.path"/>
     284        <echo message="compiling test infrastructor for ${plugin.jar} ... "/>
     285        <javac srcdir="test/src" classpathref="test.class.path" debug="true" destdir="${test.build.dir}" includes="org/openstreetmap/josm/plugins/turnrestrictions/fixtures/**/*">
     286            <compilerarg value="-Xlint:deprecation"/>
     287            <compilerarg value="-Xlint:unchecked"/>
     288        </javac>
     289        <echo message="compiling groovy test cases for ${plugin.jar} ... "/>
     290        <groovyc srcdir="test/src" destdir="${test.build.dir}" classpathref="groovyc.path">
     291        </groovyc>
     292        <echo message="compiling java test cases for ${plugin.jar} ... "/>
     293        <javac srcdir="test/src" classpathref="test.class.path" debug="true" destdir="${test.build.dir}">
     294            <compilerarg value="-Xlint:deprecation"/>
     295            <compilerarg value="-Xlint:unchecked"/>
     296        </javac>
     297    </target>
     298    <target name="test-run" depends="test-compile" description="Runs the junit tests">
     299        <delete dir="test/output"/>
     300        <mkdir dir="test/output"/>
     301        <junit printsummary="true" failureproperty="junit.failure">
     302            <classpath>
     303                <path refid="groovyc.path"/>
     304                <pathelement location="test/config"/>
     305                <!-- required for test config file -->
     306                <pathelement location="."/>
     307                <!-- required to load images from subdir 'images/' -->
     308            </classpath>
     309            <test todir="test/output" name="org.openstreetmap.josm.plugins.turnrestrictions.AllUnitTests">
     310                <formatter type="xml"/>
     311            </test>
     312        </junit>
     313    </target>
    341314</project>
  • applications/editors/josm/plugins/undelete/build.xml

    r26073 r26174  
    1 <?xml version="1.0" encoding="UTF-8"?>
     1<?xml version="1.0" encoding="utf-8"?>
    22<!--
    33** This is a template build file for a JOSM  plugin.
     
    2929-->
    3030<project name="undelete" default="dist" basedir=".">
    31 
    32         <!-- enter the SVN commit message -->
    33         <property name="commit.message" value="adapt to core changes (backwards compatible)" />
    34         <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    35         <property name="plugin.main.version" value="3835" />
    36 
    37         <!--
     31    <!-- enter the SVN commit message -->
     32    <property name="commit.message" value="adapt to core changes (backwards compatible)"/>
     33    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
     34    <property name="plugin.main.version" value="3835"/>
     35    <!--
    3836      ************************************************
    3937      ** should not be necessary to change the following properties
    4038     -->
    41         <property name="josm"                   location="../../core/dist/josm-custom.jar"/>
    42         <property name="plugin.build.dir"       value="build"/>
    43         <property name="plugin.src.dir"         value="src"/>
    44         <!-- this is the directory where the plugin jar is copied to -->
    45         <property name="plugin.dist.dir"        value="../../dist"/>
    46         <property name="ant.build.javac.target" value="1.5"/>
    47         <property name="plugin.dist.dir"        value="../../dist"/>
    48         <property name="plugin.jar"             value="${plugin.dist.dir}/${ant.project.name}.jar"/>
    49 
    50         <!--
     39    <property name="josm" location="../../core/dist/josm-custom.jar"/>
     40    <property name="plugin.build.dir" value="build"/>
     41    <property name="plugin.src.dir" value="src"/>
     42    <!-- this is the directory where the plugin jar is copied to -->
     43    <property name="plugin.dist.dir" value="../../dist"/>
     44    <property name="ant.build.javac.target" value="1.5"/>
     45    <property name="plugin.dist.dir" value="../../dist"/>
     46    <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/>
     47    <!--
    5148    **********************************************************
    5249    ** init - initializes the build
    5350    **********************************************************
    5451    -->
    55         <target name="init">
    56                 <mkdir dir="${plugin.build.dir}"/>
    57         </target>
    58 
    59         <!--
     52    <target name="init">
     53        <mkdir dir="${plugin.build.dir}"/>
     54    </target>
     55    <!--
    6056    **********************************************************
    6157    ** compile - complies the source tree
    6258    **********************************************************
    6359    -->
    64         <target name="compile" depends="init">
    65                 <echo message="compiling sources for  ${plugin.jar} ... "/>
    66                 <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}">
    67                         <compilerarg value="-Xlint:deprecation"/>
    68                         <compilerarg value="-Xlint:unchecked"/>
    69                 </javac>
    70         </target>
    71 
    72         <!--
     60    <target name="compile" depends="init">
     61        <echo message="compiling sources for  ${plugin.jar} ... "/>
     62        <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}">
     63            <compilerarg value="-Xlint:deprecation"/>
     64            <compilerarg value="-Xlint:unchecked"/>
     65        </javac>
     66    </target>
     67    <!--
    7368    **********************************************************
    7469    ** dist - creates the plugin jar
    7570    **********************************************************
    7671    -->
    77         <target name="dist" depends="compile,revision">
    78                 <echo message="creating ${plugin.jar.name} ... "/>
    79                 <copy todir="${plugin.build.dir}/images">
    80                         <fileset dir="images"/>
    81                 </copy>
    82                 <copy todir="${plugin.build.dir}">
    83                         <fileset dir=".">
    84                                 <include name="README" />
    85                                 <include name="LICENSE" />
    86                         </fileset>
    87                 </copy>
    88                 <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
    89                         <!--
     72    <target name="dist" depends="compile,revision">
     73        <echo message="creating ${plugin.jar.name} ... "/>
     74        <copy todir="${plugin.build.dir}/images">
     75            <fileset dir="images"/>
     76        </copy>
     77        <copy todir="${plugin.build.dir}/data">
     78            <fileset dir="data"/>
     79        </copy>
     80        <copy todir="${plugin.build.dir}">
     81            <fileset dir=".">
     82                <include name="README"/>
     83                <include name="LICENSE"/>
     84            </fileset>
     85        </copy>
     86        <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
     87            <!--
    9088        ************************************************
    9189        ** configure these properties. Most of them will be copied to the plugins
     
    9593        ************************************************
    9694    -->
    97                         <manifest>
    98                                 <attribute name="Author" value="Nakor"/>
    99                                 <attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.undelete.Undelete"/>
    100                                 <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
    101                                 <attribute name="Plugin-Description" value="Allows undeleting object from OSM database"/>
    102                                 <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/wiki/JOSM/Plugins/Undelete"/>
    103                                 <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
    104                                 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
    105                         </manifest>
    106                 </jar>
    107         </target>
    108 
    109         <!--
     95            <manifest>
     96                <attribute name="Author" value="Nakor"/>
     97                <attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.undelete.Undelete"/>
     98                <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
     99                <attribute name="Plugin-Description" value="Allows undeleting object from OSM database"/>
     100                <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/wiki/JOSM/Plugins/Undelete"/>
     101                <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
     102                <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
     103            </manifest>
     104        </jar>
     105    </target>
     106    <!--
    110107    **********************************************************
    111108    ** revision - extracts the current revision number for the
     
    114111    **********************************************************
    115112    -->
    116         <target name="revision">
    117 
    118                 <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
    119                         <env key="LANG" value="C"/>
    120                         <arg value="info"/>
    121                         <arg value="--xml"/>
    122                         <arg value="."/>
    123                 </exec>
    124                 <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
    125                 <delete file="REVISION"/>
    126         </target>
    127 
    128         <!--
     113    <target name="revision">
     114        <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
     115            <env key="LANG" value="C"/>
     116            <arg value="info"/>
     117            <arg value="--xml"/>
     118            <arg value="."/>
     119        </exec>
     120        <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
     121        <delete file="REVISION"/>
     122    </target>
     123    <!--
    129124    **********************************************************
    130125    ** clean - clean up the build environment
    131126    **********************************************************
    132127    -->
    133         <target name="clean">
    134                 <delete dir="${plugin.build.dir}"/>
    135                 <delete file="${plugin.jar}"/>
    136         </target>
    137 
    138         <!--
     128    <target name="clean">
     129        <delete dir="${plugin.build.dir}"/>
     130        <delete file="${plugin.jar}"/>
     131    </target>
     132    <!--
    139133    **********************************************************
    140134    ** install - install the plugin in your local JOSM installation
    141135    **********************************************************
    142136    -->
    143         <target name="install" depends="dist">
    144                 <property environment="env"/>
    145                 <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
    146                         <and>
    147                                 <os family="windows"/>
    148                         </and>
    149                 </condition>
    150                 <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
    151         </target>
    152 
    153         <!--
    154         ************************** Publishing the plugin ***********************************
    155         -->
    156         <!--
    157                 ** extracts the JOSM release for the JOSM version in ../core and saves it in the
    158                 ** property ${coreversion.info.entry.revision}
    159                 **
    160                 -->
    161         <target name="core-info">
    162                 <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
    163                         <env key="LANG" value="C"/>
    164                         <arg value="info"/>
    165                         <arg value="--xml"/>
    166                         <arg value="../../core"/>
    167                 </exec>
    168                 <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
    169                 <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
    170                 <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
    171                 <delete file="core.info.xml" />
    172         </target>
    173 
    174         <!--
    175                 ** commits the source tree for this plugin
    176                 -->
    177         <target name="commit-current">
    178                 <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
    179                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    180                         <env key="LANG" value="C"/>
    181                         <arg value="commit"/>
    182                         <arg value="-m '${commit.message}'"/>
    183                         <arg value="."/>
    184                 </exec>
    185         </target>
    186 
    187         <!--
    188                 ** updates (svn up) the source tree for this plugin
    189                 -->
    190         <target name="update-current">
    191                 <echo>Updating plugin source ...</echo>
    192                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    193                         <env key="LANG" value="C"/>
    194                         <arg value="up"/>
    195                         <arg value="."/>
    196                 </exec>
    197                 <echo>Updating ${plugin.jar} ...</echo>
    198                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    199                         <env key="LANG" value="C"/>
    200                         <arg value="up"/>
    201                         <arg value="../dist/${plugin.jar}"/>
    202                 </exec>
    203         </target>
    204 
    205         <!--
    206                 ** commits the plugin.jar
    207                 -->
    208         <target name="commit-dist">
    209                 <echo>
    210         ***** Properties of published ${plugin.jar} *****
    211         Commit message    : '${commit.message}'                                 
    212         Plugin-Mainversion: ${plugin.main.version}
    213         JOSM build version: ${coreversion.info.entry.revision}
    214         Plugin-Version    : ${version.entry.commit.revision}
    215         ***** / Properties of published ${plugin.jar} *****                                     
    216                                                
    217         Now commiting ${plugin.jar} ...
    218         </echo>
    219                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    220                         <env key="LANG" value="C"/>
    221                         <arg value="-m '${commit.message}'"/>
    222                         <arg value="commit"/>
    223                         <arg value="${plugin.jar}"/>
    224                 </exec>
    225         </target>
    226 
    227         <!-- ** make sure svn is present as a command line tool ** -->
    228         <target name="ensure-svn-present">
    229                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
    230                         <env key="LANG" value="C" />
    231                         <arg value="--version" />
    232                 </exec>
    233                 <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
    234                         <!-- return code not set at all? Most likely svn isn't installed -->
    235                         <condition>
    236                                 <not>
    237                                         <isset property="svn.exit.code" />
    238                                 </not>
    239                         </condition>
    240                 </fail>
    241                 <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
    242                         <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
    243                         <condition>
    244                                 <isfailure code="${svn.exit.code}" />
    245                         </condition>
    246                 </fail>
    247         </target>
    248 
    249         <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
    250         </target>
     137    <target name="install" depends="dist">
     138        <property environment="env"/>
     139        <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
     140            <and>
     141                <os family="windows"/>
     142            </and>
     143        </condition>
     144        <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
     145    </target>
     146    <!--
     147    ************************** Publishing the plugin ***********************************
     148    -->
     149    <!--
     150        ** extracts the JOSM release for the JOSM version in ../core and saves it in the
     151        ** property ${coreversion.info.entry.revision}
     152        **
     153        -->
     154    <target name="core-info">
     155        <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
     156            <env key="LANG" value="C"/>
     157            <arg value="info"/>
     158            <arg value="--xml"/>
     159            <arg value="../../core"/>
     160        </exec>
     161        <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
     162        <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
     163        <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
     164        <delete file="core.info.xml"/>
     165    </target>
     166    <!--
     167        ** commits the source tree for this plugin
     168        -->
     169    <target name="commit-current">
     170        <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
     171        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     172            <env key="LANG" value="C"/>
     173            <arg value="commit"/>
     174            <arg value="-m '${commit.message}'"/>
     175            <arg value="."/>
     176        </exec>
     177    </target>
     178    <!--
     179        ** updates (svn up) the source tree for this plugin
     180        -->
     181    <target name="update-current">
     182        <echo>Updating plugin source ...</echo>
     183        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     184            <env key="LANG" value="C"/>
     185            <arg value="up"/>
     186            <arg value="."/>
     187        </exec>
     188        <echo>Updating ${plugin.jar} ...</echo>
     189        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     190            <env key="LANG" value="C"/>
     191            <arg value="up"/>
     192            <arg value="../dist/${plugin.jar}"/>
     193        </exec>
     194    </target>
     195    <!--
     196        ** commits the plugin.jar
     197        -->
     198    <target name="commit-dist">
     199        <echo>
     200    ***** Properties of published ${plugin.jar} *****
     201    Commit message    : '${commit.message}'                 
     202    Plugin-Mainversion: ${plugin.main.version}
     203    JOSM build version: ${coreversion.info.entry.revision}
     204    Plugin-Version    : ${version.entry.commit.revision}
     205    ***** / Properties of published ${plugin.jar} *****                 
     206                       
     207    Now commiting ${plugin.jar} ...
     208    </echo>
     209        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     210            <env key="LANG" value="C"/>
     211            <arg value="-m '${commit.message}'"/>
     212            <arg value="commit"/>
     213            <arg value="${plugin.jar}"/>
     214        </exec>
     215    </target>
     216    <!-- ** make sure svn is present as a command line tool ** -->
     217    <target name="ensure-svn-present">
     218        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
     219            <env key="LANG" value="C"/>
     220            <arg value="--version"/>
     221        </exec>
     222        <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
     223            <!-- return code not set at all? Most likely svn isn't installed -->
     224            <condition>
     225                <not>
     226                    <isset property="svn.exit.code"/>
     227                </not>
     228            </condition>
     229        </fail>
     230        <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
     231            <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
     232            <condition>
     233                <isfailure code="${svn.exit.code}"/>
     234            </condition>
     235        </fail>
     236    </target>
     237    <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
     238    </target>
    251239</project>
  • applications/editors/josm/plugins/utilsplugin2/build.xml

    r25913 r26174  
    1 <?xml version="1.0" encoding="UTF-8"?>
     1<?xml version="1.0" encoding="utf-8"?>
    22<!--
    33** This is a template build file for a JOSM  plugin.
     
    2929-->
    3030<project name="utilsplugin2" default="dist" basedir=".">
    31 
    3231    <!-- enter the SVN commit message -->
    33     <property name="commit.message" value="extend selection" />
     32    <property name="commit.message" value="extend selection"/>
    3433    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    35     <property name="plugin.main.version" value="4064" />
    36 
    37 
     34    <property name="plugin.main.version" value="4064"/>
    3835    <!--
    3936      ************************************************
    4037      ** should not be necessary to change the following properties
    4138     -->
    42     <property name="josm"                   location="../../core/dist/josm-custom.jar"/>
    43     <property name="plugin.build.dir"       value="build"/>
    44     <property name="plugin.src.dir"         value="src"/>
     39    <property name="josm" location="../../core/dist/josm-custom.jar"/>
     40    <property name="plugin.build.dir" value="build"/>
     41    <property name="plugin.src.dir" value="src"/>
    4542    <!-- this is the directory where the plugin jar is copied to -->
    46     <property name="plugin.dist.dir"        value="../../dist"/>
     43    <property name="plugin.dist.dir" value="../../dist"/>
    4744    <property name="ant.build.javac.target" value="1.5"/>
    48     <property name="plugin.dist.dir"        value="../../dist"/>
    49     <property name="plugin.jar"             value="${plugin.dist.dir}/${ant.project.name}.jar"/>
    50 
     45    <property name="plugin.dist.dir" value="../../dist"/>
     46    <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/>
    5147    <!--
    5248    **********************************************************
     
    5753        <mkdir dir="${plugin.build.dir}"/>
    5854    </target>
    59 
    6055    <!--
    6156    **********************************************************
     
    7065        </javac>
    7166    </target>
    72 
    7367    <!--
    7468    **********************************************************
     
    8175            <fileset dir="images"/>
    8276        </copy>
     77        <copy todir="${plugin.build.dir}/data">
     78            <fileset dir="data"/>
     79        </copy>
    8380        <copy todir="${plugin.build.dir}">
    8481            <fileset dir=".">
    85                 <include name="README" />
    86                 <include name="LICENSE" />
    87                 <include name="GPL-v2.0.txt" />
    88                 <include name="GPL-v3.0.txt" />
     82                <include name="README"/>
     83                <include name="LICENSE"/>
     84                <include name="GPL-v2.0.txt"/>
     85                <include name="GPL-v3.0.txt"/>
    8986            </fileset>
    9087        </copy>
     
    110107        </jar>
    111108    </target>
    112 
    113109    <!--
    114110    **********************************************************
     
    119115    -->
    120116    <target name="revision">
    121 
    122117        <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
    123118            <env key="LANG" value="C"/>
     
    129124        <delete file="REVISION"/>
    130125    </target>
    131 
    132126    <!--
    133127    **********************************************************
     
    139133        <delete file="${plugin.jar}"/>
    140134    </target>
    141 
    142135    <!--
    143136    **********************************************************
     
    154147        <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
    155148    </target>
    156 
    157 
    158149    <!--
    159150    ************************** Publishing the plugin ***********************************
     
    174165        <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
    175166        <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
    176         <delete file="core.info.xml" />
    177     </target>
    178 
     167        <delete file="core.info.xml"/>
     168    </target>
    179169    <!--
    180170        ** commits the source tree for this plugin
     
    189179        </exec>
    190180    </target>
    191 
    192181    <!--
    193182        ** updates (svn up) the source tree for this plugin
     
    207196        </exec>
    208197    </target>
    209 
    210198    <!--
    211199        ** commits the plugin.jar
     
    229217        </exec>
    230218    </target>
    231 
    232219    <!-- ** make sure svn is present as a command line tool ** -->
    233220    <target name="ensure-svn-present">
    234221        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
    235             <env key="LANG" value="C" />
    236             <arg value="--version" />
     222            <env key="LANG" value="C"/>
     223            <arg value="--version"/>
    237224        </exec>
    238225        <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
     
    240227            <condition>
    241228                <not>
    242                     <isset property="svn.exit.code" />
     229                    <isset property="svn.exit.code"/>
    243230                </not>
    244231            </condition>
     
    247234            <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
    248235            <condition>
    249                 <isfailure code="${svn.exit.code}" />
     236                <isfailure code="${svn.exit.code}"/>
    250237            </condition>
    251238        </fail>
    252239    </target>
    253 
    254240    <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
    255241    </target>
  • applications/editors/josm/plugins/videomapping/build.xml

    r25796 r26174  
    1 <?xml version="1.0" encoding="UTF-8"?>
     1<?xml version="1.0" encoding="utf-8"?>
    22<!--
    33** This is a template build file for a JOSM  plugin.
     
    2929-->
    3030<project name="videomapping" default="dist" basedir=".">
    31 
    32         <!-- enter the SVN commit message -->
    33         <property name="commit.message" value="videomapping" />
    34         <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    35         <property name="plugin.main.version" value="3600" />
    36 
    37 
    38         <!--
     31    <!-- enter the SVN commit message -->
     32    <property name="commit.message" value="videomapping"/>
     33    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
     34    <property name="plugin.main.version" value="3600"/>
     35    <!--
    3936      ************************************************
    4037      ** should not be necessary to change the following properties
    4138     -->
    42         <property name="josm"                  location="../../core/dist/josm-custom.jar"/>
    43         <property name="plugin.build.dir"      value="build"/>
    44         <property name="plugin.src.dir"        value="src"/>
    45         <!-- this is the directory where the plugin jar is copied to -->
    46         <property name="plugin.dist.dir"        value="../../dist"/>
    47         <property name="ant.build.javac.target" value="1.6"/>
    48         <property name="plugin.jar"            value="${plugin.dist.dir}/${ant.project.name}.jar"/>
    49         <property name="vlcj"                  value="lib/vlcj-1.1.5.1.jar"/>
    50         <property name="jna"                  value="lib/jna.jar"/>
    51         <property name="platform"                  value="lib/platform.jar"/>
    52         <property name="log4j"                  value="lib/log4j.jar"/>
    53         <!--
     39    <property name="josm" location="../../core/dist/josm-custom.jar"/>
     40    <property name="plugin.build.dir" value="build"/>
     41    <property name="plugin.src.dir" value="src"/>
     42    <!-- this is the directory where the plugin jar is copied to -->
     43    <property name="plugin.dist.dir" value="../../dist"/>
     44    <property name="ant.build.javac.target" value="1.6"/>
     45    <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/>
     46    <property name="vlcj" value="lib/vlcj-1.1.5.1.jar"/>
     47    <property name="jna" value="lib/jna.jar"/>
     48    <property name="platform" value="lib/platform.jar"/>
     49    <property name="log4j" value="lib/log4j.jar"/>
     50    <!--
    5451    **********************************************************
    5552    ** init - initializes the build
    5653    **********************************************************
    5754    -->
    58         <target name="init">
    59                 <mkdir dir="${plugin.build.dir}"/>
    60         </target>
    61 
    62         <!--
     55    <target name="init">
     56        <mkdir dir="${plugin.build.dir}"/>
     57    </target>
     58    <!--
    6359    **********************************************************
    6460    ** compile - complies the source tree
    6561    **********************************************************
    6662    -->
    67         <target name="compile" depends="init">
    68                 <echo message="compiling sources for  ${plugin.jar} ... "/>
    69                 <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}">
    70                         <compilerarg value="-Xlint:deprecation"/>
    71                         <compilerarg value="-Xlint:unchecked"/>
    72                         <classpath>
    73                                 <pathelement location="${vlcj}"/> <!--Add extra libraries -->
    74                                 <pathelement location="${jna}"/>
    75                                 <pathelement location="${platform}"/>
    76                                 <pathelement location="${log4j}"/>
    77                         </classpath>
    78                 </javac>
    79         </target>
    80 
    81         <!--
     63    <target name="compile" depends="init">
     64        <echo message="compiling sources for  ${plugin.jar} ... "/>
     65        <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}">
     66            <compilerarg value="-Xlint:deprecation"/>
     67            <compilerarg value="-Xlint:unchecked"/>
     68            <classpath>
     69                <pathelement location="${vlcj}"/>
     70                <!--Add extra libraries -->
     71                <pathelement location="${jna}"/>
     72                <pathelement location="${platform}"/>
     73                <pathelement location="${log4j}"/>
     74            </classpath>
     75        </javac>
     76    </target>
     77    <!--
    8278    **********************************************************
    8379    ** dist - creates the plugin jar
    8480    **********************************************************
    8581    -->
    86         <target name="dist" depends="compile,revision">
    87                 <echo message="creating ${ant.project.name}.jar ... "/>
    88                 <copy todir="${plugin.build.dir}/resources">
    89                         <fileset dir="resources"/>
    90                 </copy>
    91                 <copy todir="${plugin.build.dir}/images">
    92                         <fileset dir="images"/>
    93                 </copy>
    94                 <copy todir="${plugin.build.dir}">
    95                         <fileset dir=".">
    96                                 <include name="README" />
    97                                 <include name="LICENSE" />
    98                         </fileset>
    99                 </copy>
    100                 <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
    101                         <!--
     82    <target name="dist" depends="compile,revision">
     83        <echo message="creating ${ant.project.name}.jar ... "/>
     84        <copy todir="${plugin.build.dir}/resources">
     85            <fileset dir="resources"/>
     86        </copy>
     87        <copy todir="${plugin.build.dir}/images">
     88            <fileset dir="images"/>
     89        </copy>
     90        <copy todir="${plugin.build.dir}/data">
     91            <fileset dir="data"/>
     92        </copy>
     93        <copy todir="${plugin.build.dir}">
     94            <fileset dir=".">
     95                <include name="README"/>
     96                <include name="LICENSE"/>
     97            </fileset>
     98        </copy>
     99        <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
     100            <!--
    102101        ************************************************
    103102        ** configure these properties. Most of them will be copied to the plugins
     
    107106        ************************************************
    108107    -->
    109                         <manifest>
    110                                 <attribute name="Author" value="Matthias Meißer"/>
    111                                 <attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.videomapping.VideoPlugin"/>
    112                                 <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
    113                                 <attribute name="Plugin-Description" value="(This Plugin is currently work in progress!!!) Links and syncs a georeferenced video against a GPS track, to use it for identify visible objects."/>
    114                                 <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/wiki/JOSM/Plugins/VideoMapping"/>
    115                                 <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
    116                                 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>                             
    117                         </manifest>
    118                         <!--added to bundle libs-->
    119                         <zipfileset src="lib/jna.jar" />
    120                         <zipfileset src="lib/log4j.jar" />
    121                         <zipfileset src="lib/platform.jar" />
    122                         <zipfileset src="lib/vlcj-1.1.5.1.jar" />
    123                 </jar>
    124         </target>
    125 
    126         <!--
     108            <manifest>
     109                <attribute name="Author" value="Matthias Meißer"/>
     110                <attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.videomapping.VideoPlugin"/>
     111                <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
     112                <attribute name="Plugin-Description" value="(This Plugin is currently work in progress!!!) Links and syncs a georeferenced video against a GPS track, to use it for identify visible objects."/>
     113                <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/wiki/JOSM/Plugins/VideoMapping"/>
     114                <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
     115                <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
     116            </manifest>
     117            <!--added to bundle libs-->
     118            <zipfileset src="lib/jna.jar"/>
     119            <zipfileset src="lib/log4j.jar"/>
     120            <zipfileset src="lib/platform.jar"/>
     121            <zipfileset src="lib/vlcj-1.1.5.1.jar"/>
     122        </jar>
     123    </target>
     124    <!--
    127125    **********************************************************
    128126    ** revision - extracts the current revision number for the
     
    131129    **********************************************************
    132130    -->
    133         <target name="revision">
    134 
    135                 <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
    136                         <env key="LANG" value="C"/>
    137                         <arg value="info"/>
    138                         <arg value="--xml"/>
    139                         <arg value="."/>
    140                 </exec>
    141                 <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
    142                 <delete file="REVISION"/>
    143         </target>
    144 
    145         <!--
     131    <target name="revision">
     132        <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
     133            <env key="LANG" value="C"/>
     134            <arg value="info"/>
     135            <arg value="--xml"/>
     136            <arg value="."/>
     137        </exec>
     138        <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
     139        <delete file="REVISION"/>
     140    </target>
     141    <!--
    146142    **********************************************************
    147143    ** clean - clean up the build environment
    148144    **********************************************************
    149145    -->
    150         <target name="clean">
    151                 <delete dir="${plugin.build.dir}"/>
    152                 <delete file="${plugin.jar}"/>
    153         </target>
    154 
    155         <!--
     146    <target name="clean">
     147        <delete dir="${plugin.build.dir}"/>
     148        <delete file="${plugin.jar}"/>
     149    </target>
     150    <!--
    156151    **********************************************************
    157152    ** install - install the plugin in your local JOSM installation
    158153    **********************************************************
    159154    -->
    160         <target name="install" depends="dist">
    161                 <property environment="env"/>
    162                 <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
    163                         <and>
    164                                 <os family="windows"/>
    165                         </and>
    166                 </condition>
    167                 <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
    168         </target>
    169 
    170 
    171         <!--
    172         ************************** Publishing the plugin ***********************************
    173         -->
    174         <!--
    175                 ** extracts the JOSM release for the JOSM version in ../core and saves it in the
    176                 ** property ${coreversion.info.entry.revision}
    177                 **
    178                 -->
    179         <target name="core-info">
    180                 <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
    181                         <env key="LANG" value="C"/>
    182                         <arg value="info"/>
    183                         <arg value="--xml"/>
    184                         <arg value="../../core"/>
    185                 </exec>
    186                 <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
    187                 <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
    188                 <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
    189                 <delete file="core.info.xml" />
    190         </target>
    191 
    192         <!--
    193                 ** commits the source tree for this plugin
    194                 -->
    195         <target name="commit-current">
    196                 <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
    197                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    198                         <env key="LANG" value="C"/>
    199                         <arg value="commit"/>
    200                         <arg value="-m '${commit.message}'"/>
    201                         <arg value="."/>
    202                 </exec>
    203         </target>
    204 
    205         <!--
    206                 ** updates (svn up) the source tree for this plugin
    207                 -->
    208         <target name="update-current">
    209                 <echo>Updating plugin source ...</echo>
    210                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    211                         <env key="LANG" value="C"/>
    212                         <arg value="up"/>
    213                         <arg value="."/>
    214                 </exec>
    215                 <echo>Updating ${plugin.jar} ...</echo>
    216                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    217                         <env key="LANG" value="C"/>
    218                         <arg value="up"/>
    219                         <arg value="../dist/${plugin.jar}"/>
    220                 </exec>
    221         </target>
    222 
    223         <!--
    224                 ** commits the plugin.jar
    225                 -->
    226         <target name="commit-dist">
    227                 <echo>
    228         ***** Properties of published ${plugin.jar} *****
    229         Commit message    : '${commit.message}'                                 
    230         Plugin-Mainversion: ${plugin.main.version}
    231         JOSM build version: ${coreversion.info.entry.revision}
    232         Plugin-Version    : ${version.entry.commit.revision}
    233         ***** / Properties of published ${plugin.jar} *****                                     
    234                                                
    235         Now commiting ${plugin.jar} ...
    236         </echo>
    237                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    238                         <env key="LANG" value="C"/>
    239                         <arg value="-m '${commit.message}'"/>
    240                         <arg value="commit"/>
    241                         <arg value="${plugin.jar}"/>
    242                 </exec>
    243         </target>
    244 
    245         <!-- ** make sure svn is present as a command line tool ** -->
    246         <target name="ensure-svn-present">
    247                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
    248                         <env key="LANG" value="C" />
    249                         <arg value="--version" />
    250                 </exec>
    251                 <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
    252                         <!-- return code not set at all? Most likely svn isn't installed -->
    253                         <condition>
    254                                 <not>
    255                                         <isset property="svn.exit.code" />
    256                                 </not>
    257                         </condition>
    258                 </fail>
    259                 <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
    260                         <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
    261                         <condition>
    262                                 <isfailure code="${svn.exit.code}" />
    263                         </condition>
    264                 </fail>
    265         </target>
    266 
    267         <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
    268         </target>
     155    <target name="install" depends="dist">
     156        <property environment="env"/>
     157        <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
     158            <and>
     159                <os family="windows"/>
     160            </and>
     161        </condition>
     162        <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
     163    </target>
     164    <!--
     165    ************************** Publishing the plugin ***********************************
     166    -->
     167    <!--
     168        ** extracts the JOSM release for the JOSM version in ../core and saves it in the
     169        ** property ${coreversion.info.entry.revision}
     170        **
     171        -->
     172    <target name="core-info">
     173        <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
     174            <env key="LANG" value="C"/>
     175            <arg value="info"/>
     176            <arg value="--xml"/>
     177            <arg value="../../core"/>
     178        </exec>
     179        <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
     180        <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
     181        <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
     182        <delete file="core.info.xml"/>
     183    </target>
     184    <!--
     185        ** commits the source tree for this plugin
     186        -->
     187    <target name="commit-current">
     188        <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
     189        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     190            <env key="LANG" value="C"/>
     191            <arg value="commit"/>
     192            <arg value="-m '${commit.message}'"/>
     193            <arg value="."/>
     194        </exec>
     195    </target>
     196    <!--
     197        ** updates (svn up) the source tree for this plugin
     198        -->
     199    <target name="update-current">
     200        <echo>Updating plugin source ...</echo>
     201        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     202            <env key="LANG" value="C"/>
     203            <arg value="up"/>
     204            <arg value="."/>
     205        </exec>
     206        <echo>Updating ${plugin.jar} ...</echo>
     207        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     208            <env key="LANG" value="C"/>
     209            <arg value="up"/>
     210            <arg value="../dist/${plugin.jar}"/>
     211        </exec>
     212    </target>
     213    <!--
     214        ** commits the plugin.jar
     215        -->
     216    <target name="commit-dist">
     217        <echo>
     218    ***** Properties of published ${plugin.jar} *****
     219    Commit message    : '${commit.message}'                 
     220    Plugin-Mainversion: ${plugin.main.version}
     221    JOSM build version: ${coreversion.info.entry.revision}
     222    Plugin-Version    : ${version.entry.commit.revision}
     223    ***** / Properties of published ${plugin.jar} *****                 
     224                       
     225    Now commiting ${plugin.jar} ...
     226    </echo>
     227        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     228            <env key="LANG" value="C"/>
     229            <arg value="-m '${commit.message}'"/>
     230            <arg value="commit"/>
     231            <arg value="${plugin.jar}"/>
     232        </exec>
     233    </target>
     234    <!-- ** make sure svn is present as a command line tool ** -->
     235    <target name="ensure-svn-present">
     236        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
     237            <env key="LANG" value="C"/>
     238            <arg value="--version"/>
     239        </exec>
     240        <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
     241            <!-- return code not set at all? Most likely svn isn't installed -->
     242            <condition>
     243                <not>
     244                    <isset property="svn.exit.code"/>
     245                </not>
     246            </condition>
     247        </fail>
     248        <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
     249            <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
     250            <condition>
     251                <isfailure code="${svn.exit.code}"/>
     252            </condition>
     253        </fail>
     254    </target>
     255    <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
     256    </target>
    269257</project>
  • applications/editors/josm/plugins/walkingpapers/build.xml

    r25191 r26174  
    1 <?xml version="1.0" encoding="UTF-8"?>
     1<?xml version="1.0" encoding="utf-8"?>
    22<!--
    33** This is the build.xml for the walkingpaper plugin
     
    2222-->
    2323<project name="walkingpapers" default="dist" basedir=".">
     24    <!--
     25    ** update before publishing
     26    -->
     27    <property name="commit.message" value="Changed the constructor signature of the plugin main class"/>
     28    <property name="plugin.main.version" value="3835"/>
     29    <property name="josm" location="../../core/dist/josm-custom.jar"/>
     30    <property name="plugin.dist.dir" value="../../dist"/>
     31    <property name="plugin.build.dir" value="build"/>
     32    <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/>
     33    <property name="ant.build.javac.target" value="1.5"/>
     34    <target name="init">
     35        <mkdir dir="${plugin.build.dir}"/>
     36    </target>
     37    <target name="compile" depends="init">
     38        <echo message="creating ${plugin.jar}"/>
     39        <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}">
     40            <compilerarg value="-Xlint:deprecation"/>
     41            <compilerarg value="-Xlint:unchecked"/>
     42        </javac>
     43    </target>
     44    <target name="dist" depends="compile,revision">
     45        <copy todir="${plugin.build.dir}/images">
     46            <fileset dir="images"/>
     47        </copy>
     48        <copy todir="${plugin.build.dir}/data">
     49            <fileset dir="data"/>
     50        </copy>
     51        <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
     52            <manifest>
     53                <attribute name="Author" value="Frederik Ramm"/>
     54                <attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.walkingpapers.WalkingPapersPlugin"/>
     55                <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
     56                <attribute name="Plugin-Description" value="Supports downloading tiled, scanned maps from walking-papers.org. This plugin is still under early development and may be buggy."/>
     57                <attribute name="Plugin-Icon" value="images/preferences/walkingpapers.png"/>
     58                <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/index.php/JOSM/Plugins/WalkingPapers"/>
     59                <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
     60                <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
     61            </manifest>
     62        </jar>
     63    </target>
     64    <target name="revision">
     65        <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
     66            <env key="LANG" value="C"/>
     67            <arg value="info"/>
     68            <arg value="--xml"/>
     69            <arg value="."/>
     70        </exec>
     71        <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
     72        <delete file="REVISION"/>
     73    </target>
     74    <target name="clean">
     75        <delete dir="${plugin.build.dir}"/>
     76        <delete file="${plugin.jar}"/>
     77    </target>
     78    <target name="install" depends="dist">
     79        <property environment="env"/>
     80        <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
     81            <and>
     82                <os family="windows"/>
     83            </and>
     84        </condition>
     85        <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
     86    </target>
     87    <!--
     88         ************************** Publishing the plugin ***********************************
     89        -->
     90    <!--
     91        ** extracts the JOSM release for the JOSM version in ../core and saves it in the
     92        ** property ${coreversion.info.entry.revision}
     93        **
     94        -->
     95    <target name="core-info">
     96        <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
     97            <env key="LANG" value="C"/>
     98            <arg value="info"/>
     99            <arg value="--xml"/>
     100            <arg value="../../core"/>
     101        </exec>
     102        <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
     103        <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
     104        <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
     105        <delete file="core.info.xml"/>
     106    </target>
     107    <!--
     108        ** commits the source tree for this plugin
     109        -->
     110    <target name="commit-current">
     111        <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
     112        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     113            <env key="LANG" value="C"/>
     114            <arg value="-m '${commit.message}'"/>
     115            <arg value="commit"/>
     116            <arg value="."/>
     117        </exec>
     118    </target>
     119    <!--
     120        ** updates (svn up) the source tree for this plugin
     121        -->
     122    <target name="update-current">
     123        <echo>Updating plugin source ...</echo>
     124        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     125            <env key="LANG" value="C"/>
     126            <arg value="up"/>
     127            <arg value="."/>
     128        </exec>
     129        <echo>Updating ${plugin.jar} ...</echo>
     130        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     131            <env key="LANG" value="C"/>
     132            <arg value="up"/>
     133            <arg value="../dist/${plugin.jar}"/>
     134        </exec>
     135    </target>
     136    <!--
     137        ** commits the plugin.jar
     138        -->
     139    <target name="commit-dist">
     140        <echo>
     141    ***** Properties of published ${plugin.jar} *****
     142    Commit message    : '${commit.message}'
     143    Plugin-Mainversion: ${plugin.main.version}
     144    JOSM build version: ${coreversion.info.entry.revision}
     145    Plugin-Version    : ${version.entry.commit.revision}
     146    ***** / Properties of published ${plugin.jar} *****
    24147
    25         <!--
    26         ** update before publishing
    27         -->
    28         <property name="commit.message" value="Changed the constructor signature of the plugin main class" />
    29         <property name="plugin.main.version" value="3835" />
    30 
    31 
    32         <property name="josm"                   location="../../core/dist/josm-custom.jar"/>
    33         <property name="plugin.dist.dir"        value="../../dist"/>
    34         <property name="plugin.build.dir"       value="build"/>
    35         <property name="plugin.jar"             value="${plugin.dist.dir}/${ant.project.name}.jar"/>
    36         <property name="ant.build.javac.target" value="1.5"/>
    37         <target name="init">
    38                 <mkdir dir="${plugin.build.dir}"/>
    39         </target>
    40         <target name="compile" depends="init">
    41                 <echo message="creating ${plugin.jar}"/>
    42                 <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}">
    43                         <compilerarg value="-Xlint:deprecation"/>
    44                         <compilerarg value="-Xlint:unchecked"/>
    45                 </javac>
    46         </target>
    47         <target name="dist" depends="compile,revision">
    48                 <copy todir="${plugin.build.dir}/images">
    49                         <fileset dir="images"/>
    50                 </copy>
    51                 <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
    52                         <manifest>
    53                                 <attribute name="Author" value="Frederik Ramm"/>
    54                                 <attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.walkingpapers.WalkingPapersPlugin"/>
    55                                 <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
    56                                 <attribute name="Plugin-Description" value="Supports downloading tiled, scanned maps from walking-papers.org. This plugin is still under early development and may be buggy."/>
    57                                 <attribute name="Plugin-Icon" value="images/preferences/walkingpapers.png"/>
    58                                 <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/index.php/JOSM/Plugins/WalkingPapers"/>
    59                                 <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
    60                                 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
    61                         </manifest>
    62                 </jar>
    63         </target>
    64         <target name="revision">
    65                 <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
    66                         <env key="LANG" value="C"/>
    67                         <arg value="info"/>
    68                         <arg value="--xml"/>
    69                         <arg value="."/>
    70                 </exec>
    71                 <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
    72                 <delete file="REVISION"/>
    73         </target>
    74         <target name="clean">
    75                 <delete dir="${plugin.build.dir}"/>
    76                 <delete file="${plugin.jar}"/>
    77         </target>
    78         <target name="install" depends="dist">
    79                 <property environment="env"/>
    80                 <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
    81                         <and>
    82                                 <os family="windows"/>
    83                         </and>
    84                 </condition>
    85                 <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
    86         </target>
    87 
    88         <!--
    89                  ************************** Publishing the plugin ***********************************
    90                 -->
    91         <!--
    92                 ** extracts the JOSM release for the JOSM version in ../core and saves it in the
    93                 ** property ${coreversion.info.entry.revision}
    94                 **
    95                 -->
    96         <target name="core-info">
    97                 <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
    98                         <env key="LANG" value="C"/>
    99                         <arg value="info"/>
    100                         <arg value="--xml"/>
    101                         <arg value="../../core"/>
    102                 </exec>
    103                 <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
    104                 <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
    105                 <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
    106                 <delete file="core.info.xml" />
    107         </target>
    108 
    109         <!--
    110                 ** commits the source tree for this plugin
    111                 -->
    112         <target name="commit-current">
    113                 <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
    114                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    115                         <env key="LANG" value="C"/>
    116                         <arg value="-m '${commit.message}'"/>
    117                         <arg value="commit"/>
    118                         <arg value="."/>
    119                 </exec>
    120         </target>
    121 
    122         <!--
    123                 ** updates (svn up) the source tree for this plugin
    124                 -->
    125         <target name="update-current">
    126                 <echo>Updating plugin source ...</echo>
    127                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    128                         <env key="LANG" value="C"/>
    129                         <arg value="up"/>
    130                         <arg value="."/>
    131                 </exec>
    132                 <echo>Updating ${plugin.jar} ...</echo>
    133                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    134                         <env key="LANG" value="C"/>
    135                         <arg value="up"/>
    136                         <arg value="../dist/${plugin.jar}"/>
    137                 </exec>
    138         </target>
    139 
    140         <!--
    141                 ** commits the plugin.jar
    142                 -->
    143         <target name="commit-dist">
    144                 <echo>
    145         ***** Properties of published ${plugin.jar} *****
    146         Commit message    : '${commit.message}'
    147         Plugin-Mainversion: ${plugin.main.version}
    148         JOSM build version: ${coreversion.info.entry.revision}
    149         Plugin-Version    : ${version.entry.commit.revision}
    150         ***** / Properties of published ${plugin.jar} *****
    151 
    152         Now commiting ${plugin.jar} ...
    153         </echo>
    154                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    155                         <env key="LANG" value="C"/>
    156                         <arg value="-m '${commit.message}'"/>
    157                         <arg value="commit"/>
    158                         <arg value="${plugin.jar}"/>
    159                 </exec>
    160         </target>
    161 
    162         <!-- ** make sure svn is present as a command line tool ** -->
    163         <target name="ensure-svn-present">
    164                 <exec append="true" output="svn.log" executable="svn" failonerror="false" resultproperty="svn.exit.code">
    165                         <env key="LANG" value="C" />
    166                         <arg value="--version" />
    167                 </exec>
    168                 <fail message="Fatal: command 'svn' not found. Please make sure svn is installed on your system.">
    169                         <condition>
    170                                 <isfailure code="${svn.exit.code}" />
    171                         </condition>
    172                 </fail>
    173         </target>
    174 
    175         <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
    176         </target>
     148    Now commiting ${plugin.jar} ...
     149    </echo>
     150        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     151            <env key="LANG" value="C"/>
     152            <arg value="-m '${commit.message}'"/>
     153            <arg value="commit"/>
     154            <arg value="${plugin.jar}"/>
     155        </exec>
     156    </target>
     157    <!-- ** make sure svn is present as a command line tool ** -->
     158    <target name="ensure-svn-present">
     159        <exec append="true" output="svn.log" executable="svn" failonerror="false" resultproperty="svn.exit.code">
     160            <env key="LANG" value="C"/>
     161            <arg value="--version"/>
     162        </exec>
     163        <fail message="Fatal: command 'svn' not found. Please make sure svn is installed on your system.">
     164            <condition>
     165                <isfailure code="${svn.exit.code}"/>
     166            </condition>
     167        </fail>
     168    </target>
     169    <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
     170    </target>
    177171</project>
  • applications/editors/josm/plugins/waydownloader/build.xml

    r25190 r26174  
    1 <?xml version="1.0" encoding="UTF-8"?>
     1<?xml version="1.0" encoding="utf-8"?>
    22<!--
    33** This is a template build file for a JOSM  plugin.
     
    2222-->
    2323<project name="waydownloader" default="dist" basedir=".">
    24 
    25         <!--
     24    <!--
    2625      ** update before publishing
    27         -->
    28         <property name="commit.message" value="Changed the constructor signature of the plugin main class" />
    29         <property name="plugin.main.version" value="3835" />
    30 
    31 
    32         <!--
     26    -->
     27    <property name="commit.message" value="Changed the constructor signature of the plugin main class"/>
     28    <property name="plugin.main.version" value="3835"/>
     29    <!--
    3330      ************************************************
    3431      ** should not be necessary to change the following properties
    3532     -->
    36         <property name="josm"                   location="../../core/dist/josm-custom.jar"/>
    37         <property name="plugin.build.dir"       value="build"/>
    38         <property name="plugin.src.dir"         value="src"/>
    39         <!-- this is the directory where the plugin jar is copied to -->
    40         <property name="plugin.dist.dir"        value="../../dist"/>
    41         <property name="ant.build.javac.target" value="1.5"/>
    42         <property name="plugin.dist.dir"        value="../../dist"/>
    43         <property name="plugin.jar"             value="${plugin.dist.dir}/${ant.project.name}.jar"/>
    44 
    45         <!--
     33    <property name="josm" location="../../core/dist/josm-custom.jar"/>
     34    <property name="plugin.build.dir" value="build"/>
     35    <property name="plugin.src.dir" value="src"/>
     36    <!-- this is the directory where the plugin jar is copied to -->
     37    <property name="plugin.dist.dir" value="../../dist"/>
     38    <property name="ant.build.javac.target" value="1.5"/>
     39    <property name="plugin.dist.dir" value="../../dist"/>
     40    <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/>
     41    <!--
    4642    **********************************************************
    4743    ** init - initializes the build
    4844    **********************************************************
    4945    -->
    50         <target name="init">
    51                 <mkdir dir="${plugin.build.dir}"/>
    52         </target>
    53 
    54         <!--
     46    <target name="init">
     47        <mkdir dir="${plugin.build.dir}"/>
     48    </target>
     49    <!--
    5550    **********************************************************
    5651    ** compile - complies the source tree
    5752    **********************************************************
    5853    -->
    59         <target name="compile" depends="init">
    60                 <echo message="compiling sources for  ${plugin.jar} ... "/>
    61                 <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}">
    62                         <compilerarg value="-Xlint:deprecation"/>
    63                         <compilerarg value="-Xlint:unchecked"/>
    64                 </javac>
    65         </target>
    66 
    67         <!--
     54    <target name="compile" depends="init">
     55        <echo message="compiling sources for  ${plugin.jar} ... "/>
     56        <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}">
     57            <compilerarg value="-Xlint:deprecation"/>
     58            <compilerarg value="-Xlint:unchecked"/>
     59        </javac>
     60    </target>
     61    <!--
    6862    **********************************************************
    6963    ** dist - creates the plugin jar
    7064    **********************************************************
    7165    -->
    72         <target name="dist" depends="compile,revision">
    73                 <echo message="creating ${plugin.jar} ... "/>
    74                 <copy todir="${plugin.build.dir}/resources">
    75                         <fileset dir="resources"/>
    76                 </copy>
    77                 <copy todir="${plugin.build.dir}/images">
    78                         <fileset dir="images"/>
    79                 </copy>
    80                 <copy todir="${plugin.build.dir}">
    81                         <fileset dir=".">
    82                                 <include name="README" />
    83                                 <include name="LICENSE" />
    84                         </fileset>
    85                 </copy>
    86                 <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
    87                         <!--
     66    <target name="dist" depends="compile,revision">
     67        <echo message="creating ${plugin.jar} ... "/>
     68        <copy todir="${plugin.build.dir}/resources">
     69            <fileset dir="resources"/>
     70        </copy>
     71        <copy todir="${plugin.build.dir}/images">
     72            <fileset dir="images"/>
     73        </copy>
     74        <copy todir="${plugin.build.dir}/data">
     75            <fileset dir="data"/>
     76        </copy>
     77        <copy todir="${plugin.build.dir}">
     78            <fileset dir=".">
     79                <include name="README"/>
     80                <include name="LICENSE"/>
     81            </fileset>
     82        </copy>
     83        <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
     84            <!--
    8885        ************************************************
    8986        ** configure these properties. Most of them will be copied to the plugins
     
    9390        ************************************************
    9491    -->
    95                         <manifest>
    96                                 <attribute name="Author" value="Harry Wood"/>
    97                                 <attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.waydownloader.WayDownloaderPlugin"/>
    98                                 <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
    99                                 <attribute name="Plugin-Description" value="Easy downloading along a long set of interconnected ways"/>
    100                                 <attribute name="Plugin-Icon" value="images/way-download.png"/>
    101                                 <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/wiki/JOSM/Plugins/WayDownloaderPlugin"/>
    102                                 <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
    103                                 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
    104                         </manifest>
    105                 </jar>
    106         </target>
    107 
    108         <!--
     92            <manifest>
     93                <attribute name="Author" value="Harry Wood"/>
     94                <attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.waydownloader.WayDownloaderPlugin"/>
     95                <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
     96                <attribute name="Plugin-Description" value="Easy downloading along a long set of interconnected ways"/>
     97                <attribute name="Plugin-Icon" value="images/way-download.png"/>
     98                <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/wiki/JOSM/Plugins/WayDownloaderPlugin"/>
     99                <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
     100                <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
     101            </manifest>
     102        </jar>
     103    </target>
     104    <!--
    109105    **********************************************************
    110106    ** revision - extracts the current revision number for the
     
    113109    **********************************************************
    114110    -->
    115         <target name="revision">
    116 
    117                 <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
    118                         <env key="LANG" value="C"/>
    119                         <arg value="info"/>
    120                         <arg value="--xml"/>
    121                         <arg value="."/>
    122                 </exec>
    123                 <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
    124                 <delete file="REVISION"/>
    125         </target>
    126 
    127         <!--
     111    <target name="revision">
     112        <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
     113            <env key="LANG" value="C"/>
     114            <arg value="info"/>
     115            <arg value="--xml"/>
     116            <arg value="."/>
     117        </exec>
     118        <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
     119        <delete file="REVISION"/>
     120    </target>
     121    <!--
    128122    **********************************************************
    129123    ** clean - clean up the build environment
    130124    **********************************************************
    131125    -->
    132         <target name="clean">
    133                 <delete dir="${plugin.build.dir}"/>
    134                 <delete file="${plugin.jar}"/>
    135         </target>
    136 
    137         <!--
     126    <target name="clean">
     127        <delete dir="${plugin.build.dir}"/>
     128        <delete file="${plugin.jar}"/>
     129    </target>
     130    <!--
    138131    **********************************************************
    139132    ** install - install the plugin in your local JOSM installation
    140133    **********************************************************
    141134    -->
    142         <target name="install" depends="dist">
    143                 <property environment="env"/>
    144                 <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
    145                         <and>
    146                                 <os family="windows"/>
    147                         </and>
    148                 </condition>
    149                 <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
    150         </target>
    151 
    152 
    153         <!--
    154                  ************************** Publishing the plugin ***********************************
    155         -->
    156         <!--
    157         ** extracts the JOSM release for the JOSM version in ../core and saves it in the
    158         ** property ${coreversion.info.entry.revision}
    159         **
    160         -->
    161         <target name="core-info">
    162                 <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
    163                         <env key="LANG" value="C"/>
    164                         <arg value="info"/>
    165                         <arg value="--xml"/>
    166                         <arg value="../../core"/>
    167                 </exec>
    168                 <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
    169                 <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
    170                 <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
    171                 <delete file="core.info.xml" />
    172         </target>
    173 
    174         <!--
    175         ** commits the source tree for this plugin
    176         -->
    177         <target name="commit-current">
    178                 <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
    179                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    180                         <env key="LANG" value="C"/>
    181                         <arg value="-m '${commit.message}'"/>
    182                         <arg value="commit"/>
    183                         <arg value="."/>
    184                 </exec>
    185         </target>
    186 
    187         <!--
    188         ** updates (svn up) the source tree for this plugin
    189         -->
    190         <target name="update-current">
    191                 <echo>Updating plugin source ...</echo>
    192                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    193                         <env key="LANG" value="C"/>
    194                         <arg value="up"/>
    195                         <arg value="."/>
    196                 </exec>
    197                 <echo>Updating ${plugin.jar} ...</echo>
    198                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    199                         <env key="LANG" value="C"/>
    200                         <arg value="up"/>
    201                         <arg value="../dist/${plugin.jar}"/>
    202                 </exec>
    203         </target>
    204 
    205         <!--
    206         ** commits the plugin.jar
    207         -->
    208         <target name="commit-dist">
    209                 <echo>
    210         ***** Properties of published ${plugin.jar} *****
    211         Commit message    : '${commit.message}'                                 
    212         Plugin-Mainversion: ${plugin.main.version}
    213         JOSM build version: ${coreversion.info.entry.revision}
    214         Plugin-Version    : ${version.entry.commit.revision}
    215         ***** / Properties of published ${plugin.jar} *****                                     
    216                                                
    217         Now commiting ${plugin.jar} ...
    218         </echo>
    219                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="true" failonerror="true">
    220                         <env key="LANG" value="C"/>
    221                         <arg value="-m '${commit.message}'"/>
    222                         <arg value="commit"/>
    223                         <arg value="${plugin.jar}"/>
    224                 </exec>
    225         </target>
    226 
    227         <!-- ** make sure svn is present as a command line tool ** -->
    228         <target name="ensure-svn-present">
    229                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
    230                         <env key="LANG" value="C" />
    231                         <arg value="--version" />
    232                 </exec>
    233                 <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
    234                         <!-- return code not set at all? Most likely svn isn't installed -->
    235                         <condition>
    236                                 <not>
    237                                         <isset property="svn.exit.code" />
    238                                 </not>
    239                         </condition>
    240                 </fail>
    241                 <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
    242                         <!-- error code from SVN? Most likely svn is not what we are looking for on this system -->
    243                         <condition>
    244                                 <isfailure code="${svn.exit.code}" />
    245                         </condition>
    246                 </fail>
    247         </target>
    248 
    249         <target name="publish" depends="ensure-svn-present, core-info,commit-current,update-current,clean,dist,commit-dist">
    250         </target>
     135    <target name="install" depends="dist">
     136        <property environment="env"/>
     137        <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
     138            <and>
     139                <os family="windows"/>
     140            </and>
     141        </condition>
     142        <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
     143    </target>
     144    <!--
     145         ************************** Publishing the plugin ***********************************
     146    -->
     147    <!--
     148    ** extracts the JOSM release for the JOSM version in ../core and saves it in the
     149    ** property ${coreversion.info.entry.revision}
     150    **
     151    -->
     152    <target name="core-info">
     153        <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
     154            <env key="LANG" value="C"/>
     155            <arg value="info"/>
     156            <arg value="--xml"/>
     157            <arg value="../../core"/>
     158        </exec>
     159        <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
     160        <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
     161        <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
     162        <delete file="core.info.xml"/>
     163    </target>
     164    <!--
     165    ** commits the source tree for this plugin
     166    -->
     167    <target name="commit-current">
     168        <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
     169        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     170            <env key="LANG" value="C"/>
     171            <arg value="-m '${commit.message}'"/>
     172            <arg value="commit"/>
     173            <arg value="."/>
     174        </exec>
     175    </target>
     176    <!--
     177    ** updates (svn up) the source tree for this plugin
     178    -->
     179    <target name="update-current">
     180        <echo>Updating plugin source ...</echo>
     181        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     182            <env key="LANG" value="C"/>
     183            <arg value="up"/>
     184            <arg value="."/>
     185        </exec>
     186        <echo>Updating ${plugin.jar} ...</echo>
     187        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     188            <env key="LANG" value="C"/>
     189            <arg value="up"/>
     190            <arg value="../dist/${plugin.jar}"/>
     191        </exec>
     192    </target>
     193    <!--
     194    ** commits the plugin.jar
     195    -->
     196    <target name="commit-dist">
     197        <echo>
     198    ***** Properties of published ${plugin.jar} *****
     199    Commit message    : '${commit.message}'                 
     200    Plugin-Mainversion: ${plugin.main.version}
     201    JOSM build version: ${coreversion.info.entry.revision}
     202    Plugin-Version    : ${version.entry.commit.revision}
     203    ***** / Properties of published ${plugin.jar} *****                 
     204                       
     205    Now commiting ${plugin.jar} ...
     206    </echo>
     207        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="true" failonerror="true">
     208            <env key="LANG" value="C"/>
     209            <arg value="-m '${commit.message}'"/>
     210            <arg value="commit"/>
     211            <arg value="${plugin.jar}"/>
     212        </exec>
     213    </target>
     214    <!-- ** make sure svn is present as a command line tool ** -->
     215    <target name="ensure-svn-present">
     216        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
     217            <env key="LANG" value="C"/>
     218            <arg value="--version"/>
     219        </exec>
     220        <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
     221            <!-- return code not set at all? Most likely svn isn't installed -->
     222            <condition>
     223                <not>
     224                    <isset property="svn.exit.code"/>
     225                </not>
     226            </condition>
     227        </fail>
     228        <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
     229            <!-- error code from SVN? Most likely svn is not what we are looking for on this system -->
     230            <condition>
     231                <isfailure code="${svn.exit.code}"/>
     232            </condition>
     233        </fail>
     234    </target>
     235    <target name="publish" depends="ensure-svn-present, core-info,commit-current,update-current,clean,dist,commit-dist">
     236    </target>
    251237</project>
  • applications/editors/josm/plugins/waypoint_search/build.xml

    r25191 r26174  
    1 <?xml version="1.0" encoding="UTF-8"?>
     1<?xml version="1.0" encoding="utf-8"?>
    22<!--
    33** This is a template build file for a JOSM  plugin.
     
    2929-->
    3030<project name="waypoint_search" default="dist" basedir=".">
    31 
    3231    <!-- enter the SVN commit message -->
    33     <property name="commit.message" value="bugfix of search when layer is added" />
     32    <property name="commit.message" value="bugfix of search when layer is added"/>
    3433    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    35     <property name="plugin.main.version" value="3835" />
    36 
    37 
     34    <property name="plugin.main.version" value="3835"/>
    3835    <!--
    3936      ************************************************
    4037      ** should not be necessary to change the following properties
    4138     -->
    42     <property name="josm"                   location="../../core/dist/josm-custom.jar"/>
    43     <property name="plugin.build.dir"       value="build"/>
    44     <property name="plugin.src.dir"         value="src"/>
     39    <property name="josm" location="../../core/dist/josm-custom.jar"/>
     40    <property name="plugin.build.dir" value="build"/>
     41    <property name="plugin.src.dir" value="src"/>
    4542    <!-- this is the directory where the plugin jar is copied to -->
    46     <property name="plugin.dist.dir"        value="../../dist"/>
     43    <property name="plugin.dist.dir" value="../../dist"/>
    4744    <property name="ant.build.javac.target" value="1.6"/>
    48     <property name="plugin.dist.dir"        value="../../dist"/>
    49     <property name="plugin.jar"             value="${plugin.dist.dir}/${ant.project.name}.jar"/>
    50 
     45    <property name="plugin.dist.dir" value="../../dist"/>
     46    <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/>
    5147    <!--
    5248    **********************************************************
     
    5753        <mkdir dir="${plugin.build.dir}"/>
    5854    </target>
    59 
    6055    <!--
    6156    **********************************************************
     
    7065        </javac>
    7166    </target>
    72 
    7367    <!--
    7468    **********************************************************
     
    8175            <fileset dir="images"/>
    8276        </copy>
     77        <copy todir="${plugin.build.dir}/data">
     78            <fileset dir="data"/>
     79        </copy>
    8380        <copy todir="${plugin.build.dir}">
    8481            <fileset dir=".">
    85                 <include name="README" />
    86                 <include name="LICENSE" />
     82                <include name="README"/>
     83                <include name="LICENSE"/>
    8784            </fileset>
    8885        </copy>
     
    107104        </jar>
    108105    </target>
    109 
    110106    <!--
    111107    **********************************************************
     
    115111    **********************************************************
    116112    -->
    117        
    118 
    119     <target name="revision">   
    120          <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
     113    <target name="revision">
     114        <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
    121115            <env key="LANG" value="C"/>
    122116            <arg value="info"/>
     
    125119        </exec>
    126120        <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
    127         <delete file="REVISION"/>       
    128     </target>
    129 
     121        <delete file="REVISION"/>
     122    </target>
    130123    <!--
    131124    **********************************************************
     
    137130        <delete file="${plugin.jar}"/>
    138131    </target>
    139 
    140132    <!--
    141133    **********************************************************
     
    152144        <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
    153145    </target>
    154 
    155 
    156146    <!--
    157147    ************************** Publishing the plugin ***********************************
     
    172162        <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
    173163        <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
    174         <delete file="core.info.xml" />
    175     </target>
    176 
     164        <delete file="core.info.xml"/>
     165    </target>
    177166    <!--
    178167        ** commits the source tree for this plugin
     
    187176        </exec>
    188177    </target>
    189 
    190178    <!--
    191179        ** updates (svn up) the source tree for this plugin
     
    205193        </exec>
    206194    </target>
    207 
    208195    <!--
    209196        ** commits the plugin.jar
     
    227214        </exec>
    228215    </target>
    229 
    230216    <!-- ** make sure svn is present as a command line tool ** -->
    231217    <target name="ensure-svn-present">
    232218        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
    233             <env key="LANG" value="C" />
    234             <arg value="--version" />
     219            <env key="LANG" value="C"/>
     220            <arg value="--version"/>
    235221        </exec>
    236222        <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
     
    238224            <condition>
    239225                <not>
    240                     <isset property="svn.exit.code" />
     226                    <isset property="svn.exit.code"/>
    241227                </not>
    242228            </condition>
     
    245231            <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
    246232            <condition>
    247                 <isfailure code="${svn.exit.code}" />
     233                <isfailure code="${svn.exit.code}"/>
    248234            </condition>
    249235        </fail>
    250236    </target>
    251 
    252237    <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
    253238    </target>
  • applications/editors/josm/plugins/wayselector/build.xml

    r25191 r26174  
    1 <?xml version="1.0" encoding="UTF-8"?>
     1<?xml version="1.0" encoding="utf-8"?>
    22<!--
    33** This is a template build file for a JOSM  plugin.
     
    2929-->
    3030<project name="wayselector" default="dist" basedir=".">
    31 
    32         <!-- enter the SVN commit message -->
    33         <property name="commit.message" value="Optimize WaySelection.findWay()." />
    34         <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    35         <property name="plugin.main.version" value="3835" />
    36 
    37 
    38         <!--
     31    <!-- enter the SVN commit message -->
     32    <property name="commit.message" value="Optimize WaySelection.findWay()."/>
     33    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
     34    <property name="plugin.main.version" value="3835"/>
     35    <!--
    3936      ************************************************
    4037      ** should not be necessary to change the following properties
    4138     -->
    42         <property name="josm"                   location="../../core/dist/josm-custom.jar"/>
    43         <property name="plugin.build.dir"       value="build"/>
    44         <property name="plugin.src.dir"         value="src"/>
    45         <!-- this is the directory where the plugin jar is copied to -->
    46         <property name="plugin.dist.dir"        value="../../dist"/>
    47         <property name="ant.build.javac.target" value="1.5"/>
    48         <property name="plugin.dist.dir"        value="../../dist"/>
    49         <property name="plugin.jar"             value="${plugin.dist.dir}/${ant.project.name}.jar"/>
    50 
    51         <!--
     39    <property name="josm" location="../../core/dist/josm-custom.jar"/>
     40    <property name="plugin.build.dir" value="build"/>
     41    <property name="plugin.src.dir" value="src"/>
     42    <!-- this is the directory where the plugin jar is copied to -->
     43    <property name="plugin.dist.dir" value="../../dist"/>
     44    <property name="ant.build.javac.target" value="1.5"/>
     45    <property name="plugin.dist.dir" value="../../dist"/>
     46    <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/>
     47    <!--
    5248    **********************************************************
    5349    ** init - initializes the build
    5450    **********************************************************
    5551    -->
    56         <target name="init">
    57                 <mkdir dir="${plugin.build.dir}"/>
    58         </target>
    59 
    60         <!--
     52    <target name="init">
     53        <mkdir dir="${plugin.build.dir}"/>
     54    </target>
     55    <!--
    6156    **********************************************************
    6257    ** compile - compiles the source tree
    6358    **********************************************************
    6459    -->
    65         <target name="compile" depends="init">
    66                 <echo message="compiling sources for  ${plugin.jar} ... "/>
    67                 <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}" includeantruntime="false">
    68                         <compilerarg value="-Xlint:deprecation"/>
    69                         <compilerarg value="-Xlint:unchecked"/>
    70                 </javac>
    71         </target>
    72 
    73         <!--
     60    <target name="compile" depends="init">
     61        <echo message="compiling sources for  ${plugin.jar} ... "/>
     62        <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}" includeantruntime="false">
     63            <compilerarg value="-Xlint:deprecation"/>
     64            <compilerarg value="-Xlint:unchecked"/>
     65        </javac>
     66    </target>
     67    <!--
    7468    **********************************************************
    7569    ** dist - creates the plugin jar
    7670    **********************************************************
    7771    -->
    78         <target name="dist" depends="compile,revision">
    79                 <echo message="creating ${ant.project.name}.jar ... "/>
    80                 <copy todir="${plugin.build.dir}/resources">
    81                         <fileset dir="resources"/>
    82                 </copy>
    83                 <copy todir="${plugin.build.dir}/images">
    84                         <fileset dir="images"/>
    85                 </copy>
    86                 <copy todir="${plugin.build.dir}">
    87                         <fileset dir=".">
    88                                 <include name="README" />
    89                                 <include name="LICENSE" />
    90                         </fileset>
    91                 </copy>
    92                 <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
    93                         <!--
     72    <target name="dist" depends="compile,revision">
     73        <echo message="creating ${ant.project.name}.jar ... "/>
     74        <copy todir="${plugin.build.dir}/resources">
     75            <fileset dir="resources"/>
     76        </copy>
     77        <copy todir="${plugin.build.dir}/images">
     78            <fileset dir="images"/>
     79        </copy>
     80        <copy todir="${plugin.build.dir}/data">
     81            <fileset dir="data"/>
     82        </copy>
     83        <copy todir="${plugin.build.dir}">
     84            <fileset dir=".">
     85                <include name="README"/>
     86                <include name="LICENSE"/>
     87            </fileset>
     88        </copy>
     89        <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
     90            <!--
    9491        ************************************************
    9592        ** configure these properties. Most of them will be copied to the plugins
     
    9996        ************************************************
    10097    -->
    101                         <manifest>
    102                                 <attribute name="Author" value="Marko Mäkelä"/>
    103                                 <attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.wayselector.WaySelectorPlugin"/>
    104                                 <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
    105                                 <attribute name="Plugin-Description" value="Select a sequence of non-branching connected ways"/>
    106                                 <attribute name="Plugin-Icon" value="images/way-select.png"/>
    107                                 <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/wiki/JOSM/Plugins/WaySelectorPlugin"/>
    108                                 <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
    109                                 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
    110                         </manifest>
    111                 </jar>
    112         </target>
    113 
    114         <!--
     98            <manifest>
     99                <attribute name="Author" value="Marko Mäkelä"/>
     100                <attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.wayselector.WaySelectorPlugin"/>
     101                <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
     102                <attribute name="Plugin-Description" value="Select a sequence of non-branching connected ways"/>
     103                <attribute name="Plugin-Icon" value="images/way-select.png"/>
     104                <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/wiki/JOSM/Plugins/WaySelectorPlugin"/>
     105                <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
     106                <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
     107            </manifest>
     108        </jar>
     109    </target>
     110    <!--
    115111    **********************************************************
    116112    ** revision - extracts the current revision number for the
     
    119115    **********************************************************
    120116    -->
    121         <target name="revision">
     117    <target name="revision">
     118        <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
     119            <env key="LANG" value="C"/>
     120            <arg value="info"/>
     121            <arg value="--xml"/>
     122            <arg value="."/>
     123        </exec>
     124        <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
     125        <delete file="REVISION"/>
     126    </target>
     127    <!--
     128    **********************************************************
     129    ** clean - clean up the build environment
     130    **********************************************************
     131    -->
     132    <target name="clean">
     133        <delete dir="${plugin.build.dir}"/>
     134        <delete file="${plugin.jar}"/>
     135    </target>
     136    <!--
     137    **********************************************************
     138    ** install - install the plugin in your local JOSM installation
     139    **********************************************************
     140    -->
     141    <target name="install" depends="dist">
     142        <property environment="env"/>
     143        <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
     144            <and>
     145                <os family="windows"/>
     146            </and>
     147        </condition>
     148        <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
     149    </target>
     150    <!--
     151    ************************** Publishing the plugin ***********************************
     152    -->
     153    <!--
     154        ** extracts the JOSM release for the JOSM version in ../core and saves it in the
     155        ** property ${coreversion.info.entry.revision}
     156        **
     157        -->
     158    <target name="core-info">
     159        <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
     160            <env key="LANG" value="C"/>
     161            <arg value="info"/>
     162            <arg value="--xml"/>
     163            <arg value="../../core"/>
     164        </exec>
     165        <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
     166        <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
     167        <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
     168        <delete file="core.info.xml"/>
     169    </target>
     170    <!--
     171        ** commits the source tree for this plugin
     172        -->
     173    <target name="commit-current">
     174        <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
     175        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     176            <env key="LANG" value="C"/>
     177            <arg value="commit"/>
     178            <arg value="-m '${commit.message}'"/>
     179            <arg value="."/>
     180        </exec>
     181    </target>
     182    <!--
     183        ** updates (svn up) the source tree for this plugin
     184        -->
     185    <target name="update-current">
     186        <echo>Updating plugin source ...</echo>
     187        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     188            <env key="LANG" value="C"/>
     189            <arg value="up"/>
     190            <arg value="."/>
     191        </exec>
     192        <echo>Updating ${plugin.jar} ...</echo>
     193        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     194            <env key="LANG" value="C"/>
     195            <arg value="up"/>
     196            <arg value="../dist/${plugin.jar}"/>
     197        </exec>
     198    </target>
     199    <!--
     200        ** commits the plugin.jar
     201        -->
     202    <target name="commit-dist">
     203        <echo>
     204    ***** Properties of published ${plugin.jar} *****
     205    Commit message    : '${commit.message}'
     206    Plugin-Mainversion: ${plugin.main.version}
     207    JOSM build version: ${coreversion.info.entry.revision}
     208    Plugin-Version    : ${version.entry.commit.revision}
     209    ***** / Properties of published ${plugin.jar} *****
    122210
    123                 <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
    124                         <env key="LANG" value="C"/>
    125                         <arg value="info"/>
    126                         <arg value="--xml"/>
    127                         <arg value="."/>
    128                 </exec>
    129                 <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
    130                 <delete file="REVISION"/>
    131         </target>
    132 
    133         <!--
    134     **********************************************************
    135     ** clean - clean up the build environment
    136     **********************************************************
    137     -->
    138         <target name="clean">
    139                 <delete dir="${plugin.build.dir}"/>
    140                 <delete file="${plugin.jar}"/>
    141         </target>
    142 
    143         <!--
    144     **********************************************************
    145     ** install - install the plugin in your local JOSM installation
    146     **********************************************************
    147     -->
    148         <target name="install" depends="dist">
    149                 <property environment="env"/>
    150                 <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
    151                         <and>
    152                                 <os family="windows"/>
    153                         </and>
    154                 </condition>
    155                 <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
    156         </target>
    157 
    158 
    159         <!--
    160         ************************** Publishing the plugin ***********************************
    161         -->
    162         <!--
    163                 ** extracts the JOSM release for the JOSM version in ../core and saves it in the
    164                 ** property ${coreversion.info.entry.revision}
    165                 **
    166                 -->
    167         <target name="core-info">
    168                 <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
    169                         <env key="LANG" value="C"/>
    170                         <arg value="info"/>
    171                         <arg value="--xml"/>
    172                         <arg value="../../core"/>
    173                 </exec>
    174                 <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
    175                 <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
    176                 <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
    177                 <delete file="core.info.xml" />
    178         </target>
    179 
    180         <!--
    181                 ** commits the source tree for this plugin
    182                 -->
    183         <target name="commit-current">
    184                 <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
    185                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    186                         <env key="LANG" value="C"/>
    187                         <arg value="commit"/>
    188                         <arg value="-m '${commit.message}'"/>
    189                         <arg value="."/>
    190                 </exec>
    191         </target>
    192 
    193         <!--
    194                 ** updates (svn up) the source tree for this plugin
    195                 -->
    196         <target name="update-current">
    197                 <echo>Updating plugin source ...</echo>
    198                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    199                         <env key="LANG" value="C"/>
    200                         <arg value="up"/>
    201                         <arg value="."/>
    202                 </exec>
    203                 <echo>Updating ${plugin.jar} ...</echo>
    204                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    205                         <env key="LANG" value="C"/>
    206                         <arg value="up"/>
    207                         <arg value="../dist/${plugin.jar}"/>
    208                 </exec>
    209         </target>
    210 
    211         <!--
    212                 ** commits the plugin.jar
    213                 -->
    214         <target name="commit-dist">
    215                 <echo>
    216         ***** Properties of published ${plugin.jar} *****
    217         Commit message    : '${commit.message}'
    218         Plugin-Mainversion: ${plugin.main.version}
    219         JOSM build version: ${coreversion.info.entry.revision}
    220         Plugin-Version    : ${version.entry.commit.revision}
    221         ***** / Properties of published ${plugin.jar} *****
    222 
    223         Now commiting ${plugin.jar} ...
    224         </echo>
    225                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="true" failonerror="true">
    226                         <env key="LANG" value="C"/>
    227                         <arg value="-m '${commit.message}'"/>
    228                         <arg value="commit"/>
    229                         <arg value="${plugin.jar}"/>
    230                 </exec>
    231         </target>
    232 
    233         <!-- ** make sure svn is present as a command line tool ** -->
    234         <target name="ensure-svn-present">
    235                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
    236                         <env key="LANG" value="C" />
    237                         <arg value="--version" />
    238                 </exec>
    239                 <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
    240                         <!-- return code not set at all? Most likely svn isn't installed -->
    241                         <condition>
    242                                 <not>
    243                                         <isset property="svn.exit.code" />
    244                                 </not>
    245                         </condition>
    246                 </fail>
    247                 <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
    248                         <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
    249                         <condition>
    250                                 <isfailure code="${svn.exit.code}" />
    251                         </condition>
    252                 </fail>
    253         </target>
    254 
    255         <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
    256         </target>
     211    Now commiting ${plugin.jar} ...
     212    </echo>
     213        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="true" failonerror="true">
     214            <env key="LANG" value="C"/>
     215            <arg value="-m '${commit.message}'"/>
     216            <arg value="commit"/>
     217            <arg value="${plugin.jar}"/>
     218        </exec>
     219    </target>
     220    <!-- ** make sure svn is present as a command line tool ** -->
     221    <target name="ensure-svn-present">
     222        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
     223            <env key="LANG" value="C"/>
     224            <arg value="--version"/>
     225        </exec>
     226        <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
     227            <!-- return code not set at all? Most likely svn isn't installed -->
     228            <condition>
     229                <not>
     230                    <isset property="svn.exit.code"/>
     231                </not>
     232            </condition>
     233        </fail>
     234        <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
     235            <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
     236            <condition>
     237                <isfailure code="${svn.exit.code}"/>
     238            </condition>
     239        </fail>
     240    </target>
     241    <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
     242    </target>
    257243</project>
  • applications/editors/josm/plugins/wms-turbo-challenge2/build.xml

    r25935 r26174  
     1<?xml version="1.0" encoding="utf-8"?>
    12<!--
    23** To build it run
     
    910-->
    1011<project name="wms-turbo-challenge2" default="dist" basedir=".">
    11     <property name="josm"                   location="../../core/dist/josm-custom.jar"/>
    12     <property name="plugin.build.dir"       value="build"/>
    13     <property name="plugin.src.dir"         value="src"/>
     12    <property name="josm" location="../../core/dist/josm-custom.jar"/>
     13    <property name="plugin.build.dir" value="build"/>
     14    <property name="plugin.src.dir" value="src"/>
    1415    <!-- this is the directory where the plugin jar is copied to -->
    1516    <property name="ant.build.javac.target" value="1.5"/>
    16     <property name="plugin.dist.dir"        value="../../dist"/>
    17     <property name="plugin.jar"             value="${plugin.dist.dir}/${ant.project.name}.jar"/>
    18 
     17    <property name="plugin.dist.dir" value="../../dist"/>
     18    <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/>
    1919    <!--
    2020    **********************************************************
     
    2525        <mkdir dir="${plugin.build.dir}"/>
    2626    </target>
    27 
    2827    <!--
    2928    **********************************************************
     
    3837        </javac>
    3938    </target>
    40 
    4139    <!--
    4240    **********************************************************
     
    5250            <fileset dir="images"/>
    5351        </copy>
     52        <copy todir="${plugin.build.dir}/data">
     53            <fileset dir="data"/>
     54        </copy>
    5455        <copy todir="${plugin.build.dir}">
    5556            <fileset dir=".">
    56                 <include name="README" />
    57                 <include name="LICENSE" />
     57                <include name="README"/>
     58                <include name="LICENSE"/>
    5859            </fileset>
    5960        </copy>
     
    7172        </jar>
    7273    </target>
    73 
    7474    <!--
    7575    **********************************************************
     
    8080    -->
    8181    <target name="revision">
    82 
    8382        <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
    8483            <env key="LANG" value="C"/>
     
    9089        <delete file="REVISION"/>
    9190    </target>
    92 
    9391    <!--
    9492    **********************************************************
     
    10098        <delete file="${plugin.jar}"/>
    10199    </target>
    102 
    103100    <!--
    104101    **********************************************************
  • applications/editors/josm/plugins/wms-turbo-challenge2/src/wmsturbochallenge/GameWindow.java

    r24999 r26174  
    55 */
    66package wmsturbochallenge;
     7
     8import static org.openstreetmap.josm.tools.I18n.tr;
    79
    810import java.awt.Color;
     
    3941public class GameWindow extends JFrame implements ActionListener {
    4042    public GameWindow(Layer ground) {
    41         setTitle("The Ultimate WMS Super-speed Turbo Challenge II");
     43        setTitle(tr("The Ultimate WMS Super-speed Turbo Challenge II"));
    4244        setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
    4345        setUndecorated(true);
  • applications/editors/josm/plugins/wms-turbo-challenge2/src/wmsturbochallenge/WMSRacer.java

    r23190 r26174  
    55 */
    66package wmsturbochallenge;
     7
     8import static org.openstreetmap.josm.tools.I18n.tr;
    79
    810import org.openstreetmap.josm.gui.layer.Layer;
     
    3840
    3941        public DriveAction() {
    40             super("Go driving", "wmsracer",
    41                     "Drive a race car on this layer",
     42            super(tr("Go driving"), "wmsracer",
     43                    tr("Drive a race car on this layer"),
    4244                    null, true);
    4345            setEnabled(false);
Note: See TracChangeset for help on using the changeset viewer.