[154] | 1 | <project name="josm" default="dist" basedir=".">
|
---|
[109] | 2 |
|
---|
[151] | 3 | <!-- All jar files necessary to run only JOSM (no tests) -->
|
---|
| 4 | <fileset id="josm_required_libs" dir="lib">
|
---|
[764] | 5 | <include name="gettext-commons-0.9.2.jar"/>
|
---|
[392] | 6 | <include name="metadata-extractor-2.3.1-nosun.jar"/>
|
---|
[151] | 7 | </fileset>
|
---|
| 8 |
|
---|
| 9 | <!-- Java classpath addition (all jar files to compile tests with this) -->
|
---|
[111] | 10 | <path id="classpath">
|
---|
[151] | 11 | <fileset dir="lib">
|
---|
[111] | 12 | <include name="**/*.jar"/>
|
---|
| 13 | </fileset>
|
---|
| 14 | </path>
|
---|
[109] | 15 |
|
---|
[135] | 16 | <target name="dist" depends="compile">
|
---|
[111] | 17 | <!-- jars -->
|
---|
[151] | 18 | <unjar dest="build">
|
---|
| 19 | <fileset refid="josm_required_libs" />
|
---|
| 20 | </unjar>
|
---|
[109] | 21 |
|
---|
[1079] | 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 |
|
---|
[111] | 38 | <!-- images -->
|
---|
[151] | 39 | <copy todir="build/images">
|
---|
[111] | 40 | <fileset dir="images" />
|
---|
| 41 | </copy>
|
---|
[154] | 42 |
|
---|
[397] | 43 | <!-- presets -->
|
---|
| 44 | <copy todir="build/presets">
|
---|
| 45 | <fileset dir="presets" />
|
---|
| 46 | </copy>
|
---|
| 47 |
|
---|
[1079] | 48 | <copy file="CONTRIBUTION" todir="build"/>
|
---|
| 49 | <copy file="README" todir="build"/>
|
---|
| 50 | <copy file="LICENSE" todir="build"/>
|
---|
| 51 |
|
---|
| 52 | <!-- styles -->
|
---|
[790] | 53 | <copy file="styles/standard/elemstyles.xml" todir="build/styles/standard"/>
|
---|
| 54 |
|
---|
[151] | 55 | <!-- create josm-custom.jar -->
|
---|
[407] | 56 | <delete file="dist/josm-custom.jar"/>
|
---|
[151] | 57 | <jar destfile="dist/josm-custom.jar" basedir="build">
|
---|
[111] | 58 | <manifest>
|
---|
[1023] | 59 | <attribute name="Main-class" value="JOSM" />
|
---|
[1079] | 60 | <attribute name="Main-Version" value="${version.entry.commit.revision} SVN"/>
|
---|
| 61 | <attribute name="Main-Date" value="${version.entry.commit.date}"/>
|
---|
[111] | 62 | </manifest>
|
---|
| 63 | </jar>
|
---|
| 64 | </target>
|
---|
[109] | 65 |
|
---|
[151] | 66 | <target name="compile" depends="init">
|
---|
[639] | 67 | <javac srcdir="src" classpathref="classpath" destdir="build"
|
---|
[793] | 68 | target="1.5" source="1.5" debug="on" encoding="UTF-8">
|
---|
[529] | 69 | <compilerarg value="-Xlint:deprecation"/>
|
---|
| 70 | </javac>
|
---|
[151] | 71 | </target>
|
---|
| 72 |
|
---|
| 73 | <target name="init">
|
---|
| 74 | <mkdir dir="build" />
|
---|
| 75 | <mkdir dir="dist" />
|
---|
| 76 | </target>
|
---|
| 77 |
|
---|
| 78 | <target name="clean">
|
---|
| 79 | <delete dir="build" />
|
---|
| 80 | <delete dir="dist" />
|
---|
| 81 | </target>
|
---|
| 82 |
|
---|
[109] | 83 | </project>
|
---|