To install the jars to your local maven repository (~/.m2):
mvn install:install-file
-Dfile=<path-to-file>
-DgroupId=<group-id>
-DartifactId=<artifact-id>
-Dversion=<version>
-Dpackaging=<packaging>
-DgeneratePom=true
Where: <path-to-file> the path to the file to load
<group-id> the group that the file should be registered under
<artifact-id> the artifact name for the file
<version> the version of the file
<packaging> the packaging of the file e.g. jar
Then, in your project.clj, specify the groupid/artifact-id and version:
(defproject myproject "1.0.0-SNAPSHOT"
:description "FIXME: write description"
:dependencies [[org.clojure/clojure "1.2.1"]
[org.clojure/clojure-contrib "1.2.0"]
*[finbeau/special-jar "1.0.0"]*]) ;; or whatever
group-id/artifact-id and version you specified above
On Mon, Jul 11, 2011 at 11:23 AM, finbeu <[email protected]> wrote:
> Hello,
>
> I have some external jar libaries that I need to import in my clojure
> namespace. As I just started to use leinigen, I don't understand how to add
> them to my project. Let's say the library resides in c:\temp\jars\mylib.jar
>
> How do I add this properly to mein leinigen project?
>
> (defproject myproject "1.0.0-SNAPSHOT"
> :description "FIXME: write description"
> :dependencies [[org.clojure/clojure "1.2.1"]
> [org.clojure/clojure-contrib "1.2.0"]
> [WHAT TO PUT IN HERE?]])
>
> I assume I have to put that to .m2 repository but how?
>
> Thanks.
>
> - Finn
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to [email protected]
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> [email protected]
> 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 post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en