       (into {} deps-seq))
     nil))
 
-(process-dependencies-section pom)
-
 
 ;;; Process entire pom
 
 (defn process-pom
   "Given a pom file, extract it's dependencies and versions and place in a hash-map."
-  [pom]
-  (let [project-name (get-library-name-from-pom pom)
+  [path-to-pom]
+  (let [pom (load-pom path-to-pom)
+        project-name (get-library-name-from-pom pom)
         version (get-library-version-from-pom pom)
         dep-management (process-dependency-management pom)
         deps (process-dependencies-section pom)
         dependencies (merge dep-management deps)]
     {:name project-name :version version :dependencies dependencies}))
 
-(process-pom pom)
+;(process-pom "resources/pom.xml")
 
 
 

(ns descent.pom-parser
  (:use [clojure.xml :only (parse)])
  (:require [clojure.java.io :as io]))

(defn load-pom [pom-location] (parse (java.io.File. pom-location)))

(def pom (load-pom "resources/pom.xml"))


;(:tag pom)
;(:attrs pom)

;; :content once takes us to the 1st level of data
;(:content pom)

;(def library (-> pom :content (nth 2) :content first))
;(def version (-> pom :content (nth 5) :content first))

(defn- get-library-name-from-pom
  "Given a pom, extract the project name."
  [pom]
  (-> pom :content (nth 2) :content first))

(defn- get-library-version-from-pom
  "Given a pom, extract the project version."
  [pom]
  (-> pom :content (nth 5) :content first))

;(get-properties-from-pom pom)

;(def properties (get-properties-from-pom pom))
;(first properties)



;(contains-version? {:tag :apple.hh})
;(contains-version? {:tag :rivulet.version})

;(filter-out-properties-without-version properties)


;;;; Access the project dependencies through the following logic:

      (persistent! properties-map))
    nil))


;;; Functions to process dependencyManagement

