Changeset 30070 in osm


Ignore:
Timestamp:
2013-11-20T20:11:02+01:00 (11 years ago)
Author:
donvip
Message:

[josm_tageditor] update build.xml

File:
1 edited

Legend:

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

    r30055 r30070  
    33    <property name="commit.message" value="Tageditor:  help shortcut parser, rebuild"/>
    44    <property name="plugin.main.version" value="6316"/>
    5     <!--
    6       ************************************************
    7       ** should not be necessary to change the following properties
    8      -->
    9     <property name="josm" location="../../core/dist/josm-custom.jar"/>
    10     <property name="plugin.build.dir" value="build"/>
    11     <property name="plugin.src.dir" value="src"/>
    12     <!-- this is the directory where the plugin jar is copied to -->
    13     <property name="plugin.dist.dir" value="../../dist"/>
    14     <property name="ant.build.javac.target" value="1.6"/>
    15     <property name="plugin.dist.dir" value="../../dist"/>
    16     <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/>
    17     <!--
    18     **********************************************************
    19     ** init - initializes the build
    20     **********************************************************
    21     -->
    22     <target name="init">
    23         <mkdir dir="${plugin.build.dir}"/>
    24     </target>
    25     <!--
    26     **********************************************************
    27     ** compile - complies the source tree
    28     **********************************************************
    29     -->
    30     <target name="compile" depends="init">
    31         <echo message="compiling sources for  ${plugin.jar} ... "/>
    32         <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}">
    33             <compilerarg value="-Xlint:deprecation"/>
    34             <compilerarg value="-Xlint:unchecked"/>
    35         </javac>
    36     </target>
    37     <!--
    38     **********************************************************
    39     ** dist - creates the plugin jar
    40     **********************************************************
    41     -->
    42     <target name="dist" depends="compile,revision">
    43         <echo message="creating ${plugin.jar} for version ${version.entry.commit.revision} ... "/>
    44         <copy todir="${plugin.build.dir}/resources">
    45             <fileset dir="resources"/>
    46         </copy>
    47         <copy todir="${plugin.build.dir}/data">
    48             <fileset dir="data"/>
    49         </copy>
    50         <copy todir="${plugin.build.dir}">
    51             <fileset dir=".">
    52                 <include name="README"/>
    53                 <include name="LICENSE"/>
    54             </fileset>
    55         </copy>
    56         <copy todir="${plugin.build.dir}">
    57             <fileset dir="${plugin.src.dir}">
    58                 <include name="**/*.dtd"/>
    59             </fileset>
    60         </copy>
    61         <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
    62             <manifest>
    63                 <attribute name="Author" value="Karl Guggisberg"/>
    64                 <attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.tageditor.TagEditorPlugin"/>
    65                 <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
    66                 <attribute name="Plugin-Description" value="Provides a dialog for editing tags in a tabular grid."/>
    67                 <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/index.php/JOSM/Plugins/TagEditor"/>
    68                 <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
    69                 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
    70             </manifest>
    71         </jar>
    72     </target>
    73     <!--
    74     **********************************************************
    75     ** revision - extracts the current revision number for the
    76     **    file build.number and stores it in the XML property
    77     **    version.*
    78     **********************************************************
    79     -->
    80     <target name="revision">
    81         <!-- extract the SVN revision information  -->
    82         <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
    83             <env key="LANG" value="C"/>
    84             <arg value="info"/>
    85             <arg value="--xml"/>
    86             <arg value="."/>
    87         </exec>
    88         <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
    89         <delete file="REVISION"/>
    90     </target>
    91     <!--
    92     **********************************************************
    93     ** clean - clean up the build environment
    94     **********************************************************
    95     -->
    96     <target name="clean">
    97         <delete dir="${plugin.build.dir}"/>
    98         <delete file="${plugin.jar}"/>
    99     </target>
    100     <!--
    101     **********************************************************
    102     ** install - install the plugin in your local JOSM installation
    103     **********************************************************
    104     -->
    105     <target name="install" depends="dist">
    106         <property environment="env"/>
    107         <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
    108             <and>
    109                 <os family="windows"/>
    110             </and>
    111         </condition>
    112         <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
    113     </target>
    114     <!--
    115      ************************** Publishing the plugin ***********************************
    116     -->
    117     <!--
    118     ** extracts the JOSM release for the JOSM version in ../core and saves it in the
    119     ** property ${coreversion.info.entry.revision}
    120     **
    121     -->
    122     <target name="core-info">
    123         <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
    124             <env key="LANG" value="C"/>
    125             <arg value="info"/>
    126             <arg value="--xml"/>
    127             <arg value="../../core"/>
    128         </exec>
    129         <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
    130         <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
    131         <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
    132         <delete file="core.info.xml"/>
    133     </target>
    134     <!--
    135     ** commits the source tree for this plugin
    136     -->
    137     <target name="commit-current">
    138         <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
    139         <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    140             <env key="LANG" value="C"/>
    141             <arg value="commit"/>
    142             <arg value="-m '${commit.message}'"/>
    143             <arg value="."/>
    144         </exec>
    145     </target>
    146     <!--
    147     ** updates (svn up) the source tree for this plugin
    148     -->
    149     <target name="update-current">
    150         <echo>Updating plugin source ...</echo>
    151         <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    152             <env key="LANG" value="C"/>
    153             <arg value="up"/>
    154             <arg value="."/>
    155         </exec>
    156         <echo>Updating ${plugin.jar} ...</echo>
    157         <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    158             <env key="LANG" value="C"/>
    159             <arg value="up"/>
    160             <arg value="../dist/${plugin.jar}"/>
    161         </exec>
    162     </target>
    163     <!--
    164     ** commits the plugin.jar
    165     -->
    166     <target name="commit-dist">
    167         <echo>
    168 ***** Properties of published ${plugin.jar} *****
    169 Commit message    : '${commit.message}'                 
    170 Plugin-Mainversion: ${plugin.main.version}
    171 JOSM build version: ${coreversion.info.entry.revision}
    172 Plugin-Version    : ${version.entry.commit.revision}
    173 ***** / Properties of published ${plugin.jar} *****                 
    174                    
    175 Now commiting ${plugin.jar} ...
    176 </echo>
    177         <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    178             <env key="LANG" value="C"/>
    179             <arg value="-m '${commit.message}'"/>
    180             <arg value="commit"/>
    181             <arg value="${plugin.jar}"/>
    182         </exec>
    183     </target>
    184     <!-- ** make sure svn is present as a command line tool ** -->
    185     <target name="ensure-svn-present">
    186         <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
    187             <env key="LANG" value="C"/>
    188             <arg value="--version"/>
    189         </exec>
    190         <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
    191             <!-- return code not set at all? Most likely svn isn't installed -->
    192             <condition>
    193                 <not>
    194                     <isset property="svn.exit.code"/>
    195                 </not>
    196             </condition>
    197         </fail>
    198         <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
    199             <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
    200             <condition>
    201                 <isfailure code="${svn.exit.code}"/>
    202             </condition>
    203         </fail>
    204     </target>
    205     <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
    206     </target>
     5   
     6        <property name="plugin.author" value="Karl Guggisberg"/>
     7    <property name="plugin.class" value="org.openstreetmap.josm.plugins.tageditor.TagEditorPlugin"/>
     8    <property name="plugin.description" value="Provides a dialog for editing tags in a tabular grid."/>
     9    <property name="plugin.link" value="http://wiki.openstreetmap.org/index.php/JOSM/Plugins/TagEditor"/>
     10
     11    <!-- ** include targets that all plugins have in common ** -->
     12    <import file="../build-common.xml"/>
     13
    20714</project>
Note: See TracChangeset for help on using the changeset viewer.