Ignore:
Timestamp:
2018-08-15T13:48:45+02:00 (8 years ago)
Author:
donvip
Message:

cleanup routes plugin

Location:
applications/editors/josm/plugins/routes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/routes

    • Property svn:ignore
      •  

        old new  
        11build
        2 
        32bin
         3javadoc
  • applications/editors/josm/plugins/routes/build.xml

    r34038 r34477  
    11<?xml version="1.0" encoding="utf-8"?>
    22<project name="routes" default="dist" basedir=".">
     3    <!-- enter the SVN commit message -->
    34    <property name="commit.message" value="Changed the constructor signature of the plugin main class"/>
    4     <property name="plugin.main.version" value="13007"/>
    5     <property name="josm" location="../../core/dist/josm-custom.jar"/>
    6     <property name="plugin.dist.dir" value="../../dist"/>
    7     <property name="plugin.build.dir" value="build"/>
    8     <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/>
    9     <property name="ant.build.javac.target" value="1.8"/>
    10     <target name="init">
    11         <mkdir dir="${plugin.build.dir}"/>
    12     </target>
    13     <target name="compile" depends="init">
    14         <echo message="creating ${plugin.jar}"/>
    15         <javac srcdir="src" debug="true" destdir="${plugin.build.dir}" includeantruntime="false">
    16             <compilerarg value="-Xlint:deprecation"/>
    17             <compilerarg value="-Xlint:unchecked"/>
    18             <classpath>
    19                 <pathelement location="${josm}"/>
    20                 <fileset dir="lib">
    21                     <include name="**/*.jar"/>
    22                 </fileset>
    23             </classpath>
    24         </javac>
    25         <copy file="src/org/openstreetmap/josm/plugins/routes/xml/routes.xml" todir="${plugin.build.dir}/org/openstreetmap/josm/plugins/routes/xml"/>
    26         <copy file="src/org/openstreetmap/josm/plugins/routes/xml/routes.xsd" todir="${plugin.build.dir}/org/openstreetmap/josm/plugins/routes/xml"/>
    27     </target>
    28     <target name="dist" depends="compile,revision">
    29         <copy todir="${plugin.build.dir}/data">
    30             <fileset dir="data"/>
    31         </copy>
    32         <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}" manifestencoding="UTF-8">
    33             <manifest>
    34                 <attribute name="Author" value="Jiri Klement"/>
    35                 <attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.routes.RoutesPlugin"/>
    36                 <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
    37                 <attribute name="Plugin-Description" value="Renders routes (bus, hiking trails, bicycle routes, ..). Route types must be defined in routes.xml file in plugin directory"/>
    38                 <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
    39                 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
    40             </manifest>
    41         </jar>
    42     </target>
    43     <target name="test"/>
    44     <target name="checkstyle"/>
    45     <target name="spotbugs"/>
    46     <target name="javadoc"/>
    47     <target name="revision">
    48         <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
    49             <env key="LANG" value="C"/>
    50             <arg value="info"/>
    51             <arg value="--xml"/>
    52             <arg value="."/>
    53         </exec>
    54         <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
    55         <delete file="REVISION"/>
    56     </target>
    57     <target name="clean">
    58         <delete dir="${plugin.build.dir}"/>
    59         <delete file="${plugin.jar}"/>
    60     </target>
    61     <target name="install" depends="dist">
    62         <property environment="env"/>
    63         <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
    64             <and>
    65                 <os family="windows"/>
    66             </and>
    67         </condition>
    68         <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
    69     </target>
    70     <!--
    71          ************************** Publishing the plugin ***********************************
    72         -->
    73     <!--
    74         ** extracts the JOSM release for the JOSM version in ../core and saves it in the
    75         ** property ${coreversion.info.entry.revision}
    76         **
    77         -->
    78     <target name="core-info">
    79         <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
    80             <env key="LANG" value="C"/>
    81             <arg value="info"/>
    82             <arg value="--xml"/>
    83             <arg value="../../core"/>
    84         </exec>
    85         <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
    86         <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
    87         <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
    88         <delete file="core.info.xml"/>
    89     </target>
    90     <!--
    91         ** commits the source tree for this plugin
    92         -->
    93     <target name="commit-current">
    94         <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
    95         <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    96             <env key="LANG" value="C"/>
    97             <arg value="commit"/>
    98             <arg value="-m '${commit.message}'"/>
    99             <arg value="."/>
     5    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
     6    <property name="plugin.main.version" value="14153"/>
     7
     8    <!-- Configure these properties (replace "..." accordingly).
     9         See https://josm.openstreetmap.de/wiki/DevelopersGuide/DevelopingPlugins
     10    -->
     11    <property name="plugin.author" value="Jiri Klement"/>
     12    <property name="plugin.class" value="org.openstreetmap.josm.plugins.routes.RoutesPlugin"/>
     13    <property name="plugin.description" value="Renders routes (bus, hiking trails, bicycle routes, ..). Route types must be defined in routes.xml file in plugin directory"/>
     14    <!--<property name="plugin.icon" value="..."/>-->
     15    <!--<property name="plugin.link" value="..."/>-->
     16    <!--<property name="plugin.early" value="..."/>-->
     17    <property name="plugin.requires" value="jaxb"/>
     18    <!--<property name="plugin.stage" value="..."/>-->
     19
     20    <!-- ** include targets that all plugins have in common ** -->
     21    <import file="../build-common.xml"/>
     22
     23    <target name="pre-compile" depends="-jaxb_linux, -jaxb_windows" unless="jaxb.notRequired">
     24        <exec executable="${xjc}" failonerror="true">
     25            <arg value="-d"/>
     26            <arg value="src"/>
     27            <arg value="-p"/>
     28            <arg value="org.openstreetmap.josm.plugins.routes.xml"/>
     29            <arg value="-encoding"/>
     30            <arg value="UTF-8"/>
     31            <arg value="resources/org/openstreetmap/josm/plugins/routes/xml/routes.xsd"/>
    10032        </exec>
    10133    </target>
    102     <!--
    103         ** updates (svn up) the source tree for this plugin
    104         -->
    105     <target name="update-current">
    106         <echo>Updating plugin source ...</echo>
    107         <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    108             <env key="LANG" value="C"/>
    109             <arg value="up"/>
    110             <arg value="."/>
    111         </exec>
    112         <echo>Updating ${plugin.jar} ...</echo>
    113         <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    114             <env key="LANG" value="C"/>
    115             <arg value="up"/>
    116             <arg value="../dist/${plugin.jar}"/>
    117         </exec>
    118     </target>
    119     <!--
    120         ** commits the plugin.jar
    121         -->
    122     <target name="commit-dist">
    123         <echo>
    124     ***** Properties of published ${plugin.jar} *****
    125     Commit message    : '${commit.message}'
    126     Plugin-Mainversion: ${plugin.main.version}
    127     JOSM build version: ${coreversion.info.entry.revision}
    128     Plugin-Version    : ${version.entry.commit.revision}
    129     ***** / Properties of published ${plugin.jar} *****
    13034
    131     Now commiting ${plugin.jar} ...
    132     </echo>
    133         <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    134             <env key="LANG" value="C"/>
    135             <arg value="-m '${commit.message}'"/>
    136             <arg value="commit"/>
    137             <arg value="${plugin.jar}"/>
    138         </exec>
    139     </target>
    140     <!-- ** make sure svn is present as a command line tool ** -->
    141     <target name="ensure-svn-present">
    142         <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
    143             <env key="LANG" value="C"/>
    144             <arg value="--version"/>
    145         </exec>
    146         <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
    147             <!-- return code not set at all? Most likely svn isn't installed -->
    148             <condition>
    149                 <not>
    150                     <isset property="svn.exit.code"/>
    151                 </not>
    152             </condition>
    153         </fail>
    154         <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
    155             <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
    156             <condition>
    157                 <isfailure code="${svn.exit.code}"/>
    158             </condition>
    159         </fail>
    160     </target>
    161     <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
    162     </target>
    16335</project>
Note: See TracChangeset for help on using the changeset viewer.