Ignore:
Timestamp:
2009-04-08T11:53:12+02:00 (15 years ago)
Author:
guggis
Message:

update build.xml

Location:
applications/editors/josm/plugins/tageditor
Files:
1 edited
1 copied

Legend:

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

    r14421 r14429  
    11<?xml version="1.0" encoding="UTF-8"?>
     2<!--
     3** This is a template build file for a JOSM  plugin.
     4**
     5** Maintaining versions
     6** ====================
     7** see README.template
     8**
     9** Usage
     10** =====
     11** To build it run
     12**
     13**    > ant  dist
     14**
     15** To install the generated plugin locally (in you default plugin directory) run
     16**
     17**    > ant  install
     18**
     19** The generated plugin jar is not automatically available in JOSMs plugin configuration
     20** dialog. You have to check it in first. To check in run
     21**
     22**   > ant publish
     23**
     24-->
     25<project name="tageditor" default="dist" basedir=".">
     26       
    227
    3 <project name="tageditor" default="dist" basedir=".">
    4     <property name="josm"                   location="../../core/dist/josm-custom.jar"/>
     28        <!--
     29                ************************************************
     30                ** configure these properties. Most of them will be copied to the plugins
     31                ** manifest file. Property values will also show up in the list available
     32                ** plugins: http://josm.openstreetmap.de/wiki/Plugins.
     33                **
     34                ************************************************   
     35        -->
     36        <property name="plugin.author"          value="Karl Guggisberg"/>
     37        <property name="plugin.class"           value="org.openstreetmap.josm.plugins.tageditor.TagEditorPlugin"/>
     38        <property name="plugin.description"     value="Provides a dialog for editing tags in a tabular grid."/>
     39        <property name="plugin.doc.url"         value="http://wiki.openstreetmap.org/index.php/JOSM/Plugins/TagEditor"/>
     40        <property name="plugin.main.version"    value="0.7"/>   
     41    <property name="plugin.jar.name"        value="${ant.project.name}.jar"/>
     42       
     43   
     44        <!--
     45          ************************************************
     46          ** should not be necessary to change the following properties   
     47         -->
     48        <property name="josm"                   location="../../core/dist/josm-custom.jar"/>
     49        <property name="plugin.build.dir"       value="build"/>
     50        <property name="plugin.src.dir"         value="src"/>
     51        <!-- this is the directory where the plugin jar is copied to -->
    552    <property name="plugin.dist.dir"        value="../../dist"/>
    6     <property name="plugin.build.dir"       value="build"/>
    7         <property name="plugin.src.dir"         value="src"/>
    8     <property name="plugin.jar"             value="${plugin.dist.dir}/${ant.project.name}.jar"/>
    9     <property name="ant.build.javac.target" value="1.5"/>
    10                
     53        <property name="ant.build.javac.target" value="1.5"/>
     54        <property name="plugin.dist.dir"        value="../../dist"/>           
     55        <property name="plugin.jar"             value="${plugin.dist.dir}/${plugin.jar.name}"/>
     56       
     57        <!--
     58        **********************************************************
     59        ** init - initializes the build
     60        **********************************************************
     61        -->
    1162    <target name="init">
    1263        <!-- make sure we increment the build number ... -->
     
    1869            <arg value="commit"/>
    1970                <arg value="--message"/>
    20             <arg value="inc build number"/>
     71            <arg value="increment build number"/>
    2172            <arg value="build.number"/>
    2273                </exec>
    2374        <mkdir dir="${plugin.build.dir}"/>
    2475    </target>
     76       
     77        <!--
     78        **********************************************************
     79        ** compile - complies the source tree
     80        **********************************************************
     81        -->     
    2582    <target name="compile" depends="init">
    26         <echo message="creating ${plugin.jar}"/>
     83        <echo message="compiling sources for  ${plugin.jar.name} ... "/>
    2784        <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}">
    2885            <compilerarg value="-Xlint:deprecation"/>
     
    3087        </javac>
    3188    </target>
    32     <target name="dist" depends="compile,revision">
    33         <copy todir="${plugin.build.dir}/resources">
     89
     90        <!--
     91        **********************************************************
     92        ** dist - creates the plugin jar
     93        **********************************************************
     94        -->     
     95        <target name="dist" depends="compile,revision">
     96        <echo message="creating ${plugin.jar.name} ... "/>
     97                <copy todir="${plugin.build.dir}/resources">
    3498            <fileset dir="resources"/>
     99        </copy>
     100                <copy todir="${plugin.build.dir}">
     101            <fileset dir=".">
     102                <include name="README" />
     103                <include name="LICENSE" />
     104            </fileset>
    35105        </copy>
    36106        <copy todir="${plugin.build.dir}">
     
    39109                </fileset>                             
    40110        </copy>
    41         <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
     111        <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
    42112            <manifest>
    43                 <attribute name="Author" value="Karl Guggisberg"/>
    44                 <attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.tageditor.TagEditorPlugin"/>
     113                <attribute name="Author" value="${plugin.author}"/>
     114                <attribute name="Plugin-Class" value="${plugin.class}"/>
    45115                <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
    46                 <attribute name="Plugin-Description" value="Provides a dialog for editing tags in a tabular grid."/>
    47                 <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/index.php/JOSM/Plugins/TagEditor"/>
    48                 <attribute name="Plugin-Mainversion" value="1504"/>
     116                <attribute name="Plugin-Description" value="${plugin.description}"/>
     117                <attribute name="Plugin-Link" value="${plugin.doc.url}"/>
     118                <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
    49119                <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
    50120            </manifest>
    51121        </jar>
    52122    </target>
     123       
     124        <!--
     125        **********************************************************
     126        ** revision - extracts the current revision number for the
     127        **    file build.number and stores it in the XML property
     128        **    version.*
     129        **********************************************************
     130        -->     
    53131    <target name="revision">
    54132       
     
    63141        <delete file="REVISION"/>
    64142    </target>
     143       
     144        <!--
     145        **********************************************************
     146        ** clean - clean up the build environment
     147        **********************************************************
     148        -->             
    65149    <target name="clean">
    66150        <delete dir="${plugin.build.dir}"/>
    67151        <delete file="${plugin.jar}"/>
    68152    </target>
    69     <target name="install" depends="dist">
     153   
     154        <!--
     155        **********************************************************
     156        ** install - install the plugin in your local JOSM installation
     157        **********************************************************
     158        -->                     
     159        <target name="install" depends="dist">
    70160        <property environment="env"/>
    71161        <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
     
    77167    </target>
    78168       
    79         <target name="commit">
     169        <!--
     170        **********************************************************
     171        ** publish - publish the plugin jar
     172        **********************************************************
     173        -->                     
     174        <target name="publish">
    80175        <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
    81176            <env key="LANG" value="C"/>
     
    83178                <arg value="--message"/>
    84179            <arg value="manual build"/>
    85             <arg value="../../dist/tageditor.jar"/>
     180            <arg value="${plugin.jar}"/>
    86181                </exec>
    87182        </target>
Note: See TracChangeset for help on using the changeset viewer.