leiningen

How to force lein deps to re-fetch local jars/libs

牧云@^-^@ 提交于 2019-12-09 15:05:28
问题 using the following instructions: http://www.pgrs.net/2011/10/30/using-local-jars-with-leiningen/ I installed some local jars into local repository. When I want to update the jar in my project, I re-install the jar into the repository and then run lein deps. I am finding that somehow, the jar is not updated in my project. Even when I rm -rf everything in the libs folder, the new jar is not picked up. The only way I have been able to get this to work is to change the name of the jar. Its sort

How do you configure proprietary dependencies for Leiningen?

眉间皱痕 提交于 2019-12-09 12:55:44
问题 We're working on a project that has some Clojure-Java interop. At this point we have a single class that has a variety of dependencies which we put into a user library in Eclipse for development, but of course that doesn't help when using Leiningen (2.x). Most of our dependencies are proprietary, so they aren't on a repository somewhere. What is the easiest/right way to do this? I've seen leiningen - how to add dependencies for local jars?, but it appears to be out of date? Update: So I made

Scripting with Clojure

耗尽温柔 提交于 2019-12-09 11:44:43
问题 I was trying to do some simple scripting work with Clojure. For example, I would load a json which contains a map from a file, remove a given key, and save it back to the file. With leiningen, seems I would have to create an app, add data.json or whatever into the dependencies, then I could start a lein repl to do the real work. Think about doing the same thing with Python. It should be done with 3 lines of code in Python. Is there an easy way to do it with leiningen? 回答1: You can try out the

Use Leiningen With Local M2 Repository

删除回忆录丶 提交于 2019-12-09 02:36:42
问题 I want to compile a local jar into my clojure project, I can do this easily with the following https://gist.github.com/stuartsierra/3062743 mkdir repo mvn install:install-file -DgroupId=local -DartifactId=bar \ -Dversion=1.0.0 -Dpackaging=jar -Dfile=bar.jar \ -DlocalRepositoryPath=repo But I have a continuous integration and build server (jenkins) that looks in ~/.m2. How can I get leiningen to look in .m2??? 回答1: Based on the documentation, it looks like the key you're after is :local-repo

clojure lein (read-line) stdin woes

谁说胖子不能爱 提交于 2019-12-08 17:23:13
问题 So regular clojure repl works fine, (read-line) collects input, then echos it. Using lein repl though, never echoes any input characters, nor does it ever allows me to return from any stdin reading commands. I'm sure it has something to do with rebinding in , but was wondering if there is a workaround/fix? Thanks. 回答1: This is due to a bug in ant; it prevents the stdin stream from the subprocess it launches from being used. But the telnet trick should work since lein repl launches a socket

Clojure : 'lein repl' history grepping?

孤街浪徒 提交于 2019-12-08 17:19:11
问题 I often find myself executing commands like this at bash : history | grep 'find' For example to look up a fancy find / xargs command i might have ran. Im wondering --- where does the "lein repl" store its historical data ? It would be nice to know, because then I could write a leingrep.sh script, which simply grepped through the lein history session. It is obvious that this is on disk somewhere, since history is preserved from one repl to the next. 回答1: Lein is using either readline (if you

Leiningen has problems building a working uberjar

孤街醉人 提交于 2019-12-08 15:55:12
问题 We're trying to build our Clojure project with Leiningen. We've succeeded in creating an uberjar by doing the following: preconditions: project.clj file lists dependencies :main my-project.core in project.clj a core.clj file with a -main function (:gen-class :main true) in core.clj procedure: ran lein test ; completed with no failures ran lein deps ; completed successfully from project.clj's directory: rain lein uberjar This created two jar files: My-Project-1.0.0-SNAPSHOT-standalone.jar, and

Deploy 3rd-party jar to clojars?

好久不见. 提交于 2019-12-08 06:24:06
问题 I'm using a 3rd-party open source Java library with my Clojure project. It's not available in Maven Central or at Clojars. I can create a pom file and figure out how to install it a Maven Central, but--I am lazy and I am used to the increased convenience of Clojure tools such as Leiningen! Is there a convenient way to deploy the 3rd party jar to Clojars? There's no need to build it first; it's already been built. (The Java library uses the tried and true-- make .) If I must give up my

lein-autodoc with Leiningen 2

自作多情 提交于 2019-12-08 02:03:38
问题 I am attempting to use lein-autodoc, because I believe it to be the preferred documentation generator for Clojure. I have added :dev-dependencies [[lein-autodoc "0.9.0"]] to my project definition as per the instructions on the lein-autodoc github page. Running lein deps runs without issue, however lein autodoc fails, claiming that autodoc is not a task. I suspect the issue is that lein-autodoc is set up to work with leiningen 1. However, I'm using leiningen 2. Is there an alternate way I

Issues with Clojure inter-dependency with different major versions of the same library

人走茶凉 提交于 2019-12-07 23:06:01
问题 Disclojure: I am not a Java developer and I have little knowledge in Maven . I am facing a problem with Clojure / Lein . I am developing a project that uses two external libraries/projects that are un-related. Both of the uses the Sesame RDF library. One of them is Any23 which uses Sesame 2.x but the other uses the version 4.x . The problem is that Any23 won't work with Sesame 4.x and the other library won't work with Sesame 2.x . This means that :exclusions one or the other in my project.clj