1 | <project name="ywms" default="build" basedir=".">
|
---|
2 |
|
---|
3 | <!-- point to your JOSM directory -->
|
---|
4 | <property name="josm" location="../../core/dist/josm-custom.jar" />
|
---|
5 |
|
---|
6 |
|
---|
7 |
|
---|
8 | <target name="init">
|
---|
9 | <mkdir dir="build"/>
|
---|
10 | </target>
|
---|
11 |
|
---|
12 | <target name="compile" depends="init">
|
---|
13 | <javac srcdir="src" classpath="${josm}" destdir="build" debug="true">
|
---|
14 | <include name="**/*.java" />
|
---|
15 | </javac>
|
---|
16 | </target>
|
---|
17 |
|
---|
18 | <target name="build" depends="compile">
|
---|
19 | <copy todir="build/resources">
|
---|
20 | <fileset dir="resources"/>
|
---|
21 | </copy>
|
---|
22 | <copy todir="build/images">
|
---|
23 | <fileset dir="images"/>
|
---|
24 | </copy>
|
---|
25 | <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
|
---|
26 | <env key="LANG" value="C"/>
|
---|
27 | <arg value="info"/>
|
---|
28 | <arg value="--xml"/>
|
---|
29 | <arg value="."/>
|
---|
30 | </exec>
|
---|
31 | <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
|
---|
32 | <delete file="REVISION"/>
|
---|
33 | <jar destfile="ywms.jar" basedir="build">
|
---|
34 | <manifest>
|
---|
35 | <attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.ywms.YWMSPlugin"/>
|
---|
36 | <attribute name="Plugin-Description" value="A WMS server for Yahoo imagery based on Firefox"/>
|
---|
37 | <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
|
---|
38 | <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
|
---|
39 | <attribute name="Author" value="Francisco R. Santos <frsantos@gmail.com>"/>
|
---|
40 | </manifest>
|
---|
41 | </jar>
|
---|
42 | </target>
|
---|
43 |
|
---|
44 | <target name="clean">
|
---|
45 | <delete dir="build" />
|
---|
46 | </target>
|
---|
47 |
|
---|
48 | <target name="install" depends="build">
|
---|
49 | <copy file="ywms.jar" todir="${user.home}/.josm/plugins"/>
|
---|
50 | </target>
|
---|
51 |
|
---|
52 | <target name="test" depends="install">
|
---|
53 | <java jar="${josm}" fork="true"/>
|
---|
54 | </target>
|
---|
55 |
|
---|
56 | </project>
|
---|