diff 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
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/build.xml	Fri Apr 08 11:47:59 2011 +0200
@@ -0,0 +1,93 @@
+<?xml version="1.0"?>
+<!DOCTYPE project[
+  <!ENTITY properties SYSTEM "properties.xml">
+]>
+<!-- :mode=ant -->
+
+<project name="MXD-Konverter" default="all" basedir=".">
+  <!-- import external XML fragments -->
+  &properties;
+  <!-- import sample properties -->
+  <!-- TODO: edit sample.properties file before importing -->
+  <property file="sample.properties"/>
+  <path id="compile.classpath">
+    <pathelement location="${arcobjects.jar}"/>
+    <fileset dir="${libs.dir}">
+      <include name="**/*.jar"/>
+    </fileset>
+  </path>
+  <path id="run.classpath">
+    <path refid="compile.classpath"/>
+    <pathelement location="${class.dir}"/>
+    <pathelement location="${src.dir}"/>
+  </path>
+
+  <!-- ========================================= -->
+  <!-- private targets -->
+  <!-- ========================================= -->
+  <target name="init">
+    <!-- create the time stamp -->
+    <tstamp/>
+    <!-- create the build directory structure used by compile -->
+    <mkdir dir="${build.dir}"/>
+    <mkdir dir="${class.dir}"/>
+  </target>
+
+  <target name="validate-runtime" depends="init">
+    <condition property="runtimeAvailable">
+      <isset property="runtime.home"/>
+    </condition>
+    <fail message="No runtime installed. You need to install ArcGIS Engine, Desktop or Server to run this sample." unless="runtimeAvailable"/>
+  </target>
+
+  <target name="compile" depends="validate-runtime">
+  <!-- javac resolver needed to run inside of Websphere Studio -->
+    <available classname="org.eclipse.core.launcher.Main" property="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter" classpath="${java.class.path}" />
+    <!-- compile the java code from ${src.dir} into ${class.dir} -->
+    <javac srcdir="${src.dir}" destdir="${class.dir}" debug="on">
+      <classpath refid="compile.classpath"/>
+    </javac>
+    <copy todir="${class.dir}">
+      <fileset dir="${src.dir}" includes="**/icons/*" />
+    </copy>
+  </target>
+
+  <target name="jar" depends="compile">
+    <mkdir dir="${dist.dir}" />
+    <jar jarfile="${dist.dir}/${sample.dir}.jar" compress="true" basedir="${class.dir}">
+      <manifest>
+        <attribute name="Main-Class" value="${main.class}"/>
+      </manifest>	
+    </jar>
+  </target>
+
+  <target name="usage">
+    <echo message="Execute 'ant -projecthelp' for the build file help"/>
+    <echo message="Execute 'ant -help' for Ant help"/>
+  </target>
+
+  <target name="execute" depends="compile">
+    <java classname="Converter" failonerror="true" fork="true">
+      <jvmarg value="-Xss2m"/>
+      <classpath refid="run.classpath"/>
+    </java>
+  </target>
+
+  <!-- ========================================= -->
+  <!-- public targets -->
+  <!-- ========================================= -->
+
+  <target name="all" depends="compile" description="build everything">
+    <echo message="application built"/>
+  </target>
+
+  <target name="clean" description="clean all build products">
+    <!-- delete the ${build} directory trees -->
+    <delete dir="${build.dir}"/>
+    <echo message="build directory gone!"/>
+  </target>
+
+  <target name="help" depends="usage" description="usage" />
+  <target name="dist" depends="jar" description="create distributable products" />
+  <target name="run-sample" depends="execute" description="execute the sample with args set in sample.properties"/>
+</project>
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)