Ignore:
Timestamp:
2012-01-01T15:34:54+01:00 (12 years ago)
Author:
malcolmh
Message:

'New release'

File:
1 edited

Legend:

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

    r27019 r27377  
    2828**
    2929-->
    30 <project name="smed" basedir=".">
     30<project name="SeaMapEditor" default="dist" basedir=".">
    3131    <!-- enter the SVN commit message -->
    32     <property name="commit.message" value="some new internationalized messages"/>
     32    <property name="commit.message" value="New release"/>
    3333    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    3434    <property name="plugin.main.version" value="4549"/>
    35     <!--
    36       ************************************************
    37       ** should not be necessary to change the following properties
    38      -->
     35    <!-- should not be necessary to change the following properties -->
    3936    <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="smed.dist.dir" value="dist/"/>
     37    <property name="plugin.build.dir" value="build"/>
     38    <property name="plugin.src.dir" value="src"/>
    4339    <!-- this is the directory where the plugin jar is copied to -->
    44     <property name="plugin.dist.dir" value="../../dist/"/>
    45     <property name="smed_core.dist.dir" value="core/dist/"/>
     40    <property name="plugin.dist.dir" value="../../dist"/>
    4641    <property name="ant.build.javac.target" value="1.5"/>
    47     <property name="plugin.jar" value="${plugin.dist.dir}${ant.project.name}.jar"/>
     42    <property name="plugin.dist.dir" value="../../dist"/>
     43    <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/>
    4844    <!--
    4945    **********************************************************
     
    7369    **********************************************************
    7470    -->
    75     <target name="dist" depends="compile, revision">
     71    <target name="dist" depends="compile,revision">
    7672        <echo message="creating ${ant.project.name}.jar ... "/>
    7773        <copy todir="${plugin.build.dir}/images">
     
    9490        <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
    9591            <!--
    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     -->
     92            ************************************************
     93            ** configure these properties. Most of them will be copied to the plugins
     94            ** manifest file. Property values will also show up in the list available
     95            ** plugins: http://josm.openstreetmap.de/wiki/Plugins.
     96            **
     97            ************************************************
     98            -->
    10399            <manifest>
    104100                <attribute name="Author" value="Werner, Malcolm"/>
     
    107103                <attribute name="Plugin-Description" value="Create and edit seamaps for OpenSeaMap"/>
    108104                <attribute name="Plugin-Icon" value="images/Smed.png"/>
    109                 <attribute name="Plugin-Link" value="http://openseamap.org/"/>
     105                <attribute name="Plugin-Link" value="http://openseamap.org"/>
    110106                <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
    111                 <!--
    112                 <attribute name="Plugin-Version" value="23456"/>
    113                 -->
    114107                <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
    115108            </manifest>
    116109        </jar>
    117         <!-- install interface -->
    118         <copy file="${plugin.jar}" todir="${smed_core.dist.dir}"/>
    119110    </target>
    120111    <!--
     
    133124        </exec>
    134125        <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
    135         <!--
    136126        <delete file="REVISION"/>
    137         -->
    138127    </target>
    139128    <!--
     
    158147            </and>
    159148        </condition>
    160         <delete dir="${josm.plugins.dir}/splug"/>
    161149        <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
    162150    </target>
    163151    <!--
    164         ** commits the source tree for this plugin
    165         -->
     152    ************************** Publishing the plugin ***********************************
     153    -->
     154    <!--
     155    ** extracts the JOSM release for the JOSM version in ../core and saves it in the
     156    ** property ${coreversion.info.entry.revision}
     157    -->
     158    <target name="core-info">
     159        <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
     160            <env key="LANG" value="C"/>
     161            <arg value="info"/>
     162            <arg value="--xml"/>
     163            <arg value="../../core"/>
     164        </exec>
     165        <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
     166        <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
     167        <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
     168        <delete file="core.info.xml"/>
     169    </target>
     170    <!-- commits the source tree for this plugin -->
    166171    <target name="commit-current">
    167172        <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
     
    173178        </exec>
    174179    </target>
    175     <!--
    176         ** updates (svn up) the source tree for this plugin
    177         -->
     180    <!-- updates (svn up) the source tree for this plugin -->
    178181    <target name="update-current">
    179182        <echo>Updating plugin source ...</echo>
     
    190193        </exec>
    191194    </target>
     195    <!-- commits the plugin.jar -->
     196    <target name="commit-dist">
     197        <echo>
     198    ***** Properties of published ${plugin.jar} *****
     199    Commit message    : '${commit.message}'                   
     200    Plugin-Mainversion: ${plugin.main.version}
     201    JOSM build version: ${coreversion.info.entry.revision}
     202    Plugin-Version    : ${version.entry.commit.revision}
     203    ***** / Properties of published ${plugin.jar} *****                   
     204                       
     205    Now commiting ${plugin.jar} ...
     206    </echo>
     207        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     208            <env key="LANG" value="C"/>
     209            <arg value="-m '${commit.message}'"/>
     210            <arg value="commit"/>
     211            <arg value="${plugin.jar}"/>
     212        </exec>
     213    </target>
     214    <!-- make sure svn is present as a command line tool -->
     215    <target name="ensure-svn-present">
     216        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
     217            <env key="LANG" value="C"/>
     218            <arg value="--version"/>
     219        </exec>
     220        <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
     221            <!-- return code not set at all? Most likely svn isn't installed -->
     222            <condition>
     223                <not>
     224                    <isset property="svn.exit.code"/>
     225                </not>
     226            </condition>
     227        </fail>
     228        <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
     229            <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
     230            <condition>
     231                <isfailure code="${svn.exit.code}"/>
     232            </condition>
     233        </fail>
     234    </target>
     235    <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
     236    </target>
    192237</project>
Note: See TracChangeset for help on using the changeset viewer.