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

i18n update, split plugin and core translation

Location:
applications/editors/josm/plugins/ImportImagePlugin
Files:
15 added
1 edited

Legend:

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