source: josm/trunk/build.xml@ 1682

Last change on this file since 1682 was 1682, checked in by Gubaer, 15 years ago

removed old conflict resolution code
fixed bug in OsmApi (missing changeset initialization)

File size: 3.1 KB
Line 
1<project name="josm" default="dist" basedir=".">
2
3 <!-- Java classpath addition (all jar files to compile tests with this) -->
4 <path id="classpath">
5 <fileset dir="lib">
6 <include name="**/*.jar"/>
7 </fileset>
8 </path>
9
10 <target name="dist" depends="compile">
11
12 <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
13 <env key="LANG" value="C"/>
14 <arg value="info"/>
15 <arg value="--xml"/>
16 <arg value="."/>
17 </exec>
18 <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
19 <delete file="REVISION"/>
20 <property name="version.entry.commit.revision" value="UNKNOWN"/>
21 <property name="version.entry.commit.date" value="UNKNOWN"/>
22
23 <copy file="CONTRIBUTION" todir="build"/>
24 <copy file="README" todir="build"/>
25 <copy file="LICENSE" todir="build"/>
26
27 <!-- styles -->
28 <copy file="styles/standard/elemstyles.xml" todir="build/styles/standard"/>
29
30 <!-- create josm-custom.jar -->
31 <delete file="dist/josm-custom.jar"/>
32 <jar destfile="dist/josm-custom.jar" basedir="build">
33 <manifest>
34 <attribute name="Main-class" value="JOSM" />
35 <attribute name="Main-Version" value="${version.entry.commit.revision} SVN"/>
36 <attribute name="Main-Date" value="${version.entry.commit.date}"/>
37 </manifest>
38 <zipfileset dir="presets" prefix="presets" />
39 <zipfileset dir="images" prefix="images" />
40 <zipfileset src="lib/josm-translation.jar" />
41
42 <!-- All jar files necessary to run only JOSM (no tests) -->
43 <zipfileset src="lib/gettext-commons-0.9.6.jar" />
44 <zipfileset src="lib/metadata-extractor-2.3.1-nosun.jar" />
45 </jar>
46 </target>
47
48 <target name="distmac" depends="dist">
49 <!-- modify MacOS X Info.plist file to hold the SVN version number -->
50 <copy file="macosx/JOSM.app/Contents/Info.plist" todir="build"/>
51 <replace file="build/Info.plist" token="@SVNVersion@" value="${version.entry.commit.revision}"/>
52 <!-- create ZIP file with MacOS X application bundle -->
53 <zip destfile="dist/josm-custom-macosx.zip" update="true">
54 <zipfileset dir="build" includes="CONTRIBUTION README LICENSE"/>
55 <zipfileset dir="macosx" includes="JOSM.app/Contents JOSM.app/Contents/MacOS JOSM.app/Contents/Resources JOSM.app/Contents/Resources/Java JOSM.app/Contents/PkgInfo JOSM.app/Contents/Resources/JOSM.icns"/>
56 <zipfileset dir="build" includes="Info.plist" prefix="JOSM.app/Contents"/>
57 <zipfileset dir="dist" includes="josm-custom.jar" prefix="JOSM.app/Contents/Resources/Java"/>
58 <zipfileset dir="macosx" includes="JOSM.app/Contents/MacOS/JOSM" filemode="755"/>
59 </zip>
60 </target>
61
62 <target name="compile" depends="init">
63 <javac srcdir="src" classpathref="classpath" destdir="build"
64 target="1.5" source="1.5" debug="on" encoding="UTF-8">
65 <compilerarg value="-Xlint:deprecation"/>
66 </javac>
67 </target>
68
69 <target name="init">
70 <mkdir dir="build" />
71 <mkdir dir="dist" />
72 </target>
73
74 <target name="clean">
75 <delete dir="build" />
76 <delete dir="dist" />
77 </target>
78
79 <target name="dev-deploy" depends="dist">
80 <copy file="dist/josm-custom.jar" todir="C:\data\projekte\osm\tag-editor-plugin"/>
81 </target>
82
83</project>
Note: See TracBrowser for help on using the repository browser.