comparison build.xml @ 25:cbd67b1100d8

Initial commit of the first prototype.
author Raimund Renkert <rrenkert@intevation.de>
date Fri, 08 Apr 2011 11:47:59 +0200
parents
children 0e71a1f71ec0
comparison
equal deleted inserted replaced
24:c0060abb7457 25:cbd67b1100d8
1 <?xml version="1.0"?>
2 <!DOCTYPE project[
3 <!ENTITY properties SYSTEM "properties.xml">
4 ]>
5 <!-- :mode=ant -->
6
7 <project name="MXD-Konverter" default="all" basedir=".">
8 <!-- import external XML fragments -->
9 &properties;
10 <!-- import sample properties -->
11 <!-- TODO: edit sample.properties file before importing -->
12 <property file="sample.properties"/>
13 <path id="compile.classpath">
14 <pathelement location="${arcobjects.jar}"/>
15 <fileset dir="${libs.dir}">
16 <include name="**/*.jar"/>
17 </fileset>
18 </path>
19 <path id="run.classpath">
20 <path refid="compile.classpath"/>
21 <pathelement location="${class.dir}"/>
22 <pathelement location="${src.dir}"/>
23 </path>
24
25 <!-- ========================================= -->
26 <!-- private targets -->
27 <!-- ========================================= -->
28 <target name="init">
29 <!-- create the time stamp -->
30 <tstamp/>
31 <!-- create the build directory structure used by compile -->
32 <mkdir dir="${build.dir}"/>
33 <mkdir dir="${class.dir}"/>
34 </target>
35
36 <target name="validate-runtime" depends="init">
37 <condition property="runtimeAvailable">
38 <isset property="runtime.home"/>
39 </condition>
40 <fail message="No runtime installed. You need to install ArcGIS Engine, Desktop or Server to run this sample." unless="runtimeAvailable"/>
41 </target>
42
43 <target name="compile" depends="validate-runtime">
44 <!-- javac resolver needed to run inside of Websphere Studio -->
45 <available classname="org.eclipse.core.launcher.Main" property="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter" classpath="${java.class.path}" />
46 <!-- compile the java code from ${src.dir} into ${class.dir} -->
47 <javac srcdir="${src.dir}" destdir="${class.dir}" debug="on">
48 <classpath refid="compile.classpath"/>
49 </javac>
50 <copy todir="${class.dir}">
51 <fileset dir="${src.dir}" includes="**/icons/*" />
52 </copy>
53 </target>
54
55 <target name="jar" depends="compile">
56 <mkdir dir="${dist.dir}" />
57 <jar jarfile="${dist.dir}/${sample.dir}.jar" compress="true" basedir="${class.dir}">
58 <manifest>
59 <attribute name="Main-Class" value="${main.class}"/>
60 </manifest>
61 </jar>
62 </target>
63
64 <target name="usage">
65 <echo message="Execute 'ant -projecthelp' for the build file help"/>
66 <echo message="Execute 'ant -help' for Ant help"/>
67 </target>
68
69 <target name="execute" depends="compile">
70 <java classname="Converter" failonerror="true" fork="true">
71 <jvmarg value="-Xss2m"/>
72 <classpath refid="run.classpath"/>
73 </java>
74 </target>
75
76 <!-- ========================================= -->
77 <!-- public targets -->
78 <!-- ========================================= -->
79
80 <target name="all" depends="compile" description="build everything">
81 <echo message="application built"/>
82 </target>
83
84 <target name="clean" description="clean all build products">
85 <!-- delete the ${build} directory trees -->
86 <delete dir="${build.dir}"/>
87 <echo message="build directory gone!"/>
88 </target>
89
90 <target name="help" depends="usage" description="usage" />
91 <target name="dist" depends="jar" description="create distributable products" />
92 <target name="run-sample" depends="execute" description="execute the sample with args set in sample.properties"/>
93 </project>
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)