source: subversion/applications/editors/josm/plugins/piclayer/build.xml @ 18597

Last change on this file since 18597 was 18597, checked in by jttt, 10 years ago

Updated to new MapViewPaintable?.paint arguments

File size: 5.1 KB
RevLine 
[14774]1<?xml version="1.0" encoding="UTF-8"?>
2<!--
3** This is a template build file for a JOSM  plugin.
4**
5** Maintaining versions
6** ====================
[14837]7** see README.template
[14774]8**
9** Usage
10** =====
11** To build it run
[14837]12**
[14774]13**    > ant  dist
14**
[14837]15** To install the generated plugin locally (in you default plugin directory) run
16**
[14774]17**    > ant  install
[14837]18**
[14774]19** The generated plugin jar is not automatically available in JOSMs plugin configuration
[14837]20** dialog. You have to check it in first.
[14774]21**
22-->
23<project name="PicLayer" default="dist" basedir=".">
[14837]24    <!--
25      ************************************************
26      ** should not be necessary to change the following properties
27     -->
28    <property name="josm"                   location="../../core/dist/josm-custom.jar"/>
29    <property name="plugin.build.dir"       value="build"/>
30    <property name="plugin.src.dir"         value="src"/>
31    <!-- this is the directory where the plugin jar is copied to -->
32    <property name="plugin.dist.dir"        value="../../dist"/>
33    <property name="ant.build.javac.target" value="1.5"/>
[14839]34    <property name="plugin.jar"             value="${plugin.dist.dir}/${ant.project.name}.jar"/>
[14774]35
[14837]36    <!--
37    **********************************************************
38    ** init - initializes the build
39    **********************************************************
40    -->
[14774]41    <target name="init">
42        <mkdir dir="${plugin.build.dir}"/>
43    </target>
[14837]44
45    <!--
46    **********************************************************
47    ** compile - complies the source tree
48    **********************************************************
49    -->
[14774]50    <target name="compile" depends="init">
[16177]51        <echo message="compiling sources for ${ant.project.name} ... "/>
[14774]52        <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}">
53            <compilerarg value="-Xlint:deprecation"/>
54            <compilerarg value="-Xlint:unchecked"/>
55        </javac>
56    </target>
57
[14837]58    <!--
59    **********************************************************
60    ** dist - creates the plugin jar
61    **********************************************************
62    -->
63    <target name="dist" depends="compile,revision">
[16177]64        <echo message="creating ${plugin.jar} ... "/>
[14837]65        <copy todir="${plugin.build.dir}/resources">
[14774]66            <fileset dir="resources"/>
67        </copy>
[14837]68        <copy todir="${plugin.build.dir}/images">
[14774]69            <fileset dir="images"/>
70        </copy>
[14837]71        <copy todir="${plugin.build.dir}">
[14774]72            <fileset dir=".">
[14837]73                <include name="README" />
74                <include name="LICENSE" />
[14774]75            </fileset>
76        </copy>
77        <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
78            <manifest>
[14837]79                <attribute name="Author" value="Tomasz Stelmach"/>
80                <attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.piclayer.PicLayerPlugin"/>
[14774]81                <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
[14837]82                <attribute name="Plugin-Description" value="This plugin allows to display any picture as a background in the editor and align it with the map."/>
[18597]83                <attribute name="Plugin-Mainversion" value="2450"/>
[14837]84                <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
[14774]85            </manifest>
86        </jar>
87    </target>
[14837]88
89    <!--
90    **********************************************************
91    ** revision - extracts the current revision number for the
92    **    file build.number and stores it in the XML property
93    **    version.*
94    **********************************************************
95    -->
[14774]96    <target name="revision">
[14837]97
98        <!-- extract the SVN revision information for file build.number -->
[14774]99        <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
100            <env key="LANG" value="C"/>
101            <arg value="info"/>
102            <arg value="--xml"/>
[18505]103            <arg value="."/>
[14774]104        </exec>
105        <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
106        <delete file="REVISION"/>
107    </target>
[14837]108
109    <!--
110    **********************************************************
111    ** clean - clean up the build environment
112    **********************************************************
113    -->
[14774]114    <target name="clean">
115        <delete dir="${plugin.build.dir}"/>
116        <delete file="${plugin.jar}"/>
117    </target>
[14837]118
119    <!--
120    **********************************************************
121    ** install - install the plugin in your local JOSM installation
122    **********************************************************
123    -->
124    <target name="install" depends="dist">
[14774]125        <property environment="env"/>
126        <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
127            <and>
128                <os family="windows"/>
129            </and>
130        </condition>
131        <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
132    </target>
133</project>
Note: See TracBrowser for help on using the repository browser.