Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Leiningen 2 does not look in localrepo?

I'm using Leiningen 2 and am struggling to get it to recognize the local repository ($HOME/.m2)

I'm trying to use the storm-rdbms(storm-contrib) which is not on clojar

Here are the steps I've taken:

  1. Using the lein-localrepo plugin, installed storm-rdbms under the .m2 local repository
  2. The pom.xml shows this:

    <groupId>storm-rdbms</groupId>
    <artifactId>storm-rdbms</artifactId>
    <versioning>
        <versions>
          <version>0.1-SNAPSHOT</version>
        </versions>
    <lastUpdated>20130214173431</lastUpdated>
    </versioning>
    
  3. my project.clj file :

     :dependencies [[org.clojure/clojure "1.4.0"]
                    [storm "0.8.2"]
                    [storm-rdbms "0.1-SNAPSHOT"]]
     :plugins [[lein-localrepo "0.4.1"]]
     :repositories {"local" ~(str (.toURI (java.io.File. "~/.m2")))})
    
  4. I run lein deps:

     Could not find artifact storm-rdbms:storm-rdbms:jar:0.1-SNAPSHOT
     This could be due to a typo in :dependencies or network issues.
     Could not resolve dependencies
    

I've tried this with Maven as well, but Maven 3 is not even able to install the jar when following the directions from here.

Please shed some light on what I'm doing wrong here. Thanks so much!

like image 877
Florie Avatar asked Jan 19 '26 21:01

Florie


1 Answers

when you run mvn install, storm-rdbms seems not to ?properly? install a pom when it installs the jar, which was preventing lein from finding it.

here are the full steps I used:

git clone git://github.com/nathanmarz/storm-contrib.git
cd storm-contrib/storm-rdbms/
mvn install
cp pom.xml ~/.m2/repository/storm/storm-rdbms/0.1-SNAPSHOT/storm-rdbms.pom  

cd ~/my-storm-project 
emacs project.clj and add this dep:
 [storm/storm-rdbms "0.1-SNAPSHOT"]
lein deps

I'm not sure if this is because it's a sub project. I was unable to build the parent project because one of the other sub-projects was broken when I checked it out...

like image 132
Arthur Ulfeldt Avatar answered Jan 23 '26 10:01

Arthur Ulfeldt



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!