[5153] | 1 | <project name="waypoints" default="dist" basedir=".">
|
---|
[1495] | 2 |
|
---|
[5153] | 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"/>
|
---|
[6100] | 8 | <property name="plugin.dist.dir" value="../../dist"/>
|
---|
[5153] | 9 | <property name="plugin.name" value="${ant.project.name}"/>
|
---|
[6100] | 10 | <property name="plugin.jar" value="../../dist/${plugin.name}.jar"/>
|
---|
[5153] | 11 |
|
---|
[5147] | 12 | <!-- point to your JOSM directory -->
|
---|
| 13 | <property name="josm" location="../../core/dist/josm-custom.jar" />
|
---|
[1495] | 14 |
|
---|
[5197] | 15 | <property name="ant.build.javac.target" value="1.5"/>
|
---|
[1495] | 16 |
|
---|
| 17 |
|
---|
[5197] | 18 |
|
---|
[5147] | 19 | <target name="init">
|
---|
| 20 | <mkdir dir="build"></mkdir>
|
---|
| 21 | <mkdir dir="dist"></mkdir>
|
---|
| 22 | </target>
|
---|
[1495] | 23 |
|
---|
[5147] | 24 | <target name="compile" depends="init">
|
---|
[7287] | 25 | <echo message="creating ${plugin.jar}"/>
|
---|
[5147] | 26 | <javac srcdir="src" classpath="${josm}" destdir="build" debug="true">
|
---|
| 27 | <include name="**/*.java" />
|
---|
| 28 | </javac>
|
---|
| 29 | </target>
|
---|
[1495] | 30 |
|
---|
[5153] | 31 | <target name="dist" depends="compile">
|
---|
[5147] | 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>
|
---|
[1495] | 44 |
|
---|
[5153] | 45 | <!-- clean target -->
|
---|
[5147] | 46 | <target name="clean">
|
---|
[5153] | 47 | <delete dir="${plugin.build.dir}" />
|
---|
| 48 | <delete file="${plugin.jar}" />
|
---|
[5147] | 49 | </target>
|
---|
[1495] | 50 |
|
---|
[5153] | 51 | <target name="install" depends="dist">
|
---|
[5147] | 52 | <copy file="dist/waypoints.jar" todir="${user.home}/.josm/plugins"/>
|
---|
| 53 | </target>
|
---|
[1495] | 54 |
|
---|
| 55 | </project>
|
---|