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/trustosm
Files:
31 added
1 edited

Legend:

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