is there a community "best practice" for including your co-workers libraries?

289 views
Skip to first unread message

Lawrence Krubner

unread,
Oct 16, 2015, 5:17:29 PM10/16/15
to Clojure
I know this question has been asked before, but when I went searching I mostly found old entries that were on a somewhat different topic, such as "How to add a java library (that is not in maven) as a dependency for a clojure library?"

I wrote a Clojure app and my co-worker wrote a Java app. I have another co-worker who is working on an app that would include the first 2 apps as libraries. 

I have been able to get the combination working using the Leiningen plugin "localrepo" but my co-worker wants me to make the other 2 libraries available from some central repo that Leiningen can download from. How is this usually done? Do I set up a Maven repo on one of the company servers? 








Gary Trakhman

unread,
Oct 16, 2015, 5:21:20 PM10/16/15
to Clojure
I've used Nexus and Archiva, and I feel nexus is a better experience: https://maven.apache.org/repository-management.html

There is a stopgap solution involving s3 that might be easier to set up: https://github.com/technomancy/s3-wagon-private

--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@googlegroups.com
Note that posts from new members are moderated - please be patient with your first post.
To unsubscribe from this group, send email to
clojure+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups "Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clojure+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Sean Corfield

unread,
Oct 16, 2015, 6:00:53 PM10/16/15
to clo...@googlegroups.com
We use Apache Archiva to run a Maven-like repo on an internal server for this sort of scenario (then you specify that repo endpoint in project.clj for Leiningen to see).

Sean Corfield -- (904) 302-SEAN
An Architect's View -- http://corfield.org/

"If you're not annoying somebody, you're not really alive."
-- Margaret Atwood


Shantanu Kumar

unread,
Oct 16, 2015, 10:14:24 PM10/16/15
to Clojure
We are using Artifactory for our internal Maven repo (supports enterprise Single-Sign-On):

Shantanu

Robert Levy

unread,
Oct 16, 2015, 11:43:03 PM10/16/15
to clo...@googlegroups.com
Many use s3-wagon or a hosted maven. Or you could install dependencies locally, but that's a pain. On the other hand putting AWS credentials in CI for example to use s3-wagon can be annoying too.

What about depending on a specific git remote / commit?  This library might be worth giving a shot: https://github.com/tobyhede/lein-git-deps


Daniel Compton

unread,
Oct 22, 2015, 12:08:46 AM10/22/15
to clo...@googlegroups.com
The S3 Wagon is a great option for hosting Maven deps. It takes virtually no maintenance, is backed by AWS, and is dirt simple to configure. It isn't as full featured as some of the other options, but it can't be beat for simplicity.
--
Daniel

dmic...@gmail.com

unread,
Nov 2, 2015, 4:28:51 AM11/2/15
to Clojure
You don't really need to set up a server infrastructure if you can live with hacks.

One way is put the JAR say in a "/lib" dir and point the :resource-paths entry in profiles.clj directly to the JAR, so "lib/my-coworker-lib.jar".

The other way is http://stackoverflow.com/a/26997656 but I only applied it in Java up to now, so I don't know how to configure the project.clj in this case.

I used both (the first in Clojure and the second in Java) and in both cases, you can keep the JAR in your version control system.

Dave Tenny

unread,
Nov 2, 2015, 6:59:42 PM11/2/15
to Clojure
I'm slightly confused, is there some reason Clojars doesn't work for sharing libraries in this context? 

Sean Corfield

unread,
Nov 2, 2015, 7:02:08 PM11/2/15
to clo...@googlegroups.com
Dave Tenny wrote on Monday, November 2, 2015 at 3:59 PM:
I'm slightly confused, is there some reason Clojars doesn't work for sharing libraries in this context? 

Because it’s public and sharing your companies libraries with the world might be frowned upon…?

Sean

Dave Tenny

unread,
Nov 2, 2015, 7:18:20 PM11/2/15
to clo...@googlegroups.com
ok, that must be the part I missed.  

--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@googlegroups.com
Note that posts from new members are moderated - please be patient with your first post.
To unsubscribe from this group, send email to
clojure+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to a topic in the Google Groups "Clojure" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/clojure/myxUzM7TzYA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to clojure+u...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages