diff --git a/build.boot b/build.boot index b6828d0..efa9b91 100644 --- a/build.boot +++ b/build.boot @@ -1,13 +1,11 @@ (set-env! - :dependencies '[[org.clojure/clojure "1.6.0" :scope "provided"] - [boot/core "2.0.0-rc4" :scope "provided"] - [adzerk/bootlaces "0.1.8" :scope "test"]] + :dependencies '[[adzerk/bootlaces "0.1.12" :scope "test"]] :source-paths #{"src"}) (require '[adzerk.bootlaces :refer :all] '[alandipert.boot-trinkets :refer [run]]) -(def +version+ "1.0.1") +(def +version+ "2.0.0") (bootlaces! +version+) @@ -17,5 +15,4 @@ :description "Alan's odd collection of boot tasks and utilities" :url "https://github.com/alandipert/boot-trinkets" :scm {:url "https://github.com/alandipert/boot-trinkets"} - :license {:name "Eclipse Public License" - :url "http://www.eclipse.org/legal/epl-v10.html"}}) + :license {"Eclipse Public License" "http://www.eclipse.org/legal/epl-v10.html"}}) diff --git a/src/alandipert/boot_trinkets.clj b/src/alandipert/boot_trinkets.clj index bf68cf2..b024885 100644 --- a/src/alandipert/boot_trinkets.clj +++ b/src/alandipert/boot_trinkets.clj @@ -5,21 +5,8 @@ [boot.util :as util] [clojure.java.io :as io])) -(defmacro without-exiting - "Evaluates body in a context where System/exit doesn't work. - Returns result of evaluating body, or nil if code in body attempted to exit." - [& body] - `(let [old-sm# (System/getSecurityManager) - new-sm# (proxy [SecurityManager] [] - (checkPermission [p#]) - (checkExit [s#] (throw (SecurityException.))))] - (System/setSecurityManager ^SecurityManager new-sm#) - (try ~@body - (catch SecurityException e#) - (finally (System/setSecurityManager old-sm#))))) - (defn copy [tf dir] - (let [f (core/tmpfile tf)] + (let [f (core/tmp-file tf)] (io/copy f (doto (io/file dir (:path tf)) io/make-parents)))) (defn run-main @@ -34,7 +21,7 @@ "Add classes to a pod and run a main method." [m main CLASSNAME sym "The main class" a args ARGUMENTS [str] "String arguments to pass to the main class's main method"] - (let [classdir (core/temp-dir!) + (let [classdir (core/tmp-dir!) runners (pod/pod-pool (core/get-env))] (core/with-pre-wrap fileset (let [class-files (->> fileset