This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # 100-days-of-code (2)
- # aws (1)
- # beginners (105)
- # boot (36)
- # calva (4)
- # cider (56)
- # clara (37)
- # cljdoc (16)
- # cljs-dev (19)
- # clojure (44)
- # clojure-dev (20)
- # clojure-italy (24)
- # clojure-nl (3)
- # clojure-serbia (2)
- # clojure-spec (15)
- # clojure-uk (44)
- # clojurescript (41)
- # code-reviews (3)
- # core-async (12)
- # cursive (24)
- # datomic (4)
- # emacs (1)
- # figwheel-main (10)
- # fulcro (168)
- # funcool (2)
- # hyperfiddle (15)
- # jobs (2)
- # jobs-discuss (79)
- # juxt (19)
- # lein-figwheel (1)
- # leiningen (2)
- # luminus (14)
- # mount (8)
- # nrepl (9)
- # off-topic (9)
- # other-languages (1)
- # pathom (32)
- # reitit (6)
- # ring-swagger (3)
- # shadow-cljs (10)
- # slack-help (11)
- # spacemacs (20)
- # sql (29)
- # tools-deps (28)
- # vim (29)
- # yada (4)
I might have a try tonight at getting pack to work with clojars (ish). The parts are there.
How desperate are people to avoid
mvn the cli tool? I think pack already works with
https://clojars.org/io.dominic/super-duper-octo-barnacle but it also works 😄 (almost first time)
I find it a little weird that deploy-file doesn't look at pom.xml to figure out the url automatically, but meh
I'll write up the process with
mvn and put it in pack's readme, and point at the working example.
https://github.com/juxt/pack.alpha#uploading-to-clojars-or-maven really simple 🙂 If someone knows a mvn-less way to upload to maven/clojars, I'm all ears. Seems like a good thing for a small targeted library to do really well (like with really secure credentials settings from day #1).
To save me the trouble of actually trying to build a skinny JAR with pack and opening it up to look inside, does it add a manifest and, if so, what attributes are in it?
mvn deploy:deploy-file can take a pom.xml externally to use. I guess it uploads separately. You could put it inside the jar by adding a
mkdir extra && cp pom.xml extra/ then passing
-e extra to pack when building.
And what is the difference between a "regular" skinny jar from pack and one that also has
@U04V70XH6 not inside the jar, nope. You do need a pom.xml, but it's generated out of band. I didn't actually check if it's in my jar, one sec, I will
I'm thinking back to the discussion/complaints about depstar not adding even a basic manifest into the uberjar (so you couldn't just
java -jar it).
@U04V70XH6 That's a MANIFEST.MF, you can use the
-e flag in pack to add it to your classpath at build time 🙂
It wasn't a big deal to add a minimal manifest with
Main-Class but of course you don't actually need to -- you can just do
java -cp ... clojure.main ... and run the JAR anyway.
--no-libs, the general idea of skinny jar mode is to produce something that's really cheap to
rsync or something onto s3. So you generally output:
And then upload app.jar + any files from libs that are missing. This was requested by a company doing java, this is their upload process.
app.jar lib/clojure-1.8.0.jar lib/github-0.1.0.jar
Yeah, my point/question was "Does pack add a manifest by default?" and the answer seems to be "no" and, implied, does a library published to Clojars need a manifest and I think the answer is also "no".
Capsule/Onejar do add a manifest, because it's required for them to function. I'm not entirely happy with the process though. I think more could be done here, but there's nothing to drive change currently.
Ah, so "skinny" means no libs in the JAR but instead copy them to a
In the future I might add a dedicated
maven namespace to pack. I want to end up where you go via use-case rather than "underlying details". UberJAR complicates this a little, as there's choice.
Part of me is just contemplating what I might do with my fork of depstar -- to keep it as minimal as possible but open up the possibility of producing a thin JAR and being part of a workflow that could produce a
mvn it up to Clojars... or another repo...
Probably more likely to find someone who knows the answer to that in #leiningen channel
Figured it out already 🙂 It uses
cemerick/pomegranate - a wrapper around Eclipse Aether.