Fork me on GitHub
#leiningen
<
2018-10-03
>
Jakub HolĂ˝ (HolyJak)08:10:10

Hello, can somebody please help? lein repl fails with > org.eclipse.aether.transfer.ArtifactNotFoundException: Could not find artifact com.oracle:ojdbc6:jar:11.2.0.4 in central (https://repo1.maven.org/maven2/) though I do have it locally

🐟  ls -l ~/.m2/repository/com/oracle/ojdbc6/11.2.0.4/ojdbc6-11.2.0.4.jar
-rw-r--r--  1 me  staff  4494540 Oct 19  2015 /Users/me/.m2/repository/com/oracle/ojdbc6/11.2.0.4/ojdbc6-11.2.0.4.jar
When I try lein pom and eg mvn compile, it works w/o problem and does not try to download oracle. In project.clj: :dependencies [[com.oracle/ojdbc6 "11.2.0.4"] ...

✅ 4
Jakub HolĂ˝ (HolyJak)08:10:03

Problem solved: The solution was

rm ~/.m2/repository/com/oracle/ojdbc6/11.2.0.4/_remote.repositories

Jakub HolĂ˝ (HolyJak)08:10:35

Another question: in REPL there is some problem with loading automatically my namespaces - when I do (load-file "src/devbot/core.clj") it fails with java.lang.Exception: namespace 'devbot.xml' not found (where devbot.xml is required from core). I can fix it by running (load-file "src/devbot/xml.clj")but normally this is done automatically, why does it fail here & now? Any ideas?

Jakub HolĂ˝ (HolyJak)09:10:18

Ok, it seems that :main devbot.core somehow causes this problem; but why? That is surely wrong to have such an effect?!

mikerod14:10:58

@holyjak is this a :gen-class namespace? why are you using load-file instead of a higher-level construct like require

Jakub HolĂ˝ (HolyJak)15:10:06

Yes it is. I have never thought of using require to re-read a source file already required in the current ns

Jakub HolĂ˝ (HolyJak)15:10:20

Will try it, thx for the tip

mikerod14:10:06

@holyjak the issue with the rm of _remote.repositories is a feature in lein I think

mikerod14:10:10

I ran into it before

mikerod14:10:41

release version artifacts (non-snapshot) are only used from the local repo if they were sourced from the same release repo your project is currently configured with

mikerod14:10:51

it is a “namespacing” of release artifacts sort of thing

mikerod14:10:55

the most relevant docs around that subject are https://github.com/technomancy/leiningen/wiki/Repeatability#corporate-artifact-repository

👍 4
❤️ 4