       (subs 1)))
 
 
-(defn- get-dep-version-map
+(defn get-dependencies-from-properties
   "Given the properties portion of a pom, return a seq of "
-  [properties]
-  (let [properties-map (transient {})]
-    (doseq [p properties]
-      (assoc! properties-map (keyword (parse-name (:tag p))) (first (:content p))))
-    (persistent! properties-map)))
-
-(get-dep-version-map (get-properties-from-pom pom))
+  [pom]
+  (if (pom-has-properties? pom)
+    (let [properties (get-properties-from-pom pom)
+          properties-map (transient {})]
+      (doseq [p properties]
+        (assoc! properties-map (keyword (parse-name (:tag p))) (first (:content p))))
+      (persistent! properties-map))
+    nil))
+
+(get-dependencies-from-properties pom)
 
 
 ;;; Functions to process dependencyManagement
 
+(defn- get-deps-from-dependency-management
+  "Given a pom, extract the dependencies from dependencyManagement."
+  [pom]
+  (-> (filter #(tag-equals? % :dependencyManagement) (:content pom))
+      first :content first :content))
+
+(get-deps-from-dependency-management pom)
+
+
+(defn- first-char-is-$? [s] (= "$" (subs s 0 1)))
+
+
+(defn- parse-version-variable
+  [version]
+  (let [length (count version)]
+    (if (first-char-is-$? version)
+      (-> (subs version 2)
+          (subs 0 (- length 3))
+          (clojure.string/split #"\.")
+          first
+          keyword))))
+
+(parse-version-variable "${dep1.version}")
+
+(defn- parse-group-id
+  [gid]
+  (-> (clojure.string/split gid #"\.")
+      last keyword))
+
+(parse-group-id "a.b.c")
+
+(defn- make-dependency-version-pair
+  [m properties]
+  (let [{:keys [tag attrs content]} m
+        group-id-map (first (filter #(tag-equals? % :groupId) content))
+        group-id (first (:content group-id-map))
+        version-map (first (filter #(tag-equals? % :version) content))
+        version (first (:content version-map))]
+    [(parse-group-id group-id)
+     (if (first-char-is-$? version)
+       (get properties (parse-version-variable version))
+       version)]))
+
+
+(def x {:tag :dependency
+        :attrs nil
+        :content [{:tag :groupId
+                   :attrs nil
+                   :content ["com.company.dep1"]}
+
+                  {:tag :artifactId
+                   :attrs nil
+                   :content ["dep1-core"]}
+
+                  {:tag :version
+                   :attrs nil
+                   :content ["${dep1.version}"]}
+
+                  {:tag :type
+                   :attrs nil
+                   :content ["tar.gz"]}]})
+
+(make-dependency-version-pair x {:dep1 "1.0.0-SNAPSHOT"})
+
+(defn process-dependency-management
+  [pom]
+  (if (pom-has-dependencyManagement? pom)
+    (let [properties (get-dependencies-from-properties pom)
+          deps (get-deps-from-dependency-management pom)
+          deps-seq (map #(make-dependency-version-pair % properties) deps)]
+      (into {} deps-seq))
+    nil))
+
+(process-dependency-management pom)
+
+
 ;;; Functions to process dependencies
+

    has-version?))


(defn- parse-name
  [name]
  (-> (clojure.string/split (str name) #"\.")


(defn- pom-has-properties?
  [pom]
  (-> (filter #(tag-equals? % :properties) (:content pom))
      count
      (> 0)))


(defn- pom-has-dependencyManagement?
  [pom]
  (-> (filter #(tag-equals? % :dependencyManagement) (:content pom))
      count
      (> 0)))


(defn- pom-has-dependencies?
  [pom]
  (-> (filter #(tag-equals? % :dependencies) (:content pom))
      count
      (> 0)))


;;; Functions to process the properties section

(defn- contains-version?
  "Checks a given member of the pom properties to see if it contains version number."
