4

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?

Kirill Salykin
  • 681
  • 6
  • 19
  • Maybe this could help ? http://stackoverflow.com/questions/4955635/how-to-add-local-jar-files-in-maven-project – Viktor K. Sep 13 '15 at 21:13
  • Not much, 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? – Kirill Salykin Sep 15 '15 at 12:15

2 Answers2

3

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

PPPaul
  • 361
  • 1
  • 7
0

As i figured out with Boot you can specify source-paths:

(set-env! :source-paths   #{"src", "../clj-mailgun/src"})

This is the only way to add other projects into your. (adding source-code, not .jar)

There is no way to specify github link - you should clone it manually and add to :source-paths path.

Please correct me if i am missing something.

Kirill Salykin
  • 681
  • 6
  • 19
  • 1
    This is getting me halfway to the solution. I am running into a problem where my library/fork has a `build.boot` file that needs to be has some deps of it's own that aren't being found by my main `build.boot` file. – PPPaul Feb 04 '16 at 20:29
  • I have talked with micha about this, and he suggests using `boot checkout -h` which is supposed to be for this situation. – PPPaul Feb 04 '16 at 21:25
  • @PPPaul boot checkout seems deprecated now, would you know what replaces it ? – nha Jun 11 '16 at 14:56