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/junctionchecking
Files:
29 added
1 edited

Legend:

Unmodified
Added
Removed
  • 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>
Note: See TracChangeset for help on using the changeset viewer.