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

Last change on this file since 24999 was 24999, checked in by upliner, 14 years ago

make wms-turbo-challenge compatible with recent JOSM.

Still works only for WMS layers. Unfortunately, no way to race around Bing imagery yet.

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