Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7640451
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T08:40:26+00:00 2026-05-31T08:40:26+00:00

The point of this question is to clear up confusion about Clojure project.clj dependencies

  • 0

The point of this question is to clear up confusion about Clojure project.clj dependencies and how to specify a local dependency.

I have a bunch of Clojure lein projects in a tree

./projects/clojure/bene-csv # A csv parsing library
./projects/clojure/bene-cmp # A main program that depends on bene-csv

I’m editing bene-cmp’s project.clj file. I want to make a dependency to
./projects/clojure/bene-csv/bene-csv-1.0.0-SN.jar .

Do I use simple directory notation to specify the path or something else

Thank you.

Edit:

I can include bene-csv in my project by entering lein install in the bene-csv project directory, and using these project.clj entries in bene-cmp’s project directory’s project.clj file:

(defproject bene-cmp "1.0.0-SN"
  :description "This is the main benetrak/GIC comparison program."
  :dependencies [[org.clojure/clojure "1.3.0"]
                 [clojure-csv/clojure-csv "1.3.2"]
                 [bene-csv "1.0.0-SN"]])

However, I am still trying to figure out what the path is, and would appreciate any pointers or help along those lines. Thank You.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T08:40:28+00:00Added an answer on May 31, 2026 at 8:40 am

    Leinigen uses maven dependency management under the covers, so all dependencies get installed in

    ${HOME}/.m2/repository/${groupId-as-path}/${artifactId}/$[version}/${artifactId}-${version}.jar
    

    where for [org.clojure/clojure "1.3.0"] groupId is org.clojure, artifactId is clojure and version is 1.3.0. groupIds are converted to paths, so a groupId of org.clojure has a path of org/clojure.

    In a maven dependency, specified in pom.xml, this would look like:

    <project>
    
        ...    
    
        <dependencies>
            <dependency>
               <groupId>org.clojure</groupId>
               <artifactId>clojure</artifactId>
               <version>1.3.0</version>
           </dependency>
        </dependencies>
    
        ...
    
    </project>
    

    Note – If no groupId is specified then leiningen uses same value for both the groupId and artifactId.

    The benefit of using maven dependency management is that it handles transitive dependencies for you, ie. if you specify a dependency on something, you get all the things it depends on and all the thing that those things depend on etc etc.

    So to depend on a local project, the correct thing is to install the local project in your local repository.

    To save you changing your versions endlessly while in a development phase, maven supports SNAPSHOT dependencies, whereby some extra information is appended to the version (the datetime basically) and maven knows, that for say 1.3.1-SNAPSHOT it should look for the latest version of that snapshot. This is triggered by the naming convention of {version}-SNAPSHOT.

    You can, in maven, specify system dependencies with a hard coded path but generally that’s bad practice – it’s usually used for things that are platform dependent, i.e. may have a native library component.

    By default maven central repository is searched, and leinigen adds in the clojars repository, which serves as a central repo for clojure jars.

    leinigen uses this stuff under the covers and builds a classpath referring to the jars in your local maven repository.

    Note that you can generate a pom.xml from a leinigen project with lein pom. You could then drive maven from that. A useful feature is

    mvn dependency:tree
    

    which gives an ascii art represenation of all the dependencies.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I had this working at some point, as I had a question about this
I found this question which is a great starting point towards creating embedded widgets
Sorry if this question is too vague, but I'd rather not muddy it's point
I am starting this question to try and make a central point developers can
I ask this question following the issue I raised here . The point is
before I start I want to point out that I tagged this question as
I've edited this quite a bit and bolded my question at this point. I
This is very basic question from programming point of view but as I am
This is a short question. At some point my thread understand that it should
Sorry, if this is a duplicate. Please point me to the appropriate question if

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.