clojureboot-clj

How i can add github/local dependencies with Boot (clojure)


For instance i want to fork some existing clojar, extend it and use in my project.

How i can do this w/o pushing to clojars/maven?

Interested in both options: link to github and local path.

Thanks!

UPD

What i want is to include some existing Clojure project as dependency, similar like ruby gem allows. Is this possible with Boot? Or i always need to compile to java?


Solution

  • Here is how I have setup my fork of castra on the castra-simple example for hoplon.

    https://github.com/hoplon/demos/tree/master/castra-simple

    open shell

    git clone castra:repo

    in castra dir

    file: build.boot

    ; ...
    (def +version+ "3.0.0-SNAPSHOT")
    ; ...
    

    boot watch build-jar

    open new shell

    git clone castra-simple:repo

    in castra-simple

    file: boot.build

    (set-env!
     :dependencies
     '[
       ;; ...
       [hoplon/castra             "3.0.0-SNAPSHOT"] ;;forked repo
       ;; ...
       ]
     :source-paths   #{"src"}
     :resource-paths #{"assets"})
    
    ;; ...
    
    (deftask dev
      "Build castra-simple for local development."
      []
      (comp
       (serve
        :handler 'app.handler/app
        :reload true
        :port 8000)
       (watch) (speak) (hoplon) (reload) (cljs-repl) (cljs)
    
       ;;forked repo
       (checkout :dependencies '[[hoplon/castra "3.0.0-SNAPSHOT"]])))
    

    boot dev