Fork me on GitHub
#boot
<
2018-10-23
>
dpsutton15:10:10

we're really liking deps.edn workflows for running our project and declaring dependencies. is there a boot workflow where we can use deps.edn deps and use boot for building and packaging?

dpsutton15:10:44

thanks. reading now

borkdude15:10:05

not sure how it works, never used it. we rolled our own multi-project .edn file

dpsutton15:10:28

do yall make artifacts from libs for consumption in older projects? that's where we are right now

dpsutton15:10:53

older lein project, rewrite of library with deps edn. need to make a maven artifact. how do you do it?

dpsutton15:10:22

you work at juxt don't you?

borkdude15:10:46

there are some clj “plugins” for this already I believe. I used one to create uberjars, but haven’t pushed to maven

borkdude15:10:04

I guess you could still write the pom file and do anything you like with it

borkdude15:10:19

and no, I don’t work for juxt

dpsutton15:10:41

ah ok. thought you did. we were looking at one of their "plugins". thanks for the recommendations

dominicm19:10:04

I work at JUXT. Have your daily dose of marketing 😁 https://github.com/juxt/pack.alpha#uploading-to-clojars-or-maven

dominicm19:10:29

What's your comment about :gen-class? :thinking_face: pack doesn't really do anything with AOT, so if you need that you need to combine it with pack using something like https://github.com/juxt/edge/blob/152f1f696479e74d8ed9c63d2f4ed7e846eff585/bin/uberjar#L17-L26

dominicm19:10:49

Happy to answer questions in #juxt or directly (it'll be me either way)

borkdude15:10:12

fwiw, we use this https://github.com/borkdude/boot-bundle to manage deps in multiple projects that we would like to keep the same

jeroenvandijk09:10:23

@borkdude Where can one find the current state of dependencies? Is this defined within the project as well or just in bundle.edn?

borkdude09:10:35

You can combine deps just the way you like, by picking them from the bundle file or mixing it with your own inside set-env

jeroenvandijk09:10:53

Ah I see, I guess you always put a bundle file within a git repo?

borkdude09:10:03

Only if we use bundle (but we do this for each project yes). Typically at the root of the repo. We have some JVM opts that we read from a .boot-jvm-options file in each project, that has -Dboot.bundle.file="../bundle.edn"

borkdude09:10:16

@U0FT7SRLP but you can also define this in the build.boot file or via an env variable

borkdude09:10:07

@U0FT7SRLP you can even get your boot.bundle file from a shared library

borkdude09:10:24

;; if you share your bundle via clojars, uncomment and change:
            ;; [your-bundle "0.1.1" :scope "test"]

seancorfield15:10:49

@dpsutton You can use boot-tools-deps with Boot to make JAR and uber JAR files from your deps.edn library but I'd look at cambada or juxt's pack instead.

seancorfield15:10:08

We use depstar to create uber JARs at work.

dpsutton15:10:33

we tried pack and making a skinny jar. had to modify it to remove a :gen-class in it and it also had no manifest or pom info

dpsutton15:10:45

so it just kinda zipped our files ¯\(ツ)

seancorfield15:10:55

We build uber JARs without manifests and use those in production.

seancorfield15:10:18

We haven't, yet, had a need to build skinny JARs for deployment to Clojars etc.

dpsutton15:10:21

we're making a library for consumption from an older lein project

dpsutton15:10:42

and ps thanks for the discussion @borkdude @seancorfield

seancorfield15:10:41

BTW, you can generate a pom.xml using clj directly. I haven't checked how compatible it is with Clojars/Maven tho'...

alexmiller16:10:21

it needs additional adornment (but clj -Spom is intended to update the deps and leave the rest alone)

seancorfield14:10:34

I updated my fork of depstar to produce thin (library) JAR files yesterday, used clj -Spom to seed a pom.xml file, added SCM and license sections, then did mvn deploy:deploy-file to put things up on clojars. Pretty easy. Thanks to some pointers from @dominicm !

seancorfield14:10:34

I updated my fork of depstar to produce thin (library) JAR files yesterday, used clj -Spom to seed a pom.xml file, added SCM and license sections, then did mvn deploy:deploy-file to put things up on clojars. Pretty easy. Thanks to some pointers from @dominicm !