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 | ** ====================
|
---|
7 | ** see README.template
|
---|
8 | **
|
---|
9 | ** Usage
|
---|
10 | ** =====
|
---|
11 | ** To build it run
|
---|
12 | **
|
---|
13 | ** > ant dist
|
---|
14 | **
|
---|
15 | -->
|
---|
16 | <project name="WayArea" default="dist" basedir=".">
|
---|
17 | <!-- enter the SVN commit message -->
|
---|
18 | <property name="commit.message" value="some new features in internationalising"/>
|
---|
19 | <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
|
---|
20 | <property name="plugin.main.version" value="4394"/>
|
---|
21 | <!-- Declaring time-stamps-->
|
---|
22 | <tstamp/>
|
---|
23 | <!--
|
---|
24 | ************************************************
|
---|
25 | ** should not be necessary to change the following properties
|
---|
26 | -->
|
---|
27 | <property name="josm" location="../../../../core/dist/josm-custom.jar"/>
|
---|
28 | <property name="smed" location="../../core/dist/SeaMapEditor.jar"/>
|
---|
29 | <property name="plugin.build.dir" value="build"/>
|
---|
30 | <property name="plugin.src.dir" value="src"/>
|
---|
31 | <property name="smed.build.dir" value="../../../smed/build"/>
|
---|
32 | <property name="delete_string" value="*${ant.project.name}.jar"/>
|
---|
33 | <!-- this is the directory where the plugin jar is copied to -->
|
---|
34 | <property name="plugin.dist.dir" value="../../dist"/>
|
---|
35 | <property name="ant.build.javac.target" value="1.5"/>
|
---|
36 | <property name="plugin.jar" value="${plugin.dist.dir}/00_${DSTAMP}_${TSTAMP}_${ant.project.name}.jar"/>
|
---|
37 | <!--
|
---|
38 | **********************************************************
|
---|
39 | ** init - initializes the build
|
---|
40 | **********************************************************
|
---|
41 | -->
|
---|
42 | <target name="init">
|
---|
43 | <mkdir dir="${plugin.build.dir}"/>
|
---|
44 | <mkdir dir="${plugin.dist.dir}"/>
|
---|
45 | </target>
|
---|
46 | <!--
|
---|
47 | **********************************************************
|
---|
48 | ** compile - complies the source tree
|
---|
49 | **********************************************************
|
---|
50 | -->
|
---|
51 | <target name="compile" depends="init">
|
---|
52 | <echo message="compiling sources for ${plugin.jar} ... "/>
|
---|
53 | <javac srcdir="src" classpath="${josm}:${smed}" debug="true" destdir="${plugin.build.dir}">
|
---|
54 | <compilerarg value="-Xlint:deprecation"/>
|
---|
55 | <compilerarg value="-Xlint:unchecked"/>
|
---|
56 | </javac>
|
---|
57 | </target>
|
---|
58 | <!--
|
---|
59 | **********************************************************
|
---|
60 | ** dist - creates the plugin jar
|
---|
61 | **********************************************************
|
---|
62 | -->
|
---|
63 | <target name="dist" depends="compile">
|
---|
64 | <echo message="creating ${ant.project.name}.jar ... "/>
|
---|
65 | <copy todir="${plugin.build.dir}/images">
|
---|
66 | <fileset dir="${plugin.src.dir}/images"/>
|
---|
67 | </copy>
|
---|
68 | <copy todir="${plugin.build.dir}/images">
|
---|
69 | <fileset dir="images"/>
|
---|
70 | </copy>
|
---|
71 | <copy todir="${plugin.build.dir}/wayarea/msg">
|
---|
72 | <fileset dir="${plugin.src.dir}/wayarea/msg"/>
|
---|
73 | </copy>
|
---|
74 | <copy todir="${plugin.build.dir}">
|
---|
75 | <fileset dir=".">
|
---|
76 | <include name="copyright.txt"/>
|
---|
77 | <include name="LICENSE.txt"/>
|
---|
78 | </fileset>
|
---|
79 | </copy>
|
---|
80 | <delete>
|
---|
81 | <fileset dir="${plugin.dist.dir}">
|
---|
82 | <include name="${delete_string}"/>
|
---|
83 | </fileset>
|
---|
84 | </delete>
|
---|
85 | <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
|
---|
86 | <!--
|
---|
87 | ************************************************
|
---|
88 | ** configure these properties. Most of them will be copied to the plugins
|
---|
89 | ** manifest file. Property values will also show up in the list available
|
---|
90 | ** plugins: http://josm.openstreetmap.de/wiki/Plugins.
|
---|
91 | **
|
---|
92 | ************************************************
|
---|
93 | -->
|
---|
94 | <manifest>
|
---|
95 | <attribute name="Author" value="Werner, Malcolm"/>
|
---|
96 | <attribute name="Plugin-Class" value="toms.Toms"/>
|
---|
97 | <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
|
---|
98 | <attribute name="Plugin-Description" value="Create and edit ways and areas for OpenSeaMap"/>
|
---|
99 | <attribute name="Plugin-Icon" value="images/wayarea.png"/>
|
---|
100 | <attribute name="Plugin-Link" value="http://openseamap.org/"/>
|
---|
101 | <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
|
---|
102 | <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
|
---|
103 | </manifest>
|
---|
104 | </jar>
|
---|
105 | </target>
|
---|
106 | <!--
|
---|
107 | **********************************************************
|
---|
108 | ** clean - clean up the build environment
|
---|
109 | **********************************************************
|
---|
110 | -->
|
---|
111 | <target name="clean">
|
---|
112 | <delete dir="${plugin.build.dir}"/>
|
---|
113 | <delete>
|
---|
114 | <fileset dir="${plugin.dist.dir}">
|
---|
115 | <include name="${delete_string}"/>
|
---|
116 | </fileset>
|
---|
117 | </delete>
|
---|
118 | </target>
|
---|
119 | </project>
|
---|