From: Matthias Schmitz <matthias@sigxcpu.org>
Subject: Make classpath configurable

---
 build.xml |   39 +++++++++++++--------------------------
 1 file changed, 13 insertions(+), 26 deletions(-)

Index: davmail.git/build.xml
===================================================================
--- davmail.git.orig/build.xml	2018-06-25 12:51:47.128374822 +0200
+++ davmail.git/build.xml	2018-06-25 12:51:47.108374512 +0200
@@ -3,13 +3,26 @@
     <property name="version" value="4.8.6"/>
 
     <path id="classpath">
-        <pathelement location="classes"/>
-        <fileset dir="lib">
+        <fileset dir="lib" erroronmissingdir="false">
             <include name="*.jar"/>
-            <!-- make sure we compile with swt gtk 64 -->
             <exclude name="swt-*-x86.jar"/>
             <exclude name="swt-*-win32-*.jar"/>
         </fileset>
+        <!-- feeded by ant.properties file if needed -->
+        <pathelement location="${lib.commons-codec}" />
+        <pathelement location="${lib.servlet-api}" />
+        <pathelement location="${lib.commons-httpclient}" />
+        <pathelement location="${lib.commons-logging}" />
+        <pathelement location="${lib.htmlcleaner}" />
+        <pathelement location="${lib.mail}" />
+        <pathelement location="${lib.jcifs}" />
+        <pathelement location="${lib.jackrabbit-webdav}" />
+        <pathelement location="${lib.woodstox-core}" />
+        <pathelement location="${lib.stax2-api}" />
+        <pathelement location="${lib.swt}" />
+        <pathelement location="${lib.slf4j-api}" />
+        <pathelement location="${lib.slf4j-simple}" />
+        <pathelement location="${lib.log4j}" />
     </path>
 
     <target name="clean">
@@ -239,27 +252,7 @@
         <mkdir dir="dist"/>
         <property name="release-name" value="${release}-trunk"/>
         <pathconvert property="manifest-classpath" pathsep=" ">
-            <mapper>
-                <chainedmapper>
-                    <!-- remove absolute path -->
-                    <flattenmapper/>
-                    <globmapper from="*" to="lib/*"/>
-                </chainedmapper>
-            </mapper>
-            <path>
-                <fileset dir="lib">
-                    <include name="*.jar"/>
-                    <exclude name="ant-deb*.jar"/>
-                    <exclude name="jarbundler-*.jar"/>
-                    <exclude name="jsmoothgen-ant-*.jar"/>
-                    <exclude name="junit-*.jar"/>
-                    <exclude name="libgrowl-*.jar"/>
-                    <exclude name="nsisant-*.jar"/>
-                    <exclude name="servlet-api-*.jar"/>
-                    <exclude name="swt-*.jar"/>
-                    <exclude name="winrun4j-*.jar"/>
-                </fileset>
-            </path>
+            <path refid="classpath"/>
         </pathconvert>
         <jar basedir="target/classes" destfile="dist/davmail.jar">
             <manifest>
