Changeset 29005 in osm for applications


Ignore:
Timestamp:
2012-11-27T20:47:41+01:00 (12 years ago)
Author:
stoecker
Message:

improve build to allow custom dist setup

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

Legend:

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

    r29004 r29005  
    5151    <!--
    5252    **********************************************************
    53     ** dist - creates the plugin jar
    54     **********************************************************
    55     -->
    56     <target name="dist" depends="compile,revision">
    57         <echo message="creating ${ant.project.name}.jar ... "/>
     53    ** setup-dist - copies files for distribution
     54    **********************************************************
     55    -->
     56    <target name="setup-dist-default">
    5857        <copy todir="${plugin.build.dir}/resources" failonerror="no" includeemptydirs="no">
    5958            <fileset dir="resources"/>
     
    7271            </fileset>
    7372        </copy>
     73    </target>
     74    <target name="setup-dist">
     75        <antcall target="setup-dist-default" />
     76    </target>
     77    <!--
     78    **********************************************************
     79    ** dist - creates the plugin jar
     80    **********************************************************
     81    -->
     82    <target name="dist" depends="compile,revision">
     83        <echo message="creating ${ant.project.name}.jar ... "/>
     84        <antcall target="setup-dist" />
    7485        <delete file="MANIFEST" failonerror="no"/>
    7586        <manifest file="MANIFEST" mode="update">
  • applications/editors/josm/plugins/geotools/build.xml

    r28995 r29005  
    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 ** 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 **
    28 **
    29 -->
    302<project name="geotools" default="dist" basedir=".">
    313    <!-- enter the SVN commit message -->
     
    346    <property name="plugin.main.version" value="5236"/>
    357       
    36     <!-- Configure these properties (replace "..." accordingly).
    37          See http://josm.openstreetmap.de/wiki/DevelopersGuide/DevelopingPlugins
    38     -->
    398    <property name="plugin.author" value="Don-vip"/>
    409    <property name="plugin.class" value="org.openstreetmap.josm.plugins.geotools.GeoToolsPlugin"/>
     
    5120    <!--
    5221    **********************************************************
    53     ** dist - creates the plugin jar
     22    ** setup-dist - copies files for distribution
    5423    **********************************************************
    5524    -->
    56     <target name="dist" depends="compile,revision">
    57         <echo message="creating ${ant.project.name}.jar ... "/>
     25    <target name="setup-dist">
    5826        <unjar dest="${plugin.build.dir}">
    5927            <fileset dir="lib" includes="*.jar" />
     
    6937            <fileset dir="resources/META-INF"/>
    7038        </copy>
    71         <copy todir="${plugin.build.dir}/images">
    72             <fileset dir="images"/>
    73         </copy>
    74         <copy todir="${plugin.build.dir}/data" includeemptydirs="no">
    75             <fileset dir="data"/>
    76         </copy>
    77         <copy todir="${plugin.build.dir}">
    78             <fileset dir=".">
    79                 <include name="README"/>
    80                 <include name="LICENSE"/>
    81             </fileset>
    82         </copy>
    83         <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
    84             <manifest>
    85                 <attribute name="Author" value="${plugin.author}"/>
    86                 <attribute name="Plugin-Class" value="${plugin.class}"/>
    87                 <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
    88                 <attribute name="Plugin-Description" value="${plugin.description}"/>
    89                 <attribute name="Plugin-Icon" value="${plugin.icon}"/>
    90                 <!--<attribute name="Plugin-Link" value="${plugin.link}"/>-->
    91                 <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
    92                 <attribute name="Plugin-Requires" value="${plugin.requires}"/>
    93                 <attribute name="Plugin-Stage" value="${plugin.stage}"/>
    94                 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
    95             </manifest>
    96         </jar>
     39        <antcall target="setup-dist-default" />
    9740    </target>
    9841</project>
Note: See TracChangeset for help on using the changeset viewer.