Fork me on GitHub
#juxt
<
2022-06-24
>
richiardiandrea16:06:31

[XPOST] Hi there JUXT folks :D We had this in our deps.edn for pack:

:main-opts  ["-m" "mach.pack.alpha.one-jar" "-e" "resources"]
It seems the usage has changed but I can't decipher how to get the same behavior, especially around -e (which I have inherited and I guess just adds the files?

richiardiandrea16:06:14

Well I actually get another error even without -e

Cannot open <target/myjar.jar> as an OutputStream.

dominicm16:06:37

What are you trying?

dominicm16:06:54

-e can be replicated using :aliases

richiardiandrea16:06:15

Hey Dominic! This is the call I am trying clojure -T:pack one-jar :jar-file target/myjar.jar

👋 1
richiardiandrea16:06:17

I also skimmed the code but nothing stands out, I did create target

dominicm16:06:39

Ah, that was my next suggestion. This does look right to me.

👍 1
dominicm16:06:07

Oh, I see the problem

dominicm16:06:41

This is edn, so it should be '"target/myjar.jar"'

dominicm16:06:47

Note both quotes are required.

richiardiandrea16:06:20

ok I'll try that out 😄

dominicm16:06:48

I don't support aliases via the CLI right now, but https://clojure.github.io/tools.deps.alpha/clojure.tools.cli.api-api.html is what it should be modelled after. Feel free to open an issue and/or send a PR, but I'm not likely to get to it for a little while.

richiardiandrea17:06:36

Ok no worries and thank you that's fine, this indeed works:

clojure -Srepro -T:pack one-jar :jar-file \"target/appserver.jar\"

dominicm17:06:00

Nice!

🙏 1