source: subversion/applications/rendering/OSMLabelOptimizer/build.xml @ 29147

Last change on this file since 29147 was 17182, checked in by esscue, 10 years ago
File size: 2.1 KB
Line 
1<project name="OSMLabelOptimizer" default="compile" basedir=".">
2    <description>
3        simple example build file
4    </description>
5  <!-- set global properties for this build -->
6  <property name="src" location="src"/>
7  <property name="build" location="build"/>
8  <property name="dist"  location="dist"/>
9  <property name="libs" location="libs" />
10  <property name="dist_libs" location="${dist}/libs" />
11  <property name="docs" location="docs" />
12  <property name="javadoc" location="${docs}/javadoc" />
13  <path id="classpath">
14        <fileset dir="${libs}">
15                <include name="*.jar"/>
16        </fileset>
17  </path>
18
19
20  <target name="init">
21    <!-- Create the build directory structure used by compile -->
22    <mkdir dir="${build}"/>
23  </target>
24
25  <target name="compile" depends="init"
26        description="compile the source " >
27    <!-- Compile the java code from ${src} into ${build} -->
28    <javac srcdir="${src}" destdir="${build}">
29      <classpath refid="classpath"/>
30    </javac>
31  </target>
32
33  <target name="javadoc" description="generate javadoc">
34          <mkdir dir="${javadoc}"/>
35          <javadoc sourcepath="${src}" destdir="${javadoc}">
36                  <classpath refid="classpath"/>
37          </javadoc>
38  </target>
39
40  <target name="dist" depends="compile"
41        description="generate the distribution" >
42    <!-- Create the distribution directory -->
43    <mkdir dir="${dist_libs}"/>
44        <copy todir="${dist_libs}">
45                <fileset dir="${libs}" />
46        </copy>
47    <pathconvert property="cp" pathsep=" ">
48      <path refid="classpath" />
49      <chainedmapper>
50        <flattenmapper/>
51        <globmapper from="*" to="libs/*"/>
52      </chainedmapper>
53    </pathconvert>
54
55    <!-- Put everything in ${build} into the OSMLabelOptimizer.jar file -->
56    <jar jarfile="${dist}/OSMLabelOptimizer.jar" basedir="${build}">
57        <manifest>
58                <attribute name="Main-Class" value="OSMLabelOptimizer"/>
59                <attribute name="Class-Path" value="${cp}"/>
60            </manifest>
61        </jar>
62  </target>
63
64  <target name="clean"
65        description="clean up" >
66    <!-- Delete the ${build} and ${dist} directory trees -->
67    <delete dir="${build}"/>
68    <delete dir="${dist}"/>
69  </target>
70</project>
Note: See TracBrowser for help on using the repository browser.