Skip to content

Commit

Permalink
fix(leiningen): Fix Issue #66 - Some :repository declarations in proj…
Browse files Browse the repository at this point in the history
…ect.clj cause
  • Loading branch information
laurentpetit committed Nov 6, 2014
1 parent 6b04139 commit 53b8491
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions ChangeLog.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Laurent Petit <laurent dot petit at gmail dot com>
- Counterclockwise was too chatty when files were dragged from the filesystem (e.g. dragging jar files was triggering the 'do you want to create a leiningen project?' popup).
- Counterclockwise was triggering many times the 'do you want to create a leiningen project?' popup after a user declined or failed drag.
- The `letfn` form is indenting correctly the definitions of named functions inside the definition vector. Fix Issue #439
- Fix Issue #666 - Some :repository declarations in project.clj cause

== Changes between Counterclockwise 0.28.1 and 0.29.0

Expand Down
10 changes: 9 additions & 1 deletion ccw.core/src/clj/ccw/leiningen/classpath_container.clj
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
(:use [clojure.core.incubator :only [-?> -?>>]])
(:require [leiningen.core.project :as p]
[leiningen.core.classpath :as cp]
[leiningen.core.user :as lcu]
[cemerick.pomegranate.aether :as aether]
[clojure.string :as str]
[ccw.eclipse :as e]
Expand Down Expand Up @@ -119,7 +120,14 @@

(defn get-source-map
[{:keys [repositories dependencies] :as project} & args]
(let [dep (find-transitive-deps dependencies repositories)]
(let [;; we must explicitly call leiningen.core.user/resolve-crendentials, or repositories
;; with credentials like {:username :env/SOME_ENV} are left as keywords
;; and later down the road, pomegranate calls Aether's Authentication ctor which expects
;; Strings, not keys ... resulting in a runtime exception such as:
;; "No matching ctor found for class org.sonatype.aether.repository.Authentication"
;; See Issue #666 - https://code.google.com/p/counterclockwise/issues/detail?id=666
repositories (map (fn [[name settings]] [name (lcu/resolve-credentials settings)]) repositories)
dep (find-transitive-deps dependencies repositories)]
(into {} (keep #(artifacts-entry % repositories) dep))))

(defn resolve-dependencies
Expand Down

0 comments on commit 53b8491

Please sign in to comment.