aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorGlen Stampoultzis <glens@apache.org>2002-02-27 11:07:27 +0000
committerGlen Stampoultzis <glens@apache.org>2002-02-27 11:07:27 +0000
commit5a25601b343b1857987e3eaa10083beb55c7b8e0 (patch)
tree3715f5f0bf6395d45f050307dbf3ecc9f5fcf933 /tools
parent04f68b855476c26eea5e67db6f3e8ba805bd23f5 (diff)
downloadpoi-5a25601b343b1857987e3eaa10083beb55c7b8e0.tar.gz
poi-5a25601b343b1857987e3eaa10083beb55c7b8e0.zip
Moved examples and updated build to produce an examples jar file.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@352120 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'tools')
-rw-r--r--tools/targets/compile.xtarget33
-rw-r--r--tools/targets/init.xtarget8
-rw-r--r--tools/targets/preinit.xtarget5
3 files changed, 46 insertions, 0 deletions
diff --git a/tools/targets/compile.xtarget b/tools/targets/compile.xtarget
index 34afaa3cfe..040110d8a2 100644
--- a/tools/targets/compile.xtarget
+++ b/tools/targets/compile.xtarget
@@ -21,6 +21,12 @@
<fileset dir="${scratchpad.src}"/>
</copy>
+ <mkdir dir="${build.examples.src}"/>
+ <mkdir dir="${build.examples.dest}"/>
+ <copy todir="${build.examples.src}" filtering="on">
+ <fileset dir="${examples.src}"/>
+ </copy>
+
<mkdir dir="${build.contrib.src}"/>
<mkdir dir="${build.contrib.dest}"/>
<copy todir="${build.contrib.src}" filtering="on">
@@ -80,6 +86,27 @@
<classpath refid="scratchpad.classpath"/>
</javac>
+ <copy todir="${build.examples.dest}">
+ <fileset dir="${build.examples.src}">
+ <include name="**"/>
+ <!--
+ <include name="**/Manifest.mf"/>
+ <include name="**/*.xsl"/>
+ <include name="**/*.roles"/>
+ <include name="**/*.xconf"/>
+ <include name="META-INF/**"/>
+ -->
+ </fileset>
+ </copy>
+
+ <javac srcdir="${build.examples.src}"
+ destdir="${build.examples.dest}"
+ debug="${debug}"
+ optimize="${optimize}"
+ deprecation="${deprecation}"
+ target="${target.vm}">
+ <classpath refid="examples.classpath"/>
+ </javac>
<copy todir="${build.contrib.dest}">
<fileset dir="${build.contrib.src}">
@@ -123,6 +150,12 @@
</fileset>
</jar>
+ <jar jarfile="${build.dir}/${examples.name}.jar">
+ <fileset dir="${build.examples.dest}">
+ <include name="**"/>
+ </fileset>
+ </jar>
+
<jar jarfile="${build.dir}/${contrib.name}.jar">
<fileset dir="${build.contrib.dest}">
<include name="**"/>
diff --git a/tools/targets/init.xtarget b/tools/targets/init.xtarget
index f791f0658a..54a74d278a 100644
--- a/tools/targets/init.xtarget
+++ b/tools/targets/init.xtarget
@@ -40,6 +40,11 @@
<property name="scratchpad.lib" value="${scratchpad.dir}/lib"/>
<property name="scratchpad.name" value="${name}-scratchpad"/>
+ <property name="examples.dir" value="${src.dir}/examples"/>
+ <property name="examples.src" value="${examples.dir}/src"/>
+ <property name="examples.lib" value="${examples.dir}/lib"/>
+ <property name="examples.name" value="${name}-examples"/>
+
<property name="contrib.dir" value="${src.dir}/contrib"/>
<property name="contrib.src" value="${contrib.dir}/src"/>
<property name="contrib.lib" value="${contrib.dir}/lib"/>
@@ -58,6 +63,9 @@
<property name="build.scratchpad" value="${build.dir}/scratchpad"/>
<property name="build.scratchpad.src" value="${build.scratchpad}/src"/>
<property name="build.scratchpad.dest" value="${build.scratchpad}/classes"/>
+ <property name="build.examples" value="${build.dir}/examples"/>
+ <property name="build.examples.src" value="${build.examples}/src"/>
+ <property name="build.examples.dest" value="${build.examples}/classes"/>
<property name="build.contrib" value="${build.dir}/contrib"/>
<property name="build.contrib.src" value="${build.contrib}/src"/>
<property name="build.contrib.dest" value="${build.contrib}/classes"/>
diff --git a/tools/targets/preinit.xtarget b/tools/targets/preinit.xtarget
index 27a9ed9fcf..4bdfe33f98 100644
--- a/tools/targets/preinit.xtarget
+++ b/tools/targets/preinit.xtarget
@@ -50,6 +50,11 @@
<pathelement path="./build/${name}/classes"/>
</path>
+ <path id="examples.classpath">
+ <!-- FIXME : how to build a path that references a property set in 'init' target ? -->
+ <pathelement path="./build/${name}/classes"/>
+ </path>
+
<path id="contrib.classpath">
<fileset dir="./lib/core">
<include name="*.jar"/>