Fork me on GitHub
#boot
<
2017-04-26
>
ejemba12:04:49

hi o/ is that possible to manage a java project with boot ?

pjullah14:04:11

Hi. I'm experiencing something odd in a REPL session. Can anyone shed some light on it?

cli.core=> *clojure-version*
{:major 1, :minor 9, :incremental 0, :qualifier "alpha15"}
cli.core=> (defn foo [] "bar")
#'cli.core/foo
cli.core=> (foo)

java.lang.IllegalStateException: Attempting to call unbound fn: #'cli.core/foo

martinklepsch14:04:24

@ejemba Haven’t done it myself but I think so. There’s a task to compile java: boot javac -h

ejemba16:04:26

@martinklepsch thanks I'll try to find a project with java

ejemba16:04:43

this guy is everywhere 🙂

alandipert16:04:10

the secret is out

alandipert16:04:14

i love boot boot-clj

colliderwriter23:04:36

if i have a symbol containing the version of my project in my build.boot, what's the idiomatic way to get access to it for log purposes at runtime in [project].core/-main and at devtime via a task?

seancorfield23:04:29

@colliderwriter I put it in resources/version.txt and slurp it into both build.boot and {project}.core as needed…

seancorfield23:04:04

…well, I use a delay so it only gets read in once.

seancorfield23:04:58

(but then I have a lot of config stuff in text and EDN files that my Boot tasks load up, and my app can also read in if it wants)

colliderwriter23:04:56

seems reasonable. i'll follow suit. is there anything to know about the delay?

kenny23:04:36

You can also just def it in your core ns.

colliderwriter23:04:52

that seems to work perfectly. i guess i should ask the same question about the project name. currently just a constant but

kenny23:04:52

And use the var in your build.boot

kenny23:04:37

Example:

(ns myns.core)

(def project-version "1.0.0")

;; in build.boot

(require '[myns.core :as core])

(task-options!
  pom {:project     project
       :version     core/project-version
       :description "FIXME: write description"
       :url         ""
       :scm         {:url ""}
       :license     {"Eclipse Public License"
                     ""}})

colliderwriter23:04:54

i see. thanks for the help