source: josm/trunk/build.xml@ 1438

Last change on this file since 1438 was 1141, checked in by stoecker, 16 years ago

supply default version

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