Fork me on GitHub
#tools-deps
<
2018-10-23
>
dominicm17:10:38

I might have a try tonight at getting pack to work with clojars (ish). The parts are there.

4
dominicm18:10:36

How desperate are people to avoid mvn the cli tool? I think pack already works with mvn

seancorfield18:10:10

mvn just has such a nasty CLI compared to, say, lein deploy or boot deploy...

dominicm18:10:07

I find it a little weird that deploy-file doesn't look at pom.xml to figure out the url automatically, but meh

dominicm18:10:34

I'll write up the process with mvn and put it in pack's readme, and point at the working example.

4
dominicm18:10:12

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).

👏 4
seancorfield19:10:12

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?

dominicm19:10:16

The 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.

dominicm19:10:39

I don't think things generally depend on the pom.xml being inside the jar though.

seancorfield19:10:26

So... no manifest added nor needed?

seancorfield19:10:02

And what is the difference between a "regular" skinny jar from pack and one that also has --no-libs?

dominicm19:10:08

@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

dominicm19:10:36

No pom.xml in my jar. It runs fine.

seancorfield19:10:57

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).

dominicm19:10:41

@U04V70XH6 That's a MANIFEST.MF, you can use the -e flag in pack to add it to your classpath at build time 🙂

seancorfield19:10:53

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.

dominicm19:10:52

@U04V70XH6 regarding --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:

app.jar
lib/clojure-1.8.0.jar
lib/github-0.1.0.jar
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.

seancorfield19:10:58

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".

dominicm19:10:49

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.

seancorfield19:10:51

Ah, so "skinny" means no libs in the JAR but instead copy them to a lib/ folder?

dominicm19:10:34

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.

seancorfield19:10:30

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 pom.xml and mvn it up to Clojars... or another repo...

dottedmag20:10:24

Pardon my ignorance, does Lein use mvn to upload?

andy.fingerhut20:10:28

Probably more likely to find someone who knows the answer to that in #leiningen channel

dottedmag20:10:03

Figured it out already 🙂 It uses cemerick/pomegranate - a wrapper around Eclipse Aether.

arrdem20:10:53

tools.release(.alpha) 😉

👍 4