1 | <project name="waypoints" default="dist" basedir=".">
|
---|
2 |
|
---|
3 | <!-- compilation properties -->
|
---|
4 | <property name="josm.build.dir" value="../../core"/>
|
---|
5 | <property name="josm.home.dir" value="${user.home}/.josm"/>
|
---|
6 | <property name="josm" location="../../core/dist/josm-custom.jar" />
|
---|
7 | <property name="plugin.build.dir" value="build"/>
|
---|
8 | <property name="plugin.dist.dir" value="../../dist"/>
|
---|
9 | <property name="plugin.name" value="${ant.project.name}"/>
|
---|
10 | <property name="plugin.jar" value="../../dist/${plugin.name}.jar"/>
|
---|
11 |
|
---|
12 | <!-- point to your JOSM directory -->
|
---|
13 | <property name="josm" location="../../core/dist/josm-custom.jar" />
|
---|
14 |
|
---|
15 | <property name="ant.build.javac.target" value="1.5"/>
|
---|
16 |
|
---|
17 |
|
---|
18 |
|
---|
19 | <target name="init">
|
---|
20 | <mkdir dir="build"></mkdir>
|
---|
21 | <mkdir dir="dist"></mkdir>
|
---|
22 | </target>
|
---|
23 |
|
---|
24 | <target name="compile" depends="init">
|
---|
25 | <echo message="creating ${plugin.jar}"/>
|
---|
26 | <javac srcdir="src" classpath="${josm}" destdir="build" debug="true">
|
---|
27 | <include name="**/*.java" />
|
---|
28 | </javac>
|
---|
29 | </target>
|
---|
30 |
|
---|
31 | <target name="dist" depends="compile">
|
---|
32 | <!--
|
---|
33 | <copy todir="build/images">
|
---|
34 | <fileset dir="images"></fileset>
|
---|
35 | </copy>
|
---|
36 | -->
|
---|
37 | <jar destfile="dist/waypoints.jar" basedir="build">
|
---|
38 | <manifest>
|
---|
39 | <attribute name="Plugin-Class" value="waypoints.WaypointPlugin" />
|
---|
40 | <attribute name="Plugin-Description" value="Automatic conversion of waypoints in a GPX file to OSM nodes." />
|
---|
41 | </manifest>
|
---|
42 | </jar>
|
---|
43 | </target>
|
---|
44 |
|
---|
45 | <!-- clean target -->
|
---|
46 | <target name="clean">
|
---|
47 | <delete dir="${plugin.build.dir}" />
|
---|
48 | <delete file="${plugin.jar}" />
|
---|
49 | </target>
|
---|
50 |
|
---|
51 | <target name="install" depends="dist">
|
---|
52 | <copy file="dist/waypoints.jar" todir="${user.home}/.josm/plugins"/>
|
---|
53 | </target>
|
---|
54 |
|
---|
55 | </project>
|
---|