Ignore:
Timestamp:
2012-01-13T23:27:36+01:00 (13 years ago)
Author:
malcolmh
Message:

save

File:
1 edited

Legend:

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

    r27383 r27440  
    2828**
    2929-->
    30 <project name="SeaMapEditor" default="dist" basedir=".">
     30<project name="SeaMapEditor" basedir=".">
    3131    <!-- enter the SVN commit message -->
    32     <property name="commit.message" value="New release"/>
     32    <property name="commit.message" value="some new internationalized messages"/>
    3333    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    3434    <property name="plugin.main.version" value="4549"/>
    35     <!-- should not be necessary to change the following properties -->
     35    <!--
     36      ************************************************
     37      ** should not be necessary to change the following properties
     38     -->
    3639    <property name="josm" location="../../core/dist/josm-custom.jar"/>
    37     <property name="plugin.build.dir" value="build"/>
    38     <property name="plugin.src.dir" value="src"/>
     40    <property name="plugin.build.dir" value="build/"/>
     41    <property name="plugin.src.dir" value="src/"/>
    3942    <property name="smed.dist.dir" value="dist/"/>
    40     <property name="smed_core.dist.dir" value="core/dist/"/>
    4143    <!-- this is the directory where the plugin jar is copied to -->
    42     <property name="plugin.dist.dir" value="../../dist"/>
     44    <property name="plugin.dist.dir" value="../../dist/"/>
    4345    <property name="smed_core.dist.dir" value="core/dist/"/>
    4446    <property name="ant.build.javac.target" value="1.5"/>
    45     <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/>
     47    <property name="plugin.jar" value="${plugin.dist.dir}${ant.project.name}.jar"/>
    4648    <!--
    4749    **********************************************************
     
    7173    **********************************************************
    7274    -->
    73     <target name="dist" depends="compile,revision">
     75    <target name="dist" depends="compile, revision">
    7476        <echo message="creating ${ant.project.name}.jar ... "/>
    7577        <copy todir="${plugin.build.dir}/images">
     
    9294        <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
    9395            <!--
    94             ************************************************
    95             ** configure these properties. Most of them will be copied to the plugins
    96             ** manifest file. Property values will also show up in the list available
    97             ** plugins: http://josm.openstreetmap.de/wiki/Plugins.
    98             **
    99             ************************************************
    100             -->
     96        ************************************************
     97        ** configure these properties. Most of them will be copied to the plugins
     98        ** manifest file. Property values will also show up in the list available
     99        ** plugins: http://josm.openstreetmap.de/wiki/Plugins.
     100        **
     101        ************************************************
     102    -->
    101103            <manifest>
    102104                <attribute name="Author" value="Werner, Malcolm"/>
     
    105107                <attribute name="Plugin-Description" value="Create and edit seamaps for OpenSeaMap"/>
    106108                <attribute name="Plugin-Icon" value="images/Smed.png"/>
    107                 <attribute name="Plugin-Link" value="http://openseamap.org"/>
     109                <attribute name="Plugin-Link" value="http://openseamap.org/"/>
    108110                <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
     111                <!--
     112                <attribute name="Plugin-Version" value="23456"/>
     113                -->
    109114                <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
    110115            </manifest>
    111116        </jar>
     117        <!-- install interface -->
     118        <copy file="${plugin.jar}" todir="${smed_core.dist.dir}"/>
    112119    </target>
    113120    <!--
     
    126133        </exec>
    127134        <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
     135        <!--
    128136        <delete file="REVISION"/>
     137        -->
    129138    </target>
    130139    <!--
     
    153162    </target>
    154163    <!--
    155     ************************** Publishing the plugin ***********************************
    156     -->
    157     <!--
    158     ** extracts the JOSM release for the JOSM version in ../core and saves it in the
    159     ** property ${coreversion.info.entry.revision}
    160     -->
    161     <target name="core-info">
    162         <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
    163             <env key="LANG" value="C"/>
    164             <arg value="info"/>
    165             <arg value="--xml"/>
    166             <arg value="../../core"/>
    167         </exec>
    168         <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
    169         <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
    170         <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
    171         <delete file="core.info.xml"/>
    172     </target>
    173     <!-- commits the source tree for this plugin -->
     164        ** commits the source tree for this plugin
     165        -->
    174166    <target name="commit-current">
    175167        <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
     
    181173        </exec>
    182174    </target>
    183     <!-- updates (svn up) the source tree for this plugin -->
     175    <!--
     176        ** updates (svn up) the source tree for this plugin
     177        -->
    184178    <target name="update-current">
    185179        <echo>Updating plugin source ...</echo>
     
    196190        </exec>
    197191    </target>
    198     <!-- commits the plugin.jar -->
    199     <target name="commit-dist">
    200         <echo>
    201     ***** Properties of published ${plugin.jar} *****
    202     Commit message    : '${commit.message}'                   
    203     Plugin-Mainversion: ${plugin.main.version}
    204     JOSM build version: ${coreversion.info.entry.revision}
    205     Plugin-Version    : ${version.entry.commit.revision}
    206     ***** / Properties of published ${plugin.jar} *****                   
    207                        
    208     Now commiting ${plugin.jar} ...
    209     </echo>
    210         <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    211             <env key="LANG" value="C"/>
    212             <arg value="-m '${commit.message}'"/>
    213             <arg value="commit"/>
    214             <arg value="${plugin.jar}"/>
    215         </exec>
    216     </target>
    217     <!-- make sure svn is present as a command line tool -->
    218     <target name="ensure-svn-present">
    219         <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
    220             <env key="LANG" value="C"/>
    221             <arg value="--version"/>
    222         </exec>
    223         <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
    224             <!-- return code not set at all? Most likely svn isn't installed -->
    225             <condition>
    226                 <not>
    227                     <isset property="svn.exit.code"/>
    228                 </not>
    229             </condition>
    230         </fail>
    231         <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
    232             <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
    233             <condition>
    234                 <isfailure code="${svn.exit.code}"/>
    235             </condition>
    236         </fail>
    237     </target>
    238     <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
    239     </target>
    240192</project>
Note: See TracChangeset for help on using the changeset viewer.