Fork me on GitHub
#boot
<
2017-09-12
>
dimovich08:09:53

@juhoteperi @donaldball @martinklepsch Thanks for the suggestions. Managed to use :exclusions. Also (uber :exclude [#"bouncycastle"]) seems to work

dimovich08:09:28

using :scope test also helps to exclude the libs from the final jar

dimovich08:09:00

but I have to also exclude the transitive dependencies of buddy-core in order for that to work

hmaurer12:09:48

Can I use boot to build a java project?

hmaurer12:09:07

and if yes, how?

chris12:09:47

well there is a javac boot task, I guess it depends on how complicated your java sources are

hmaurer13:09:13

@chris oh I hadn’t realised; perfect, thanks!

hmaurer13:09:18

that was easy

dominicm13:09:43

@juhoteperi that scopes it for the pom.xml, but the aot code in clojure isn't aware of scopes.

dominicm13:09:58

aot actually brings in test scoped dependencies if you require them.

juhoteperi14:09:00

@dominicm Yeah, well, that's why I only aot compile single main namespace, nothing else

dominicm15:09:04

@juhoteperi there was an idea to just have the aot class have an option for bringin gin a plain ol' java shim.

donyorm15:09:00

so my "single main namespace" seems to require (transitively) most of my other namespaces. Is it possible to make it only compile one or two namespaces, and leave the rest as clojure. I'm getting issues with import errors because of multiple versions of library existing on the classpath due to aot.

juhoteperi15:09:14

Quite common solution is to require nothing from main ns directly, and instead use require and resolve on runtime: https://github.com/boot-clj/boot/wiki/Circumnavigating-Watch-and-AOT-Compilation-Limitations

donyorm16:09:43

So how can I cause boot to pass arguments passed to a task onto the program like is done if I do something like lein run -p 3000. How do I define the arguments to (deftask run) in boot? Basically the equivalent of [& args] for tasks

donyorm17:09:39

that could work. Not as clean, but possible

richiardiandrea17:09:32

@donyorm had the same question, had to settle for positional arguments

donyorm17:09:33

well it'll work, and it makes sense within the contex of boot. I've been updated the luminus documentation to include boot commands, and I realized that the boot version of luminus didn't actually support setting the port by commandline arguments