Changeset 29351 in osm


Ignore:
Timestamp:
2013-03-07T22:10:13+01:00 (11 years ago)
Author:
stoecker
Message:

fix deprecations, cleanup some more build.xml's

Location:
applications/editors/josm/plugins
Files:
11 edited
3 moved

Legend:

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

    r27863 r29351  
    11<?xml version="1.0" encoding="utf-8"?>
    22<!--
    3 ** This is the build file for the colorscheme plugin
     3** This is a template build file for a JOSM  plugin.
    44**
    55** Maintaining versions
    66** ====================
    7 ** see README.template
     7** See README.template
    88**
    99** Usage
    1010** =====
    11 ** To build it run
    12 **
    13 **    > ant  dist
    14 **
    15 ** To install the generated plugin locally (in your default plugin directory) run
    16 **
    17 **    > ant  install
    18 **
    19 ** To build against the core in ../../core, create a correct manifest and deploy to
    20 ** SVN,
    21 **    set the properties commit.message and plugin.main.version
    22 ** and run
    23 **    > ant  publish
    24 **
     11** Call "ant help" to get possible build targets.
    2512**
    2613-->
    2714<project name="colorscheme" default="dist" basedir=".">
     15
     16    <!-- enter the SVN commit message -->
    2817    <property name="commit.message" value="Uses new constructor for Plugin"/>
    29     <property name="plugin.main.version" value="4968"/>
    30     <property name="josm" location="../../core/dist/josm-custom.jar"/>
    31     <property name="plugin.dist.dir" value="../../dist"/>
    32     <property name="plugin.build.dir" value="build"/>
    33     <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/>
    34     <property name="ant.build.javac.target" value="1.5"/>
    35     <target name="init">
    36         <mkdir dir="${plugin.build.dir}"/>
    37     </target>
    38     <target name="compile" depends="init">
    39         <echo message="creating ${plugin.jar}"/>
    40         <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}">
    41             <compilerarg value="-Xlint:deprecation"/>
    42             <compilerarg value="-Xlint:unchecked"/>
    43         </javac>
    44     </target>
    45     <target name="dist" depends="compile,revision">
    46         <copy todir="${plugin.build.dir}">
    47             <fileset dir="src">
    48                 <include name="*.xml"/>
    49             </fileset>
    50         </copy>
    51         <copy todir="${plugin.build.dir}/data">
    52             <fileset dir="data"/>
    53         </copy>
    54         <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
    55             <manifest>
    56                 <attribute name="Author" value="Christof Dallermassl"/>
    57                 <attribute name="Plugin-Class" value="at.dallermassl.josm.plugin.colorscheme.ColorSchemePlugin"/>
    58                 <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
    59                 <attribute name="Plugin-Description" value="Allows the user to create different color schemes and to switch between them. Just change the colors and create a new scheme. Used to switch to a white background with matching colors for better visibility in bright sunlight. See dialog in preferences and ''Map Settings'' (strange but true :-)"/>
    60                 <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
    61                 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
    62             </manifest>
    63         </jar>
    64     </target>
    65     <target name="revision">
    66         <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
    67             <env key="LANG" value="C"/>
    68             <arg value="info"/>
    69             <arg value="--xml"/>
    70             <arg value="."/>
    71         </exec>
    72         <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
    73         <delete file="REVISION"/>
    74     </target>
    75     <target name="clean">
    76         <delete dir="${plugin.build.dir}"/>
    77         <delete file="${plugin.jar}"/>
    78     </target>
    79     <target name="install" depends="dist">
    80         <property environment="env"/>
    81         <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
    82             <and>
    83                 <os family="windows"/>
    84             </and>
    85         </condition>
    86         <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
    87     </target>
    88     <!--
    89      ************************** Publishing the plugin ***********************************
    90     -->
    91     <!--
    92     ** extracts the JOSM release for the JOSM version in ../core and saves it in the
    93     ** property ${coreversion.info.entry.revision}
    94     **
    95     -->
    96     <target name="core-info">
    97         <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
    98             <env key="LANG" value="C"/>
    99             <arg value="info"/>
    100             <arg value="--xml"/>
    101             <arg value="../../core"/>
    102         </exec>
    103         <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
    104         <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
    105         <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
    106         <delete file="core.info.xml"/>
    107     </target>
    108     <!--
    109     ** commits the source tree for this plugin
    110     -->
    111     <target name="commit-current">
    112         <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
    113         <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    114             <env key="LANG" value="C"/>
    115             <arg value="commit"/>
    116             <arg value="-m '${commit.message}'"/>
    117             <arg value="."/>
    118         </exec>
    119     </target>
    120     <!--
    121     ** updates (svn up) the source tree for this plugin
    122     -->
    123     <target name="update-current">
    124         <echo>Updating plugin source ...</echo>
    125         <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    126             <env key="LANG" value="C"/>
    127             <arg value="up"/>
    128             <arg value="."/>
    129         </exec>
    130         <echo>Updating ${plugin.jar} ...</echo>
    131         <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    132             <env key="LANG" value="C"/>
    133             <arg value="up"/>
    134             <arg value="../dist/${plugin.jar}"/>
    135         </exec>
    136     </target>
    137     <!--
    138     ** commits the plugin.jar
    139     -->
    140     <target name="commit-dist">
    141         <echo>
    142 ***** Properties of published ${plugin.jar} *****
    143 Commit message    : '${commit.message}'
    144 Plugin-Mainversion: ${plugin.main.version}
    145 JOSM build version: ${coreversion.info.entry.revision}
    146 Plugin-Version    : ${version.entry.commit.revision}
    147 ***** / Properties of published ${plugin.jar} *****
     18    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
     19    <property name="plugin.main.version" value="5631"/>
    14820
    149 Now commiting ${plugin.jar} ...
    150 </echo>
    151         <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    152             <env key="LANG" value="C"/>
    153             <arg value="-m '${commit.message}'"/>
    154             <arg value="commit"/>
    155             <arg value="${plugin.jar}"/>
    156         </exec>
    157     </target>
    158     <!-- ** make sure svn is present as a command line tool ** -->
    159     <target name="ensure-svn-present">
    160         <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
    161             <env key="LANG" value="C"/>
    162             <arg value="--version"/>
    163         </exec>
    164         <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
    165             <!-- return code not set at all? Most likely svn isn't installed -->
    166             <condition>
    167                 <not>
    168                     <isset property="svn.exit.code"/>
    169                 </not>
    170             </condition>
    171         </fail>
    172         <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
    173             <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
    174             <condition>
    175                 <isfailure code="${svn.exit.code}"/>
    176             </condition>
    177         </fail>
    178     </target>
    179     <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
    180     </target>
     21    <property name="plugin.author" value="Christof Dallermassl"/>
     22    <property name="plugin.class" value="at.dallermassl.josm.plugin.colorscheme.ColorSchemePlugin"/>
     23    <property name="plugin.description" value="Allows the user to create different color schemes and to switch between them. Just change the colors and create a new scheme. Used to switch to a white background with matching colors for better visibility in bright sunlight. See dialog in display preferences."/>
     24
     25    <!-- ** include targets that all plugins have in common ** -->
     26    <import file="../build-common.xml"/>
     27
    18128</project>
  • applications/editors/josm/plugins/colorscheme/src/at/dallermassl/josm/plugin/colorscheme/ColorSchemePreference.java

    r27863 r29351  
    128128        JScrollPane scrollpane = new JScrollPane(panel);
    129129        scrollpane.setBorder(BorderFactory.createEmptyBorder( 0, 0, 0, 0 ));
    130         gui.getDisplayPreference().displaycontent.addTab(tr("Color Schemes"), scrollpane);
     130        gui.getDisplayPreference().getTabPane().addTab(tr("Color Schemes"), scrollpane);
    131131    }
    132132
  • applications/editors/josm/plugins/osmarender/build.xml

    r27857 r29351  
    11<?xml version="1.0" encoding="utf-8"?>
    22<!--
    3 ** This is a template build file for the osmarender plugin
     3** This is a template build file for a JOSM  plugin.
    44**
    55** Maintaining versions
    66** ====================
    7 ** see README.template
     7** See README.template
    88**
    99** Usage
    1010** =====
    11 ** To build it run
    12 **
    13 **    > ant  dist
    14 **
    15 ** To install the generated plugin locally (in your default plugin directory) run
    16 **
    17 **    > ant  install
    18 **
    19 ** To build against the core in ../../core, create a correct manifest and deploy to
    20 ** SVN,
    21 **    set the properties commit.message and plugin.main.version
    22 ** and run
    23 **    > ant  publish
    24 **
     11** Call "ant help" to get possible build targets.
    2512**
    2613-->
    2714<project name="osmarender" default="install" basedir=".">
    28     <property name="josm" location="../../core/dist/josm-custom.jar"/>
    29     <property name="plugin.dist.dir" value="../../dist"/>
    30     <property name="plugin.build.dir" value="build"/>
    31     <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/>
    32     <property name="ant.build.javac.target" value="1.5"/>
     15
     16    <!-- enter the SVN commit message -->
     17    <property name="commit.message" value="Fixed #4360 - osmarender plugin does not load"/>
     18    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
     19    <property name="plugin.main.version" value="5631"/>
     20
    3321    <property name="stylesheets" location="./stylesheets"/>
    3422    <property name="xslt" location="./xslt"/>
    35     <property name="commit.message" value="Fixed #4360 - osmarender plugin does not load"/>
    36     <property name="plugin.main.version" value="4968"/>
    37     <target name="init">
    38         <mkdir dir="${plugin.build.dir}"/>
    39     </target>
    40     <target name="compile" depends="init">
    41         <echo message="creating ${plugin.jar}"/>
    42         <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}">
    43             <compilerarg value="-Xlint:deprecation"/>
    44             <compilerarg value="-Xlint:unchecked"/>
    45         </javac>
    46     </target>
    47     <target name="copy-styles">
     23
     24    <property name="plugin.author" value="80n"/>
     25    <property name="plugin.class" value="org.openstreetmap.josm.plugins.osmarender.OsmarenderPlugin"/>
     26    <property name="plugin.description" value="Launches FireFox to display the current visible screen as a nice SVG image."/>
     27
     28    <!-- ** include targets that all plugins have in common ** -->
     29    <import file="../build-common.xml"/>
     30
     31    <target name="setup-dist">
     32        <antcall target="setup-dist-default" />
    4833        <copy todir="${plugin.build.dir}" file="${xslt}/osmarender.xsl"/>
    4934        <copy tofile="${plugin.build.dir}/osm-map-features.xml" file="${stylesheets}/osm-map-features-z17.xml"/>
    5035    </target>
    51     <target name="dist" depends="compile,revision,copy-styles">
    52         <copy todir="${plugin.build.dir}/data">
    53             <fileset dir="data"/>
    54         </copy>
    55         <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
    56             <manifest>
    57                 <attribute name="Author" value="80n"/>
    58                 <attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.osmarender.OsmarenderPlugin"/>
    59                 <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
    60                 <attribute name="Plugin-Description" value="Launches FireFox to display the current visible screen as a nice SVG image."/>
    61                 <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
    62                 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
    63             </manifest>
    64         </jar>
    65     </target>
     36
    6637    <target name="revision">
    6738        <exec append="false" output="REVISION" executable="perl" failifexecutionfails="false">
     
    8354        <delete file="REVISION"/>
    8455    </target>
    85     <target name="clean">
    86         <delete dir="${plugin.build.dir}"/>
    87         <delete file="${plugin.jar}"/>
    88     </target>
    89     <target name="install" depends="dist">
    90         <property environment="env"/>
    91         <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
    92             <and>
    93                 <os family="windows"/>
    94             </and>
    95         </condition>
    96         <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
    97     </target>
    98     <!--
    99          ************************** Publishing the plugin ***********************************
    100         -->
    101     <!--
    102         ** extracts the JOSM release for the JOSM version in ../core and saves it in the
    103         ** property ${coreversion.info.entry.revision}
    104         **
    105         -->
    106     <target name="core-info">
    107         <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
    108             <env key="LANG" value="C"/>
    109             <arg value="info"/>
    110             <arg value="--xml"/>
    111             <arg value="../../core"/>
    112         </exec>
    113         <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
    114         <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
    115         <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
    116         <delete file="core.info.xml"/>
    117     </target>
    118     <!--
    119         ** commits the source tree for this plugin
    120         -->
    121     <target name="commit-current">
    122         <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
    123         <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    124             <env key="LANG" value="C"/>
    125             <arg value="commit"/>
    126             <arg value="-m '${commit.message}'"/>
    127             <arg value="."/>
    128         </exec>
    129     </target>
    130     <!--
    131         ** updates (svn up) the source tree for this plugin
    132         -->
    133     <target name="update-current">
    134         <echo>Updating plugin source ...</echo>
    135         <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    136             <env key="LANG" value="C"/>
    137             <arg value="up"/>
    138             <arg value="."/>
    139         </exec>
    140         <echo>Updating ${plugin.jar} ...</echo>
    141         <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    142             <env key="LANG" value="C"/>
    143             <arg value="up"/>
    144             <arg value="../dist/${plugin.jar}"/>
    145         </exec>
    146     </target>
    147     <!--
    148         ** commits the plugin.jar
    149         -->
    150     <target name="commit-dist">
    151         <echo>
    152     ***** Properties of published ${plugin.jar} *****
    153     Commit message    : '${commit.message}'
    154     Plugin-Mainversion: ${plugin.main.version}
    155     JOSM build version: ${coreversion.info.entry.revision}
    156     Plugin-Version    : ${version.entry.commit.revision}
    157     ***** / Properties of published ${plugin.jar} *****
    15856
    159     Now commiting ${plugin.jar} ...
    160     </echo>
    161         <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    162             <env key="LANG" value="C"/>
    163             <arg value="-m '${commit.message}'"/>
    164             <arg value="commit"/>
    165             <arg value="${plugin.jar}"/>
    166         </exec>
    167     </target>
    168     <!-- ** make sure svn is present as a command line tool ** -->
    169     <target name="ensure-svn-present">
    170         <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
    171             <env key="LANG" value="C"/>
    172             <arg value="--version"/>
    173         </exec>
    174         <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
    175             <!-- return code not set at all? Most likely svn isn't installed -->
    176             <condition>
    177                 <not>
    178                     <isset property="svn.exit.code"/>
    179                 </not>
    180             </condition>
    181         </fail>
    182         <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
    183             <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
    184             <condition>
    185                 <isfailure code="${svn.exit.code}"/>
    186             </condition>
    187         </fail>
    188     </target>
    189     <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
    190     </target>
    19157</project>
  • applications/editors/josm/plugins/osmarender/src/org/openstreetmap/josm/plugins/osmarender/OsmarenderPlugin.java

    r28367 r29351  
    161161            panel.add(Box.createVerticalGlue(), GBC.eol().fill(GBC.BOTH));
    162162            firefox.setText(Main.pref.get("osmarender.firefox"));
    163             gui.getMapPreference().mapcontent.addTab(tr("Osmarender"), panel);
     163            gui.getMapPreference().getTabPane().addTab(tr("Osmarender"), panel);
    164164        }
    165165
  • applications/editors/josm/plugins/poly

    • Property svn:ignore set to
      build
  • applications/editors/josm/plugins/smed

    • Property svn:ignore
      •  

        old new  
        11build
        2 dist
        3 core
        42REVISION
  • applications/editors/josm/plugins/smed/build.xml

    r29062 r29351  
    55** Maintaining versions
    66** ====================
    7 ** see README.template
     7** See README.template
    88**
    99** Usage
    1010** =====
    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.
    21 **
    22 ** Use the ant target 'publish' to check in the plugin and make it available to other
    23 ** JOSM users:
    24 **    set the properties commit.message and plugin.main.version
    25 ** and run
    26 **    > ant  publish
    27 **
     11** Call "ant help" to get possible build targets.
    2812**
    2913-->
    30 <project name="SeaMapEditor" basedir=".">
     14<project name="SeaMapEditor" default="dist" basedir=".">
    3115    <!-- enter the SVN commit message -->
    3216    <property name="commit.message" value="New release"/>
     
    3418    <property name="plugin.main.version" value="4394"/>
    3519    <!-- should not be necessary to change the following properties -->
    36     <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/"/>
    39     <property name="smed.dist.dir" value="dist/"/>
    40     <!-- this is the directory where the plugin jar is copied to -->
    41     <property name="plugin.dist.dir" value="../../dist/"/>
    42     <property name="smed_core.dist.dir" value="core/dist/"/>
    43     <property name="ant.build.javac.target" value="1.5"/>
    44     <property name="plugin.jar" value="${plugin.dist.dir}${ant.project.name}.jar"/>
    45     <!--
    46     **********************************************************
    47     ** init - initializes the build
    48     **********************************************************
    49     -->
    50     <target name="init">
    51         <mkdir dir="${plugin.build.dir}"/>
    52         <mkdir dir="${smed_core.dist.dir}"/>
    53         <mkdir dir="${smed.dist.dir}"/>
    54     </target>
    55     <!--
    56     **********************************************************
    57     ** compile - complies the source tree
    58     **********************************************************
    59     -->
    60     <target name="compile" depends="init">
    61         <echo message="compiling sources for  ${plugin.jar} ... "/>
    62         <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}">
    63             <compilerarg value="-Xlint:deprecation"/>
    64             <compilerarg value="-Xlint:unchecked"/>
    65         </javac>
    66     </target>
    67     <!--
    68     **********************************************************
    69     ** dist - creates the plugin jar
    70     **********************************************************
    71     -->
    72     <target name="dist" depends="compile, revision">
    73         <echo message="creating ${ant.project.name}.jar ... "/>
    74         <copy todir="${plugin.build.dir}/images">
    75             <fileset dir="images"/>
    76         </copy>
    77         <copy todir="${plugin.build.dir}/data">
    78             <fileset dir="data"/>
    79         </copy>
     20
     21    <property name="plugin.author" value="Werner, Malcolm"/>
     22    <property name="plugin.class" value="smed.Smed"/>
     23    <property name="plugin.description" value="Create and edit seamaps for OpenSeaMap"/>
     24    <property name="plugin.icon" value="images/Smed.png"/>
     25    <property name="plugin.link" value="http://openseamap.org/"/>
     26
     27    <!-- ** include targets that all plugins have in common ** -->
     28    <import file="../build-common.xml"/>
     29
     30    <target name="setup-dist">
     31        <antcall target="setup-dist-default" />
    8032        <copy todir="${plugin.build.dir}/smed/msg">
    8133            <fileset dir="${plugin.src.dir}/smed/msg"/>
    8234        </copy>
    83         <copy todir="${plugin.build.dir}">
    84             <fileset dir="${smed.dist.dir}"/>
    85         </copy>
    86         <copy todir="${plugin.build.dir}">
    87             <fileset dir=".">
    88                 <include name="*.txt"/>
    89             </fileset>
    90         </copy>
    91         <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
    92             <!--
    93         ************************************************
    94         ** configure these properties. Most of them will be copied to the plugins
    95         ** manifest file. Property values will also show up in the list available
    96         ** plugins: http://josm.openstreetmap.de/wiki/Plugins.
    97         **
    98         ************************************************
    99     -->
    100             <manifest>
    101                 <attribute name="Author" value="Werner, Malcolm"/>
    102                 <attribute name="Plugin-Class" value="smed.Smed"/>
    103                 <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
    104                 <attribute name="Plugin-Description" value="Create and edit seamaps for OpenSeaMap"/>
    105                 <attribute name="Plugin-Icon" value="images/Smed.png"/>
    106                 <attribute name="Plugin-Link" value="http://openseamap.org/"/>
    107                 <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
    108                 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
    109             </manifest>
    110         </jar>
    111         <!-- install interface -->
    112         <copy file="${plugin.jar}" todir="${smed_core.dist.dir}"/>
    11335    </target>
    114     <!--
    115     **********************************************************
    116     ** revision - extracts the current revision number for the
    117     **    file build.number and stores it in the XML property
    118     **    version.*
    119     **********************************************************
    120     -->
    121     <target name="revision">
    122         <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
    123             <env key="LANG" value="C"/>
    124             <arg value="info"/>
    125             <arg value="--xml"/>
    126             <arg value="."/>
    127         </exec>
    128         <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
    129         <delete file="REVISION"/>
    130     </target>
    131     <!--
    132     **********************************************************
    133     ** clean - clean up the build environment
    134     **********************************************************
    135     -->
    136     <target name="clean">
    137         <delete dir="${plugin.build.dir}"/>
    138         <delete file="${plugin.jar}"/>
    139     </target>
    140     <!--
    141     **********************************************************
    142     ** install - install the plugin in your local JOSM installation
    143     **********************************************************
    144     -->
    145     <target name="install" depends="dist">
    146         <property environment="env"/>
    147         <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
    148             <and>
    149                 <os family="windows"/>
    150             </and>
    151         </condition>
    152         <delete dir="${josm.plugins.dir}/splug"/>
    153         <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
    154     </target>
    155     <!--
    156     ************************** Publishing the plugin ***********************************
    157     -->
    158     <!--
    159     ** extracts the JOSM release for the JOSM version in ../core and saves it in the
    160     ** property ${coreversion.info.entry.revision}
    161     -->
    162     <target name="core-info">
    163         <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
    164             <env key="LANG" value="C"/>
    165             <arg value="info"/>
    166             <arg value="--xml"/>
    167             <arg value="../../core"/>
    168         </exec>
    169         <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
    170         <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
    171         <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
    172         <delete file="core.info.xml"/>
    173     </target>
    174     <!-- commits the source tree for this plugin -->
    175     <target name="commit-current">
    176         <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
    177         <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    178             <env key="LANG" value="C"/>
    179             <arg value="commit"/>
    180             <arg value="-m '${commit.message}'"/>
    181             <arg value="."/>
    182         </exec>
    183     </target>
    184     <!-- updates (svn up) the source tree for this plugin -->
    185     <target name="update-current">
    186         <echo>Updating plugin source ...</echo>
    187         <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    188             <env key="LANG" value="C"/>
    189             <arg value="up"/>
    190             <arg value="."/>
    191         </exec>
    192         <echo>Updating ${plugin.jar} ...</echo>
    193         <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    194             <env key="LANG" value="C"/>
    195             <arg value="up"/>
    196             <arg value="../dist/${plugin.jar}"/>
    197         </exec>
    198     </target>
    199     <!-- commits the plugin.jar -->
    200     <target name="commit-dist">
    201         <echo>
    202     ***** Properties of published ${plugin.jar} *****
    203     Commit message    : '${commit.message}'                   
    204     Plugin-Mainversion: ${plugin.main.version}
    205     JOSM build version: ${coreversion.info.entry.revision}
    206     Plugin-Version    : ${version.entry.commit.revision}
    207     ***** / Properties of published ${plugin.jar} *****                   
    208                        
    209     Now commiting ${plugin.jar} ...
    210     </echo>
    211         <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    212             <env key="LANG" value="C"/>
    213             <arg value="-m '${commit.message}'"/>
    214             <arg value="commit"/>
    215             <arg value="${plugin.jar}"/>
    216         </exec>
    217     </target>
    218     <!-- make sure svn is present as a command line tool -->
    219     <target name="ensure-svn-present">
    220         <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
    221             <env key="LANG" value="C"/>
    222             <arg value="--version"/>
    223         </exec>
    224         <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
    225             <!-- return code not set at all? Most likely svn isn't installed -->
    226             <condition>
    227                 <not>
    228                     <isset property="svn.exit.code"/>
    229                 </not>
    230             </condition>
    231         </fail>
    232         <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
    233             <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
    234             <condition>
    235                 <isfailure code="${svn.exit.code}"/>
    236             </condition>
    237         </fail>
    238     </target>
    239     <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
    240     </target>
     36
    24137</project>
  • applications/editors/josm/plugins/utilsplugin2/build.xml

    r29241 r29351  
    55** Maintaining versions
    66** ====================
    7 ** see README.template
     7** See README.template
    88**
    99** Usage
    1010** =====
    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.
    21 **
    22 ** Use the ant target 'publish' to check in the plugin and make it available to other
    23 ** JOSM users:
    24 **    set the properties commit.message and plugin.main.version
    25 ** and run
    26 **    > ant  publish
    27 **
     11** Call "ant help" to get possible build targets.
    2812**
    2913-->
     
    3519    <property name="plugin.main.version" value="4980"/>
    3620
    37     <!--
    38     **********************************************************
    39     ** include targets that all plugins have in common
    40     **********************************************************
    41     -->
     21    <property name="plugin.author" value="Kalle Lampila, Upliner, and others"/>
     22    <property name="plugin.class" value="org.openstreetmap.josm.plugins.utilsplugin2.UtilsPlugin2"/>
     23    <property name="plugin.description" value="Several utilities that make your life easier."/>
     24    <property name="plugin.icon" value="images/utils.png"/>
     25    <property name="plugin.link" value="http://josm.openstreetmap.de/wiki/Help/Plugin/UtilsPlugin2"/>
     26
     27    <!-- ** include targets that all plugins have in common ** -->
    4228    <import file="../build-common.xml"/>
    4329
    44     <!--
    45     **********************************************************
    46     ** dist - creates the plugin jar
    47     **********************************************************
    48     -->
    49     <target name="dist" depends="compile,revision">
    50         <echo message="creating ${ant.project.name}.jar ... "/>
    51         <copy todir="${plugin.build.dir}/images">
    52             <fileset dir="images"/>
    53         </copy>
    54         <copy todir="${plugin.build.dir}/data">
    55             <fileset dir="data"/>
    56         </copy>
    57         <copy todir="${plugin.build.dir}">
    58             <fileset dir=".">
    59                 <include name="README"/>
    60                 <include name="LICENSE"/>
    61                 <include name="GPL-v2.0.txt"/>
    62                 <include name="GPL-v3.0.txt"/>
    63             </fileset>
    64         </copy>
    65         <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
    66         <!--
    67         ************************************************
    68         ** configure these properties. Most of them will be copied to the plugins
    69         ** manifest file. Property values will also show up in the list available
    70         ** plugins: http://josm.openstreetmap.de/wiki/Plugins.
    71         **
    72         ************************************************
    73         -->
    74             <manifest>
    75                 <attribute name="Author" value="Kalle Lampila, Upliner, and others"/>
    76                 <attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.utilsplugin2.UtilsPlugin2"/>
    77                 <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
    78                 <attribute name="Plugin-Description" value="Several utilities that make your life easier."/>
    79                 <attribute name="Plugin-Icon" value="images/utils.png"/>
    80                 <attribute name="Plugin-Link" value="http://josm.openstreetmap.de/wiki/Help/Plugin/UtilsPlugin2"/>
    81                 <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
    82                 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
    83             </manifest>
    84         </jar>
    85     </target>
    8630</project>
  • applications/editors/josm/plugins/waypoint_search/build.xml

    r27019 r29351  
    55** Maintaining versions
    66** ====================
    7 ** see README.template
     7** See README.template
    88**
    99** Usage
    1010** =====
    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.
    21 **
    22 ** Use the ant target 'publish' to check in the plugin and make it available to other
    23 ** JOSM users:
    24 **    set the properties commit.message and plugin.main.version
    25 ** and run
    26 **    > ant  publish
    27 **
     11** Call "ant help" to get possible build targets.
    2812**
    2913-->
    3014<project name="waypoint_search" default="dist" basedir=".">
     15
    3116    <!-- enter the SVN commit message -->
    3217    <property name="commit.message" value="bugfix of search when layer is added"/>
    3318    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    3419    <property name="plugin.main.version" value="4549"/>
    35     <!--
    36       ************************************************
    37       ** should not be necessary to change the following properties
    38      -->
    39     <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     <!-- this is the directory where the plugin jar is copied to -->
    43     <property name="plugin.dist.dir" value="../../dist"/>
    44     <property name="ant.build.javac.target" value="1.6"/>
    45     <property name="plugin.dist.dir" value="../../dist"/>
    46     <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/>
    47     <!--
    48     **********************************************************
    49     ** init - initializes the build
    50     **********************************************************
    51     -->
    52     <target name="init">
    53         <mkdir dir="${plugin.build.dir}"/>
    54     </target>
    55     <!--
    56     **********************************************************
    57     ** compile - complies the source tree
    58     **********************************************************
    59     -->
    60     <target name="compile" depends="init">
    61         <echo message="compiling sources for  ${plugin.jar} ... "/>
    62         <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}">
    63             <compilerarg value="-Xlint:deprecation"/>
    64             <compilerarg value="-Xlint:unchecked"/>
    65         </javac>
    66     </target>
    67     <!--
    68     **********************************************************
    69     ** dist - creates the plugin jar
    70     **********************************************************
    71     -->
    72     <target name="dist" depends="compile,revision">
    73         <echo message="creating ${ant.project.name}.jar ... "/>
    74         <copy todir="${plugin.build.dir}/images">
    75             <fileset dir="images"/>
    76         </copy>
    77         <copy todir="${plugin.build.dir}/data">
    78             <fileset dir="data"/>
    79         </copy>
    80         <copy todir="${plugin.build.dir}">
    81             <fileset dir=".">
    82                 <include name="README"/>
    83                 <include name="LICENSE"/>
    84             </fileset>
    85         </copy>
    86         <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
    87             <!--
    88         ************************************************
    89         ** configure these properties. Most of them will be copied to the plugins
    90         ** manifest file. Property values will also show up in the list available
    91         ** plugins: http://josm.openstreetmap.de/wiki/Plugins.
    92         **
    93         ************************************************
    94     -->
    95             <manifest>
    96                 <attribute name="Author" value="Åsmund Realfsen - realfsen at gmx.net"/>
    97                 <attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.waypointSearch.WaypointSearchPlugin"/>
    98                 <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
    99                 <attribute name="Plugin-Description" value="Enables searching for waypoint imported from gpx file."/>
    100                 <attribute name="Plugin-Icon" value="images/WaypointSearch.png"/>
    101                 <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
    102                 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
    103             </manifest>
    104         </jar>
    105     </target>
    106     <!--
    107     **********************************************************
    108     ** revision - extracts the current revision number for the
    109     **    file build.number and stores it in the XML property
    110     **    version.*
    111     **********************************************************
    112     -->
    113     <target name="revision">
    114         <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
    115             <env key="LANG" value="C"/>
    116             <arg value="info"/>
    117             <arg value="--xml"/>
    118             <arg value="."/>
    119         </exec>
    120         <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
    121         <delete file="REVISION"/>
    122     </target>
    123     <!--
    124     **********************************************************
    125     ** clean - clean up the build environment
    126     **********************************************************
    127     -->
    128     <target name="clean">
    129         <delete dir="${plugin.build.dir}"/>
    130         <delete file="${plugin.jar}"/>
    131     </target>
    132     <!--
    133     **********************************************************
    134     ** install - install the plugin in your local JOSM installation
    135     **********************************************************
    136     -->
    137     <target name="install" depends="dist">
    138         <property environment="env"/>
    139         <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
    140             <and>
    141                 <os family="windows"/>
    142             </and>
    143         </condition>
    144         <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
    145     </target>
    146     <!--
    147     ************************** Publishing the plugin ***********************************
    148     -->
    149     <!--
    150         ** extracts the JOSM release for the JOSM version in ../core and saves it in the
    151         ** property ${coreversion.info.entry.revision}
    152         **
    153         -->
    154     <target name="core-info">
    155         <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
    156             <env key="LANG" value="C"/>
    157             <arg value="info"/>
    158             <arg value="--xml"/>
    159             <arg value="../../core"/>
    160         </exec>
    161         <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
    162         <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
    163         <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
    164         <delete file="core.info.xml"/>
    165     </target>
    166     <!--
    167         ** commits the source tree for this plugin
    168         -->
    169     <target name="commit-current">
    170         <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
    171         <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    172             <env key="LANG" value="C"/>
    173             <arg value="commit"/>
    174             <arg value="-m '${commit.message}'"/>
    175             <arg value="."/>
    176         </exec>
    177     </target>
    178     <!--
    179         ** updates (svn up) the source tree for this plugin
    180         -->
    181     <target name="update-current">
    182         <echo>Updating plugin source ...</echo>
    183         <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    184             <env key="LANG" value="C"/>
    185             <arg value="up"/>
    186             <arg value="."/>
    187         </exec>
    188         <echo>Updating ${plugin.jar} ...</echo>
    189         <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    190             <env key="LANG" value="C"/>
    191             <arg value="up"/>
    192             <arg value="../dist/${plugin.jar}"/>
    193         </exec>
    194     </target>
    195     <!--
    196         ** commits the plugin.jar
    197         -->
    198     <target name="commit-dist">
    199         <echo>
    200     ***** Properties of published ${plugin.jar} *****
    201     Commit message    : '${commit.message}'                   
    202     Plugin-Mainversion: ${plugin.main.version}
    203     JOSM build version: ${coreversion.info.entry.revision}
    204     Plugin-Version    : ${version.entry.commit.revision}
    205     ***** / Properties of published ${plugin.jar} *****                   
    206                        
    207     Now commiting ${plugin.jar} ...
    208     </echo>
    209         <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    210             <env key="LANG" value="C"/>
    211             <arg value="-m '${commit.message}'"/>
    212             <arg value="commit"/>
    213             <arg value="${plugin.jar}"/>
    214         </exec>
    215     </target>
    216     <!-- ** make sure svn is present as a command line tool ** -->
    217     <target name="ensure-svn-present">
    218         <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
    219             <env key="LANG" value="C"/>
    220             <arg value="--version"/>
    221         </exec>
    222         <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
    223             <!-- return code not set at all? Most likely svn isn't installed -->
    224             <condition>
    225                 <not>
    226                     <isset property="svn.exit.code"/>
    227                 </not>
    228             </condition>
    229         </fail>
    230         <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
    231             <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
    232             <condition>
    233                 <isfailure code="${svn.exit.code}"/>
    234             </condition>
    235         </fail>
    236     </target>
    237     <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
    238     </target>
     20
     21    <property name="plugin.author" value="Åsmund Realfsen - realfsen at gmx.net"/>
     22    <property name="plugin.class"  value="org.openstreetmap.josm.plugins.waypointSearch.WaypointSearchPlugin"/>
     23    <property name="plugin.description" value="Enables searching for waypoint imported from gpx file."/>
     24    <property name="plugin.icon" value="images/WaypointSearch.png"/>
     25       
     26    <!-- ** include targets that all plugins have in common ** -->
     27    <import file="../build-common.xml"/>
     28
    23929</project>
  • applications/editors/josm/plugins/wikipedia/build.xml

    r28991 r29351  
    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** Call "ant help" to get possible build targets.
     12**
     13-->
    214<project name="wikipedia" default="dist" basedir=".">
    315
  • applications/editors/josm/plugins/wms-turbo-challenge2/build.xml

    r29210 r29351  
    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** Call "ant help" to get possible build targets.
     12**
     13-->
    214<project name="wms-turbo-challenge2" default="dist" basedir=".">
    315
Note: See TracChangeset for help on using the changeset viewer.