source: osm/applications/editors/josm/plugins/smed_ex/build.xml@ 23393

Last change on this file since 23393 was 23393, checked in by postfix, 14 years ago

some corrections in ant-files
Listener for osm changes now correctly dequeue if program exit
josm-menuItem handled now correctly

  • Property svn:executable set to *
File size: 8.2 KB
Line 
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** 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-->
30<project name="smed_ex" basedir=".">
31
32 <!-- enter the SVN commit message -->
33 <property name="commit.message" value="New release" />
34 <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
35 <property name="plugin.main.version" value="3329" />
36
37 <!-- Declaring time-stamps-->
38 <tstamp/>
39
40 <!--
41 ************************************************
42 ** should not be necessary to change the following properties
43 -->
44 <property name="josm" location="../../core/dist/josm-custom.jar"/>
45 <property name="smed" location="../../dist/smed.jar"/>
46 <property name="plugin.build.dir" value="build"/>
47 <property name="plugin.src.dir" value="src"/>
48 <property name="smed.build.dir" value="../smed/build"/>
49 <property name="smed.src.dir" value="../smed/src"/>
50 <!-- this is the directory where the plugin jar is copied to -->
51 <property name="ant.build.javac.target" value="1.5"/>
52 <property name="plugin.dist.dir" value="smed_dist"/>
53 <property name="plugin.jar" value="${plugin.dist.dir}/01_${DSTAMP}_${TSTAMP}_${ant.project.name}.jar"/>
54
55 <!--
56 **********************************************************
57 ** init - initializes the build
58 **********************************************************
59 -->
60 <target name="init">
61 <mkdir dir="${plugin.build.dir}"/>
62 <mkdir dir="${plugin.dist.dir}"/>
63 </target>
64 <!--
65 **********************************************************
66 ** init_smed - initializes the build of smed
67 **********************************************************
68 -->
69 <target name="init_smed">
70 <mkdir dir="${smed.build.dir}"/>
71 </target>
72
73 <!--
74 **********************************************************
75 ** compile_smed - compiles the source tree of smed
76 **********************************************************
77 -->
78 <target name="compile_smed" depends="init_smed">
79 <echo message="compiling sources for smed.jar ... "/>
80 <javac srcdir="${smed.src.dir}" classpath="${josm}" debug="true" destdir="${smed.build.dir}">
81 <compilerarg value="-Xlint:deprecation"/>
82 <compilerarg value="-Xlint:unchecked"/>
83 </javac>
84 </target>
85
86 <!--
87 **********************************************************
88 ** compile - complies the source tree
89 **********************************************************
90 -->
91 <target name="compile" depends="init,dist_smed">
92 <echo message="compiling sources for ${plugin.jar} ... "/>
93 <javac srcdir="src" classpath="${josm}:${smed}" debug="true" destdir="${plugin.build.dir}">
94 <compilerarg value="-Xlint:deprecation"/>
95 <compilerarg value="-Xlint:unchecked"/>
96 </javac>
97 </target>
98
99 <!--
100 **********************************************************
101 ** dist_smed - creates smed.jar
102 **********************************************************
103 -->
104 <target name="dist_smed" depends="compile_smed">
105 <echo message="creating smed.jar ... "/>
106
107 <copy todir="${smed.build.dir}/images">
108 <fileset dir="${smed.src.dir}/images"/>
109 </copy>
110
111 <copy todir="${smed.build.dir}/images">
112 <fileset dir="../smed/images"/>
113 </copy>
114
115 <copy todir="${smed.build.dir}/smed/msg">
116 <fileset dir="${smed.src.dir}/smed/msg"/>
117 </copy>
118
119 <copy todir="${smed.build.dir}">
120 <fileset dir="../smed">
121 <include name="copyright.txt" />
122 <include name="LICENSE.txt" />
123 </fileset>
124 </copy>
125
126 <jar destfile="${smed}" basedir="${smed.build.dir}">
127 <!--
128 ************************************************
129 ** configure these properties. Most of them will be copied to the plugins
130 ** manifest file. Property values will also show up in the list available
131 ** plugins: http://josm.openstreetmap.de/wiki/Plugins.
132 **
133 ************************************************
134 -->
135 <manifest>
136 <attribute name="Author" value="Werner"/>
137 <attribute name="Plugin-Class" value="smed.Smed"/>
138 <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
139 <attribute name="Plugin-Description" value="Create and edit seamaps for OpenSeaMap"/>
140 <attribute name="Plugin-Icon" value="images/Smed.png"/>
141 <attribute name="Plugin-Link" value="http://openseamap.org/"/>
142 <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
143 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
144 </manifest>
145 </jar>
146 </target>
147
148 <!--
149 **********************************************************
150 ** dist - creates the plugin jar
151 **********************************************************
152 -->
153 <target name="dist" depends="compile">
154 <echo message="creating ${ant.project.name}.jar ... "/>
155
156 <copy todir="${plugin.build.dir}/images">
157 <fileset dir="${plugin.src.dir}/images"/>
158 </copy>
159
160 <copy todir="${plugin.build.dir}/images">
161 <fileset dir="images"/>
162 </copy>
163 <copy todir="${plugin.build.dir}/smed_ex/msg">
164 <fileset dir="${plugin.src.dir}/smed_ex/msg"/>
165 </copy>
166 <copy todir="${plugin.build.dir}">
167 <fileset dir=".">
168 <include name="copyright.txt" />
169 <include name="LICENSE.txt" />
170 </fileset>
171 </copy>
172
173 <delete>
174 <fileset dir="${plugin.dist.dir}">
175 <include name="*smed_ex.jar"/>
176 </fileset>
177 </delete>
178
179 <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
180 <!--
181 ************************************************
182 ** configure these properties. Most of them will be copied to the plugins
183 ** manifest file. Property values will also show up in the list available
184 ** plugins: http://josm.openstreetmap.de/wiki/Plugins.
185 **
186 ************************************************
187 -->
188 <manifest>
189 <attribute name="Author" value="Werner"/>
190 <attribute name="Plugin-Class" value="smed_ex.impl.SmedExImpl"/>
191 <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
192 <attribute name="Plugin-Description" value="Plugin for Seamap Editor"/>
193 <attribute name="Plugin-Icon" value="images/Smed.png"/>
194 <attribute name="Plugin-Link" value="http://openseamap.org/"/>
195 <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
196 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
197 <attribute name="Class-Path" value="./tplug/ifc.jar"/>
198 </manifest>
199 </jar>
200
201 </target>
202
203 <!--
204 **********************************************************
205 ** clean - clean up the build environment
206 **********************************************************
207 -->
208 <target name="clean">
209 <delete dir="${smed.build.dir}"/>
210 <delete file="${smed}"/>
211 <delete>
212 <fileset dir="${plugin.dist.dir}">
213 <include name="*smed_ex.jar"/>
214 </fileset>
215 </delete>
216
217 </target>
218
219 <!--
220 **********************************************************
221 ** install - install the plugin in your local JOSM installation
222 **********************************************************
223 -->
224 <target name="install" depends="dist">
225 <property environment="env"/>
226 <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins/splug/" else="${user.home}/.josm/plugins/splug/">
227 <and>
228 <os family="windows"/>
229 </and>
230 </condition>
231
232 <delete>
233 <fileset dir="${josm.plugins.dir}">
234 <include name="*smed_ex.jar"/>
235 </fileset>
236 </delete>
237
238 <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
239 </target>
240
241
242</project>
Note: See TracBrowser for help on using the repository browser.