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

Legend:

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