                          :alf-edition    #"module\.edition=(.*)\z"
                        }
     :ant               { :ivy #"antlib:org\.apache\.ivy\.ant" }
+    :java              {
+                         :synchronized #"\ssynchronized\s"
+                       }
   })
 
 (defn- build-content-index-for-file-type


(defn- module-versions
  [content-index]
  (let [module-versions    (distinct (map #(second (first (:re-seq %))) (filter #(= :module-version (:regex-id %)) content-index)))
        module-version-str (s/join "," module-versions)]
    { "ModuleVersion" (if (empty? module-version-str) "Not specified" module-version-str) }))

(defn- alfresco-min-versions
  [content-index]
  (let [alfresco-min-versions     (distinct (map #(second (first (:re-seq %))) (filter #(= :repo-min (:regex-id %)) content-index)))
        alfresco-min-versions-str (s/join "," alfresco-min-versions)]
    { "AlfrescoVersionMin" (if (empty? alfresco-min-versions-str) "Not specified" alfresco-min-versions-str) }))

(defn- alfresco-max-versions
  [content-index]
  (let [alfresco-max-versions     (distinct (map #(second (first (:re-seq %))) (filter #(= :repo-max (:regex-id %)) content-index)))
        alfresco-max-versions-str (s/join "," alfresco-max-versions)]
    { "AlfrescoVersionMax" (if (empty? alfresco-max-versions-str) "Not specified" alfresco-max-versions-str) }))

(defn- alfresco-versions
  [content-index]
  (merge
    (alfresco-min-versions content-index)
    (alfresco-max-versions content-index)))

(defn validate
  "Runs all source-based validations."

        file-index    (build-file-types-index files)
        content-index (build-content-index file-index)]
    (merge
      (detect-build-tools              file-index)
      (module-versions                 content-index)
      (alfresco-min-versions           content-index)
      (alfresco-max-versions           content-index)
      (stb08-stb09-use-of-synchronized content-index)
    )))
  