-
-
Notifications
You must be signed in to change notification settings - Fork 180
Using Boot in a Leiningen Project
Martin Klepsch edited this page Jun 19, 2015
·
8 revisions
The from-lein
task below will setup basic environment parameters taken from a project.clj for Boot. This makes it possible to run things like:
boot from-lein watch build-jar
-
boot from-lein build-jar
, etc.
If you want to override settings make sure you do so after calling the from-lein
task.
(deftask from-lein []
(let [lein-proj (let [l (-> "project.clj" slurp read-string)]
(merge (->> l (drop 3) (partition 2) (map vec) (into {}))
{:project (second l)
:version (nth l 2)}))]
(comp
(set-env!
:source-paths (or (:source-paths lein-proj) #{"src"})
:resource-paths (or (:resource-paths lein-proj) #{})
:dependencies (conj (:dependencies lein-proj)
'[adzerk/bootlaces "0.1.11" :scope "test"]))
(require '[adzerk.bootlaces :refer [bootlaces! build-jar push-release]])
((resolve #'bootlaces!) (:version lein-proj))
(task-options!
pom {:project (symbol (:project lein-proj))
:version (:version lein-proj)
:description (:description lein-proj)
:url (:url lein-proj)
:scm {:url "https://github.com/martinklepsch/boot-gzip"}
:license {"EPL" "http://www.eclipse.org/legal/epl-v10.html"}})
identity)))
You can find other developers and users in the #hoplon
channel on freenode IRC or the boot slack channel.
If you have questions or need help, please visit the Discourse site.
- Environments
- Boot environment
- Java environment
- Tasks
- Built-ins
- Third-party
- Tasks Options
- Filesets
- Target Directory
- Pods
- Boot Exceptions
- Configuring Boot
- Updating Boot
- Setting Clojure version
- JVM Options
- S3 Repositories
- Scripts
- Task Writer's Guide
- Require inside Tasks
- Boot for Leiningen Users
- Boot in Leiningen Projects
- Repl reloading
- Repository Credentials and Deploying
- Snippets
- Troubleshooting
- FAQ
- API docs
- Core
- Pod
- Util