+1 We build a dozen projects here with a mix of Clojure and Java and we only use Leiningen. The biggest effort was to consolidate the dependency libs pulled by Leiningen in our different projects. You end up with multiple version of the same jar, a result of the dependency solving done by Leiningen from the Maven world.
Copying the jar files pumped by Leiningen (cp */lib/*.jar) in a single folder and then pruning them to retain the highest versions was the biggest challenge we faced. All the libs we are referring to in dev, test and prod are stored in a single folder. In dev we use Eclipse but have defined a number of user libraries to point to jars in this folder, splitting them by purpose (Oracle, ...) Since we want a stable slate we control the 75+ libs we monitor this closely and do not allow dependency resolution to sc.. it up between different projects. If a newcomer is pulled by Leiningen in a project resulting from a change, we just compare it with what we have and add it or not to it. It's definitively easier to do these days. In Jan. 2009, when we went in prod, we we're not using Leiningen back then an we had around 140 libs, all the dependencies were resolved/managed by hand... yurk ! Now the build process (we deliver our software AOT) is a piece of cake (no pun intended). We defined a couple of generic scripts (lein-jar, lein-install) and call them from a simple Bourne shell script to build the whole system. We use Archiva internaly as a simple Maven repo so we can store the snapshots and stable releases of our software and can refer to them in project.clj files. It also caches all the external dependencies for us. If we cannot find a maven artifact because an open source project did not push anything to Maven, we build it from source and store it in Archiva et voilĂ ! We can then pull it from the Maven cloud without changing anything. Same thing if the jar exists apart from the Maven world. We just push it into Archiva. Leiningen for us = less time to build, no more handcraft build scripts, ... I cannot think about something simpler yet. If anyone has a suggestion, I am opened to it. If I compare our build process and dependency management to other environments that I know (and I know a few), it's still the most powerful thing I saw since sliced bread :) BTWY, we use git for source control but that's a breeze compared to the hell we went through with the build process before jumping in the Leiningen wagon. Luc P. On Thu, 28 Jul 2011 16:49:42 -0700 Sean Corfield <seancorfi...@gmail.com> wrote: > On Thu, Jul 28, 2011 at 2:23 PM, Michal B <mibu.cloj...@gmail.com> > wrote: > > Why does it have to be so complicated to use libraries? > > I can't imagine it being much simpler than using Leiningen... > > > To use libraries, you need to learn how to operate half a dozen > > build tools > > Just one: Leiningen. You can learn Cake or Maven instead if you want, > I guess. > > > and git because each library author distributes their library > > differently. > > Hmm, I haven't needed git for anything I'm not actually contributing > to - with the exception of ClojureScript itself (and given the state > of that, I think a "build from source" approach is acceptable for > now). > > > Right? There is no need to start a project with a bunch of template > > files and an elaborate directory structure and to start configuring > > dependencies and to rely on some magic happening that makes your > > program run. > > Well, you could download JAR files and then use the java command with > the appropriate classpath and other arguments to run your script... > but that seems more work to me than telling Leiningen which libraries > I want and then telling Leiningen to run my -main function - with > Leiningen handling all of the dependencies and the classpath stuff > etc. > > I don't think I'd choose to not use Leiningen, even on a single file > project that used no additional libraries: > > lein new thing > cd thing > vi s[tab][tab][tab] > ...sling together some code... ZZ > lein run -m thing.core > > Done! > > (I know, the heresy of using 'vi'... :) -- Luc P. ================ The rabid Muppet -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en