source: osm/applications/editors/josm/plugins/smed/plugs/harbour/build.xml@ 27481

Last change on this file since 27481 was 27481, checked in by malcolmh, 13 years ago

save

  • Property svn:executable set to *
File size: 5.9 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="Harbour" default="dist" basedir=".">
31 <!-- enter the SVN commit message -->
32 <property name="commit.message" value="harbour: TristateChekBox added"/>
33 <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
34 <property name="plugin.main.version" value="4394"/>
35 <!-- Declaring time-stamps-->
36 <tstamp/>
37 <!--
38 ************************************************
39 ** should not be necessary to change the following properties
40 -->
41 <property name="josm" location="../../../../core/dist/josm-custom.jar"/>
42 <property name="smed" location="../../core/dist/SeaMapEditor.jar"/>
43 <property name="plugin.build.dir" value="build"/>
44 <property name="plugin.src.dir" value="src"/>
45 <property name="smed.build.dir" value="../../../smed/build"/>
46 <property name="delete_string" value="*${ant.project.name}.jar"/>
47 <!-- this is the directory where the plugin jar is copied to -->
48 <property name="plugin.dist.dir" value="../../dist"/>
49 <property name="ant.build.javac.target" value="1.5"/>
50 <property name="plugin.jar" value="${plugin.dist.dir}/00_${DSTAMP}_${TSTAMP}_${ant.project.name}.jar"/>
51 <!--
52 **********************************************************
53 ** init - initializes the build
54 **********************************************************
55 -->
56 <target name="init">
57 <mkdir dir="${plugin.build.dir}"/>
58 <mkdir dir="${plugin.dist.dir}"/>
59 </target>
60 <!--
61 **********************************************************
62 ** compile - complies the source tree
63 **********************************************************
64 -->
65 <target name="compile" depends="init">
66 <echo message="compiling sources for ${plugin.jar} ... "/>
67 <javac srcdir="src" classpath="${josm}:${smed}" debug="true" destdir="${plugin.build.dir}">
68 <compilerarg value="-Xlint:deprecation"/>
69 <compilerarg value="-Xlint:unchecked"/>
70 </javac>
71 </target>
72 <!--
73 **********************************************************
74 ** dist - creates the plugin jar
75 **********************************************************
76 -->
77 <target name="dist" depends="compile,revision">
78 <echo message="creating ${ant.project.name}.jar ... "/>
79 <copy todir="${plugin.build.dir}/images">
80 <fileset dir="${plugin.src.dir}/images"/>
81 </copy>
82 <copy todir="${plugin.build.dir}/images">
83 <fileset dir="images"/>
84 </copy>
85 <copy todir="${plugin.build.dir}/harbour/msg">
86 <fileset dir="${plugin.src.dir}/harbour/msg"/>
87 </copy>
88 <copy todir="${plugin.build.dir}">
89 <fileset dir=".">
90 <include name="copyright.txt"/>
91 <include name="LICENSE.txt"/>
92 </fileset>
93 </copy>
94 <delete>
95 <fileset dir="${plugin.dist.dir}">
96 <include name="${delete_string}"/>
97 </fileset>
98 </delete>
99 <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
100 <!--
101 ************************************************
102 ** configure these properties. Most of them will be copied to the plugins
103 ** manifest file. Property values will also show up in the list available
104 ** plugins: http://josm.openstreetmap.de/wiki/Plugins.
105 **
106 ************************************************
107 -->
108 <manifest>
109 <attribute name="Author" value="Werner, Malcolm"/>
110 <attribute name="Plugin-Class" value="toms.Toms"/>
111 <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
112 <attribute name="Plugin-Description" value="Create and edit seamarks for OpenSeaMap"/>
113 <attribute name="Plugin-Icon" value="images/Smp.png"/>
114 <attribute name="Plugin-Link" value="http://openseamap.org/"/>
115 <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
116 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
117 </manifest>
118 </jar>
119 </target>
120 <!--
121 **********************************************************
122 ** revision - extracts the current revision number for the
123 ** file build.number and stores it in the XML property
124 ** version.*
125 **********************************************************
126 -->
127 <target name="revision">
128 <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
129 <env key="LANG" value="C"/>
130 <arg value="info"/>
131 <arg value="--xml"/>
132 <arg value="."/>
133 </exec>
134 <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
135 <delete file="REVISION"/>
136 </target>
137 <!--
138 **********************************************************
139 ** clean - clean up the build environment
140 **********************************************************
141 -->
142 <target name="clean">
143 <delete dir="${plugin.build.dir}"/>
144 <delete>
145 <fileset dir="${plugin.dist.dir}">
146 <include name="${delete_string}"/>
147 </fileset>
148 </delete>
149 </target>
150</project>
Note: See TracBrowser for help on using the repository browser.