Fork me on GitHub
#boot
<
2017-11-17
>
seancorfield01:11:18

@fabrao Is it just some "random" JAR file from a 3rd party? Or is it another local project that you want to build and have available as a local JAR dependency?

fabrao01:11:17

normaly I install jar like from oracle database into maven .m2 repository and in lein project I just use the plugin lein-localrepo, that will reference the jar for me

fabrao01:11:14

@seancorfield so, it´s random JAR file from 3rd party

seancorfield01:11:23

We run a local Archiva (Maven repo) server so we put 3rd party JARs in that. I'm not sure how you'd tell Boot about a random JAR file on the local file system. It's not considered a good practice (nor with Leiningen, despite the localrepo plugin).

danielcompton02:11:44

Yep, I'd agree with Sean. I suspect putting the JAR on the resource-path would work (but not sure what else that might cause)

seancorfield02:11:42

Tried that (resource path). Couldn't get it to work.

seancorfield02:11:01

@fabrao It's basically one of those "don't do that!" kinda things.

fabrao02:11:22

@seancorfield Like you said in some talks, with boot you can dynamic load dependencies with boot, so if the dependencies is in local repo:

danielcompton02:11:33

@seancorfield did you do this method? https://stackoverflow.com/a/14070422/826486 but with Boot?

danielcompton02:11:53

i.e. with the JAR as the resource path, not the folder containing the JAR as the resource path

seancorfield03:11:39

Yes, @danielcompton -- I tried several variations with no success.

seancorfield03:11:07

I'll try one more thing tho' that just occurred to me...

seancorfield03:11:04

Nah, that idea didn't work either.

seancorfield03:11:27

@fabrao You can dynamically load via Maven coordinates -- from a Maven-compatible repo or the local cache. But it's kinda of "cheating" to manually put a JAR into the local cache and rely on Leiningen / Boot pulling it from there. It's just something you shouldn't do. Builds should be repeatable.

alandipert04:11:17

weird, i'm on java 9 on mac and 2.7.2 w/ new boot-bin... and seeing "WARNING: An illegal reflective access operation has occurred"

alandipert04:11:27

are other java9-ers seeing this also?

alandipert04:11:19

fabrao one way to add something to the classpath is boot.pod/add-classpath. but that doesn't add the jar as a dependency, so if your build produces a jar the one yuo added won't be present

alandipert04:11:35

(you could do something else, like merge the jars in a custom task)

alandipert04:11:47

(probably best to lein-localrepo / mvn install)

seancorfield06:11:55

@fabrao I'm looking at lein-localrepo -- I bet it would be easy to make a Boot task that wrapped it, and I bet Shantanu would be cool with that. I'll talk to him about it.

seancorfield06:11:10

You know... Boot is just so awesome we don't even need to write a Boot task:

boot -d leiningen -d lein-localrepo  call -e "(require '[leiningen.localrepo :as lr])" -e '(lr/localrepo nil "install" "hello.jar" "world/hello" "1.0.0")'

seancorfield06:11:34

That takes hello.jar locally, and installs it as world/hello "1.0.0".

seancorfield06:11:48

So, there you go @fabrao -- that's how to run lein-localrepo using Boot 🙂

Sebastian Hennebrueder07:11:04

@martinklepsch using sift, I ended up having everything moved to resources/public including my Clojure code.

martinklepsch08:11:38

@usenet you can use regexes to match on the paths that you want to be moved, maybe gist your directory structure and how you used sift

fabrao09:11:31

@seancorfield that´s amazing, I think now I can start using boot, many thanks

martinklepsch10:11:41

@seancorfield @fabrao assuming you have a pom.xml for that jar, couldn’t you also just use boot install --file "hello.jar" --pom "hello.pom.xml"?

fabrao10:11:28

@martinklepsch I don´t know, is it worked for you? Did you extract the .pom.xml from jar or it access inside the jar?

martinklepsch10:11:52

@fabrao I haven’t tried it, but read the boot install --help text I think it outlines a similar situation to what you’re trying to achieve

fabrao10:11:16

@martinklepsch many thnaks

borkdude11:11:07

@donaldball re: managed dependencies, simple solution, might serve as inspiration: https://github.com/borkdude/boot-bundle

borkdude11:11:33

we use it in our multi project repo

Jon18:11:28

I have to download boot.jar again

Jon18:11:34

please where should I put it

Jon18:11:55

.boot/cache/bin/, guessed

flyboarder19:11:58

@alandipert can I propose an official docker image

seancorfield20:11:47

@martinklepsch And I guess you can generate a basic pom.xml with the pom task if you don't have a file? I haven't tried that.

martinklepsch20:11:54

Yeah I think that should be possible as well

seancorfield20:11:25

Hmm, I can get a pom.xml generated to target/... but I'm not sure how to get install to see the generated one on the fly...

seancorfield20:11:09

I had to do this

boot pom -p iovation/iovation -v 2.0.0 target install -f iovation.jar -p target/META-INF/maven/iovation/iovation/pom.xml

seancorfield20:11:40

If I didn't do target, the install task seems to look for a JAR containing the pom.xml file (which fails).

seancorfield20:11:45

I seem to get this exception

boot.aether/install                   aether.clj:  326
                                        boot.aether/install                   aether.clj:  332
                                           boot.pod/pom-xml                      pod.clj:  237
                       java.util.jar.JarFile.getInputStream                 JarFile.java:  447
                       java.util.zip.ZipFile.getInputStream                 ZipFile.java:  347
java.lang.NullPointerException: entry
    clojure.lang.ExceptionInfo: entry
    line: 51

martinklepsch20:11:54

yeah, seems like -p doesn’t check for fileset entries

richiardiandrea20:11:14

@juhoteperi do you have an example of using boot-less with Semantic UI somewhere by any chance?

juhoteperi20:11:51

@richiardiandrea I don't think so. Did you check the note in readme? That and just @import "semantic-ui/src/theme.less" or something like that should work (or semantic.less not sure)

richiardiandrea20:11:32

yep I saw that, I am trying to make that work 😄 thanks

seancorfield20:11:02

(well, I guess we have two ways of doing the localrepo install now 🙂 )

juhoteperi20:11:14

There also seems to be at least one open issue about Semantic-UI: https://github.com/SomMeri/less4j/issues/364

richiardiandrea21:11:46

so it seems like the latest version of less4j solves, am I reading it right? I have so many more warnings here 🙂

juhoteperi21:11:53

I don't think that issue is fixed

juhoteperi21:11:17

You could probably workaround the font issue with @importGoogleFonts: false;, not sure about other warnings

richiardiandrea21:11:37

ok thanks, very odd anyways, I might try the normal css with no themes

juhoteperi20:11:03

But I think it worked at some point

juhoteperi20:11:37

And you can disable the loadFonts with a var

richiardiandrea20:11:54

there is a semantic-ui-less package on github, I might use that instead, the webjar one is downloading a lot of stuff 😄

seancorfield20:11:11

Interesting experience report about abandoning Boot due to problems with a very complex cljs project build setup https://clojureverse.org/t/migrating-from-boot-back-to-leiningen/837 (Note: "Please no “you should have just” replies. This is presented as a data point, this is how we experienced it. Maybe if we had more boot experts on the team it could have gone differently. Maybe not.")

dominicm21:11:31

Weird that the reload time was >1 minute, I wouldn't expect that at all.

dominicm21:11:41

Initial build is slower with boot, but runtime build should be normal speed.