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

improve build to allow custom dist setup

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.