source: osm/applications/editors/josm/plugins/piclayer/build.xml@ 16290

Last change on this file since 16290 was 16290, checked in by stoecker, 15 years ago

adapted plugins to JOSm 1722, UtilsPlugin still has a problem

File size: 5.1 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-->
23<project name="PicLayer" default="dist" basedir=".">
24 <!--
25 ************************************************
26 ** should not be necessary to change the following properties
27 -->
28 <property name="josm" location="../../core/dist/josm-custom.jar"/>
29 <property name="plugin.build.dir" value="build"/>
30 <property name="plugin.src.dir" value="src"/>
31 <!-- this is the directory where the plugin jar is copied to -->
32 <property name="plugin.dist.dir" value="../../dist"/>
33 <property name="ant.build.javac.target" value="1.5"/>
34 <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/>
35
36 <!--
37 **********************************************************
38 ** init - initializes the build
39 **********************************************************
40 -->
41 <target name="init">
42 <mkdir dir="${plugin.build.dir}"/>
43 </target>
44
45 <!--
46 **********************************************************
47 ** compile - complies the source tree
48 **********************************************************
49 -->
50 <target name="compile" depends="init">
51 <echo message="compiling sources for ${ant.project.name} ... "/>
52 <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}">
53 <compilerarg value="-Xlint:deprecation"/>
54 <compilerarg value="-Xlint:unchecked"/>
55 </javac>
56 </target>
57
58 <!--
59 **********************************************************
60 ** dist - creates the plugin jar
61 **********************************************************
62 -->
63 <target name="dist" depends="compile,revision">
64 <echo message="creating ${plugin.jar} ... "/>
65 <copy todir="${plugin.build.dir}/resources">
66 <fileset dir="resources"/>
67 </copy>
68 <copy todir="${plugin.build.dir}/images">
69 <fileset dir="images"/>
70 </copy>
71 <copy todir="${plugin.build.dir}">
72 <fileset dir=".">
73 <include name="README" />
74 <include name="LICENSE" />
75 </fileset>
76 </copy>
77 <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
78 <manifest>
79 <attribute name="Author" value="Tomasz Stelmach"/>
80 <attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.piclayer.PicLayerPlugin"/>
81 <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
82 <attribute name="Plugin-Description" value="This plugin allows to display any picture as a background in the editor and align it with the map."/>
83 <attribute name="Plugin-Mainversion" value="1722"/>
84 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
85 </manifest>
86 </jar>
87 </target>
88
89 <!--
90 **********************************************************
91 ** revision - extracts the current revision number for the
92 ** file build.number and stores it in the XML property
93 ** version.*
94 **********************************************************
95 -->
96 <target name="revision">
97
98 <!-- extract the SVN revision information for file build.number -->
99 <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
100 <env key="LANG" value="C"/>
101 <arg value="info"/>
102 <arg value="--xml"/>
103 <arg value="."/>
104 </exec>
105 <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
106 <delete file="REVISION"/>
107 </target>
108
109 <!--
110 **********************************************************
111 ** clean - clean up the build environment
112 **********************************************************
113 -->
114 <target name="clean">
115 <delete dir="${plugin.build.dir}"/>
116 <delete file="${plugin.jar}"/>
117 </target>
118
119 <!--
120 **********************************************************
121 ** install - install the plugin in your local JOSM installation
122 **********************************************************
123 -->
124 <target name="install" depends="dist">
125 <property environment="env"/>
126 <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
127 <and>
128 <os family="windows"/>
129 </and>
130 </condition>
131 <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
132 </target>
133</project>
Note: See TracBrowser for help on using the repository browser.