source: osm/applications/editors/josm/plugins/wms-turbo-challenge2/build.xml@ 27823

Last change on this file since 27823 was 27019, checked in by stoecker, 13 years ago

josm plugins i18n update

File size: 4.7 KB
Line 
1<?xml version="1.0" encoding="utf-8"?>
2<!--
3** To build it run
4**
5** > ant dist
6**
7** To install the generated plugin locally (in you default plugin directory) run
8**
9** > ant install
10-->
11<project name="wms-turbo-challenge2" default="dist" basedir=".">
12 <property name="josm" location="../../core/dist/josm-custom.jar"/>
13 <property name="plugin.build.dir" value="build"/>
14 <property name="plugin.src.dir" value="src"/>
15 <!-- this is the directory where the plugin jar is copied to -->
16 <property name="ant.build.javac.target" value="1.5"/>
17 <property name="plugin.dist.dir" value="../../dist"/>
18 <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/>
19 <!--
20 **********************************************************
21 ** init - initializes the build
22 **********************************************************
23 -->
24 <target name="init">
25 <mkdir dir="${plugin.build.dir}"/>
26 </target>
27 <!--
28 **********************************************************
29 ** compile - compiles the source tree
30 **********************************************************
31 -->
32 <target name="compile" depends="init">
33 <echo message="compiling sources for ${plugin.jar} ... "/>
34 <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}">
35 <compilerarg value="-Xlint:deprecation"/>
36 <compilerarg value="-Xlint:unchecked"/>
37 </javac>
38 </target>
39 <!--
40 **********************************************************
41 ** dist - creates the plugin jar
42 **********************************************************
43 -->
44 <target name="dist" depends="compile,revision">
45 <echo message="creating ${plugin.jar.name} ... "/>
46 <copy todir="${plugin.build.dir}/resources">
47 <fileset dir="resources"/>
48 </copy>
49 <copy todir="${plugin.build.dir}/images">
50 <fileset dir="images"/>
51 </copy>
52 <copy todir="${plugin.build.dir}/data">
53 <fileset dir="data"/>
54 </copy>
55 <copy todir="${plugin.build.dir}">
56 <fileset dir=".">
57 <include name="README"/>
58 <include name="LICENSE"/>
59 </fileset>
60 </copy>
61 <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
62 <manifest>
63 <attribute name="Author" value="Andrzej Zaborowski"/>
64 <attribute name="Plugin-Class" value="wmsturbochallenge.WMSRacer"/>
65 <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
66 <attribute name="Plugin-Description" value="Drive a race car from point A to point B over aerial imagery, leave cacti behind."/>
67 <attribute name="Plugin-Icon" value="images/wmsracer.png"/>
68 <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/wiki/JOSM/Plugins/WMS_Racer"/>
69 <attribute name="Plugin-Mainversion" value="4549"/>
70 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
71 </manifest>
72 </jar>
73 </target>
74 <!--
75 **********************************************************
76 ** revision - extracts the current revision number for the
77 ** file build.number and stores it in the XML property
78 ** version.*
79 **********************************************************
80 -->
81 <target name="revision">
82 <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
83 <env key="LANG" value="C"/>
84 <arg value="info"/>
85 <arg value="--xml"/>
86 <arg value="."/>
87 </exec>
88 <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
89 <delete file="REVISION"/>
90 </target>
91 <!--
92 **********************************************************
93 ** clean - clean up the build environment
94 **********************************************************
95 -->
96 <target name="clean">
97 <delete dir="${plugin.build.dir}"/>
98 <delete file="${plugin.jar}"/>
99 </target>
100 <!--
101 **********************************************************
102 ** install - install the plugin in your local JOSM installation
103 **********************************************************
104 -->
105 <target name="install" depends="dist">
106 <property environment="env"/>
107 <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
108 <and>
109 <os family="windows"/>
110 </and>
111 </condition>
112 <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
113 </target>
114</project>
Note: See TracBrowser for help on using the repository browser.