source: osm/applications/editors/josm/plugins/calculator/build.xml@ 23163

Last change on this file since 23163 was 23163, checked in by postfix, 14 years ago
File size: 3.8 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
31<project name="calc" default="dist">
32
33 <!--
34 ************************************************
35 ** should not be necessary to change the following properties
36 -->
37 <property name="toms" location="../../dist/toms.jar/"/>
38 <property name="plugin.build.dir" value="build"/>
39 <property name="plugin.src.dir" value="src"/>
40 <!-- this is the directory where the plugin jar is copied to -->
41 <property name="plugin.dist.dir" value="../../dist"/>
42 <property name="ant.build.javac.target" value="1.5"/>
43 <property name="plugin.dist.dir" value="../../dist"/>
44 <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/>
45
46 <!--
47 **********************************************************
48 ** init - initializes the build
49 **********************************************************
50 -->
51 <target name="init">
52 <mkdir dir="${plugin.build.dir}"/>
53 </target>
54
55 <!--
56 **********************************************************
57 ** compile - compiles the source tree
58 **********************************************************
59 -->
60 <target name="compile" depends="init">
61 <echo message="compiling sources for ${plugin.jar} ... "/>
62 <javac srcdir="src" classpath="${toms}" debug="true" destdir="${plugin.build.dir}">
63 <compilerarg value="-Xlint:deprecation"/>
64 <compilerarg value="-Xlint:unchecked"/>
65 </javac>
66 </target>
67
68 <target name="dist" depends="compile">
69 <echo message="creating ${ant.project.name}.jar ... "/>
70 <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
71 <!--
72 ************************************************
73 ** configure these properties. Most of them will be copied to the plugins
74 ** manifest file. Property values will also show up in the list available
75 ** plugins: http://josm.openstreetmap.de/wiki/Plugins.
76 **
77 ************************************************
78 -->
79 <manifest>
80 <attribute name="Author" value="Werner, Malcolm"/>
81 <attribute name="Plugin-Class" value="ifc.Pluggable"/>
82 <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
83 <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
84 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
85 </manifest>
86 </jar>
87 </target>
88
89 <!--
90 **********************************************************
91 ** clean - clean up the build environment
92 **********************************************************
93 -->
94 <target name="clean">
95 <delete dir="${plugin.build.dir}"/>
96 <delete file="${plugin.jar}"/>
97 </target>
98
99
100 <!--
101 **********************************************************
102 ** install - install the plugin in your local JOSM installation
103 **********************************************************
104 -->
105 <target name="install" depends="dist">
106 <property environment="env"/>
107 <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
108 <and>
109 <os family="windows"/>
110 </and>
111 </condition>
112 <copy file="${plugin.jar}" todir="${josm.plugins.dir}/tplug"/>
113 </target>
114
115</project>
Note: See TracBrowser for help on using the repository browser.