Skip to content

Commit

Permalink
Second attempt at the maven reporting bug, Resolves technomancy#112
Browse files Browse the repository at this point in the history
  • Loading branch information
arohner committed Sep 22, 2010
1 parent ceec0be commit b5ebd46
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/leiningen/deps.clj
Expand Up @@ -45,9 +45,20 @@

(defn- make-deps-task [project deps-set]
(let [deps-task (DependenciesTask.)]
(.setProject deps-task lancet/ant-project)
;; in maven-ant-tasks (at least 2.0.10 and 2.1.1) if there's an
;; exception thrown, there must be a call to
;; AbstractArtifactTask.getContainer() made to set some local
;; state on the task, before the exception happens, or else you
;; don't see stack traces. getContainer is a protected
;; method. Since we don't have contrib, we can't use
;; wall-hack-method, and clojure.lang.Reflector doesn't call
;; private methods, we'll call a public method that we know calls
;; getContainer, getSupportedProtocols.
;;
(.getSupportedProtocols deps-task)
(.setBasedir lancet/ant-project (:root project))
(.setFilesetId deps-task "dependency.fileset")
(.setProject deps-task lancet/ant-project)
(.setPathId deps-task (:name project))
(doseq [r (map make-repository (repositories-for project))]
(.addConfiguredRemoteRepository deps-task r))
Expand Down

0 comments on commit b5ebd46

Please sign in to comment.