 
 (defn instantiate-task [project name props & filesets]
   (let [task (.createTask project name)]
-    (throw-if (nil? task) (str "No task named " name))
+    (when-not task
+      (throw (Exception. (format "No task named %s." name))))
     (doto task
       (.init)
       (.setProject project)
       (set-properties! props))
     (doseq [fs filesets]
-      (.add task fs))
+      (.addFileset task fs))
     task))
 
 (defn runonce

(ns lancet.core
  (:gen-class)
  (:use [clojure.contrib.except :only (throw-if)]
        clojure.contrib.shell-out
        [clojure.contrib.str-utils :only (re-split)])
  (:import (java.beans Introspector) (java.util.concurrent CountDownLatch)))

(defmulti coerce (fn [dest-class src-inst] [dest-class (class src-inst)]))



(define-all-ant-tasks)

;; Newer versions of ant don't have this class:
;; (define-ant-type files org.apache.tools.ant.types.resources.Files)
(define-ant-type fileset org.apache.tools.ant.types.FileSet)

(defn -main [& targs]
