Fork me on GitHub
#tools-deps
<
2019-07-24
>
Travis19:07:41

just curious but is it possible to pull dependencies from a Google Cloud Storage based maven repo ?

Alex Miller (Clojure team)19:07:57

if it acts as a Maven repo on http, then sure

Alex Miller (Clojure team)19:07:44

how do you configure it in Maven?

Alex Miller (Clojure team)19:07:41

if there's a custom wagon, then that will not work

Alex Miller (Clojure team)19:07:05

but it could be made to do so

Travis19:07:12

need to research more. Currently I have a jar that is being built/published by gradle into GCS using there maven-publish plugin. Basically to avoid managing some private artifact repository and just use GCS

Alex Miller (Clojure team)19:07:13

sure, this is commonly done with s3 (and tools.deps includes support for that)

seancorfield21:07:51

I'm modifying depstar to insert a MANIFEST.MF file and pom.xml / pom.properties. My minimalist thinking is that it should do this automatically if it finds a pom.xml file in the directory in which it is run -- as part of the project you are building a JAR/uberjar for. Is this a good idea and if not, why not?

seancorfield21:07:46

I'm thinking you'd do clj -Spom && clj -A:jar my-project.jar (assuming the :jar alias brings in depstar and uses -m hf.depstar.jar).

seancorfield21:07:57

Are there situations where automatically picking up the local pom.xml file is a bad idea? Are there situations where you would want to use a different file as the POM or you might have the POM in a different location?

dorab21:07:49

Not directly answering your question, but any changes to depstar that allow me to java -jar foo.jar rather than java -cp foo.jar clojure.main -m foo.core would be useful.

seancorfield22:07:57

@dorab that would require depstar to deal with AOT -- not happening.

seancorfield22:07:34

What this change will allow for is java -jar foo.jar -m your.entry.point instead of java -cp foo.jar clojure.main -m your.entry.point

seancorfield22:07:03

(assuming you had pom.xml locally -- so depstar would generate a manifest and because you're generating an uberjar, instead of a library JAR, you'd get Main-Class: clojure.main added)

seancorfield22:07:54

I guess my real question is whether it would be useful/important to add a flag to suppress consumption of pom.xml?

seancorfield22:07:47

(easy enough to do, so I might as well)

Alex Miller (Clojure team)22:07:14

Java doesn’t care about the pom stuff so that seems harmless. clj will use it to find dependencies though if you use it as a local file dep

Alex Miller (Clojure team)22:07:46

That’s prob good if not an uberjar and bad if it is an uberjar

Alex Miller (Clojure team)22:07:19

(As you’d get deps from two places on the classpath)

seancorfield22:07:04

Yeah, that's why this has cropped up -- http://cljdoc.org assumes the JAR contains it.

seancorfield22:07:46

And with that ... seancorfield/depstar "0.3.0" is available!

dorab23:07:17

@seancorfield java -jar foo.jar -m your.entry.point is good enough for me. Thanks for the release. Will try it out.