source: osm/applications/editors/josm/plugins/mappaint/build.xml@ 5993

Last change on this file since 5993 was 5207, checked in by ulf, 17 years ago
  • find the JOSM home dir independent of the platform
  • some cleanup
  • some minor fixes (e.g. clean_install)
File size: 2.7 KB
Line 
1<project name="mappaint" default="dist" basedir=".">
2
3 <!-- josm "user home" directory depends on the platform used (windows has a different place than unix/linux) -->
4 <property environment="env"/>
5 <condition property="josm.home.dir" value="${env.APPDATA}/JOSM" else="${user.home}/.josm">
6 <and>
7 <os family="windows"/>
8 </and>
9 </condition>
10
11 <!-- compilation properties -->
12 <property name="josm.build.dir" value="../../core"/>
13 <property name="josm.plugins.dir" value="${josm.home.dir}/plugins"/>
14 <property name="josm.jar" location="../../core/dist/josm-custom.jar" />
15 <property name="plugin.build.dir" value="build"/>
16 <property name="plugin.dist.dir" value="../dist"/>
17 <property name="plugin.name" value="${ant.project.name}"/>
18 <property name="plugin.jar" value="../dist/${plugin.name}.jar"/>
19
20
21 <!-- you should not need to modify anything below this! -->
22
23 <target name="compile">
24 <mkdir dir="${plugin.build.dir}"></mkdir>
25 <javac srcdir="src" classpath="${josm.jar}" destdir="${plugin.build.dir}" debug="true" source="1.5" target="1.5">
26 <include name="**/*.java" />
27 <!--compilerarg value="-Xlint:deprecation"/-->
28 </javac>
29 </target>
30
31 <target name="dist" depends="compile">
32 <!-- copy the "standard" mappaint style -->
33 <copy todir="${plugin.build.dir}/standard">
34 <fileset dir="styles/standard"></fileset>
35 </copy>
36 <!-- define the version of the jar file -->
37 <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
38 <env key="LANG" value="C"/>
39 <arg value="info"/>
40 <arg value="--xml"/>
41 <arg value="."/>
42 </exec>
43 <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
44 <!-- delete intermediate file -->
45 <delete file="REVISION"/>
46 <!-- create jar file with manifest -->
47 <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
48 <manifest>
49 <attribute name="Plugin-Class" value="mappaint.MapPaintPlugin" />
50 <attribute name="Plugin-Description" value="An alternative render for the map with colouring, line thickness and icons.&lt;br&gt;" />
51 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
52 <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
53 <attribute name="Author" value="Nick Whitelegg / Ulf Lamping"/>
54 </manifest>
55 </jar>
56 </target>
57
58 <target name="clean">
59 <delete dir="${plugin.build.dir}" />
60 <delete file="${plugin.jar}" />
61 </target>
62
63 <target name="clean_install">
64 <delete file="${josm.plugins.dir}/${plugin.name}.jar" />
65 </target>
66
67 <target name="install" depends="dist">
68 <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
69 </target>
70
71</project>
Note: See TracBrowser for help on using the repository browser.