source: osm/applications/editors/josm/plugins/smed_about/build.xml@ 23382

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

toms integrated in smed, basic works

File size: 8.0 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_about" 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 <property name="smed.plugins" value="../smed/plugins"/>
51 <!-- this is the directory where the plugin jar is copied to -->
52 <property name="ant.build.javac.target" value="1.5"/>
53 <property name="plugin.dist.dir" value="smed_dist"/>
54 <property name="plugin.jar" value="${plugin.dist.dir}/02_${DSTAMP}_${TSTAMP}_${ant.project.name}.jar"/>
55
56 <!--
57 **********************************************************
58 ** init - initializes the build
59 **********************************************************
60 -->
61 <target name="init">
62 <mkdir dir="${plugin.build.dir}"/>
63 <mkdir dir="${plugin.dist.dir}"/>
64 </target>
65 <!--
66 **********************************************************
67 ** init_smed - initializes the build of smed
68 **********************************************************
69 -->
70 <target name="init_smed">
71 <mkdir dir="${smed.build.dir}"/>
72 </target>
73
74 <!--
75 **********************************************************
76 ** compile_smed - compiles the source tree of smed
77 **********************************************************
78 -->
79 <target name="compile_smed" depends="init_smed">
80 <echo message="compiling sources for smed.jar ... "/>
81 <javac srcdir="${smed.src.dir}" classpath="${josm}" debug="true" destdir="${smed.build.dir}">
82 <compilerarg value="-Xlint:deprecation"/>
83 <compilerarg value="-Xlint:unchecked"/>
84 </javac>
85 </target>
86
87 <!--
88 **********************************************************
89 ** compile - complies the source tree
90 **********************************************************
91 -->
92 <target name="compile" depends="init,dist_smed">
93 <echo message="compiling sources for ${plugin.jar} ... "/>
94 <javac srcdir="src" classpath="${josm}:${smed}" debug="true" destdir="${plugin.build.dir}">
95 <compilerarg value="-Xlint:deprecation"/>
96 <compilerarg value="-Xlint:unchecked"/>
97 </javac>
98 </target>
99
100 <!--
101 **********************************************************
102 ** dist_smed - creates smed.jar
103 **********************************************************
104 -->
105 <target name="dist_smed" depends="compile_smed">
106 <echo message="creating smed.jar ... "/>
107
108 <copy todir="${smed.build.dir}/images">
109 <fileset dir="${smed.src.dir}/images"/>
110 </copy>
111
112 <copy todir="${smed.build.dir}/images">
113 <fileset dir="../smed/images"/>
114 </copy>
115
116 <copy todir="${smed.build.dir}/smed/msg">
117 <fileset dir="${smed.src.dir}/smed/msg"/>
118 </copy>
119
120 <copy todir="${smed.build.dir}">
121 <fileset dir="../smed">
122 <include name="*.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_about/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_about.jar"/>
176 </fileset>
177 </delete>
178
179
180 <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
181 <!--
182 ************************************************
183 ** configure these properties. Most of them will be copied to the plugins
184 ** manifest file. Property values will also show up in the list available
185 ** plugins: http://josm.openstreetmap.de/wiki/Plugins.
186 **
187 ************************************************
188 -->
189 <manifest>
190 <attribute name="Author" value="Werner"/>
191 <attribute name="Plugin-Class" value="smed_ex.impl.SmedExImpl"/>
192 <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
193 <attribute name="Plugin-Description" value="Plugin for Seamap Editor"/>
194 <attribute name="Plugin-Icon" value="images/Smed.png"/>
195 <attribute name="Plugin-Link" value="http://openseamap.org/"/>
196 <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
197 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
198 <attribute name="Class-Path" value="./tplug/ifc.jar"/>
199 </manifest>
200 </jar>
201
202 </target>
203
204 <!--
205 **********************************************************
206 ** clean - clean up the build environment
207 **********************************************************
208 -->
209 <target name="clean">
210 <delete dir="${smed.build.dir}"/>
211 <delete file="${smed}"/>
212 <delete>
213 <fileset dir="${plugin.dist.dir}">
214 <include name="*smed_about.jar"/>
215 </fileset>
216 </delete>
217
218 </target>
219
220 <!--
221 **********************************************************
222 ** install - install the plugin in your local JOSM installation
223 **********************************************************
224 -->
225 <target name="install" depends="dist">
226 <property environment="env"/>
227 <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins/splug/" else="${user.home}/.josm/plugins/splug/">
228 <and>
229 <os family="windows"/>
230 </and>
231 </condition>
232
233 <delete>
234 <fileset dir="${josm.plugins.dir}">
235 <include name="*smed_about.jar"/>
236 </fileset>
237 </delete>
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.