This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-11-17
Channels
- # bangalore-clj (4)
- # beginners (60)
- # boot (63)
- # cider (2)
- # cljs-dev (22)
- # cljsrn (3)
- # clojars (32)
- # clojure (133)
- # clojure-gamedev (1)
- # clojure-germany (17)
- # clojure-italy (1)
- # clojure-russia (11)
- # clojure-serbia (16)
- # clojure-spec (35)
- # clojure-uk (75)
- # clojurebridge (1)
- # clojurescript (83)
- # community-development (25)
- # core-async (43)
- # cursive (15)
- # datomic (28)
- # emacs (2)
- # fulcro (108)
- # graphql (5)
- # hoplon (15)
- # lein-figwheel (6)
- # leiningen (39)
- # lumo (106)
- # new-channels (1)
- # off-topic (4)
- # om (26)
- # om-next (53)
- # onyx (46)
- # other-languages (2)
- # perun (1)
- # protorepl (5)
- # re-frame (13)
- # ring (18)
- # ring-swagger (1)
- # rum (6)
- # shadow-cljs (82)
- # spacemacs (19)
- # specter (5)
- # sql (3)
- # test-check (31)
- # unrepl (12)
- # untangled (2)
- # vim (109)
@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?
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
@seancorfield so, it´s random JAR file from 3rd party
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).
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)
Tried that (resource path). Couldn't get it to work.
@fabrao It's basically one of those "don't do that!" kinda things.
@seancorfield Like you said in some talks, with boot you can dynamic load dependencies with boot, so if the dependencies is in local repo:
@seancorfield did you do this method? https://stackoverflow.com/a/14070422/826486 but with Boot?
i.e. with the JAR as the resource path, not the folder containing the JAR as the resource path
Yes, @danielcompton -- I tried several variations with no success.
I'll try one more thing tho' that just occurred to me...
Nah, that idea didn't work either.
@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.
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"
are other java9-ers seeing this also?
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
(you could do something else, like merge the jars in a custom task)
(probably best to lein-localrepo / mvn install)
@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.
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")'
That takes hello.jar
locally, and installs it as world/hello "1.0.0"
.
So, there you go @fabrao -- that's how to run lein-localrepo
using Boot 🙂
@martinklepsch using sift, I ended up having everything moved to resources/public including my Clojure code.
@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
@seancorfield that´s amazing, I think now I can start using boot, many thanks
@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"
?
@martinklepsch I don´t know, is it worked for you? Did you extract the .pom.xml from jar or it access inside the jar?
@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
@martinklepsch many thnaks
@donaldball re: managed dependencies, simple solution, might serve as inspiration: https://github.com/borkdude/boot-bundle
@alandipert can I propose an official docker image
@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.
Yeah I think that should be possible as well
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...
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
If I didn't do target
, the install
task seems to look for a JAR containing the pom.xml
file (which fails).
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
yeah, seems like -p
doesn’t check for fileset entries
@juhoteperi do you have an example of using boot-less
with Semantic UI somewhere by any chance?
@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)
yep I saw that, I am trying to make that work 😄 thanks
(well, I guess we have two ways of doing the localrepo install now 🙂 )
There also seems to be at least one open issue about Semantic-UI: https://github.com/SomMeri/less4j/issues/364
so it seems like the latest version of less4j
solves, am I reading it right? I have so many more warnings here 🙂
I don't think that issue is fixed
You could probably workaround the font issue with @importGoogleFonts: false;
, not sure about other warnings
ok thanks, very odd anyways, I might try the normal css with no themes
But I think it worked at some point
ok lemme try
And you can disable the loadFonts with a var
there is a semantic-ui-less
package on github, I might use that instead, the webjar one is downloading a lot of stuff 😄
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.")