Home > Project.clj-SPEC

Project.clj-SPEC

Project.clj-SPEC is a project mainly written in ..., it's free.

Official specification for Project.clj files

Project.clj SPEC

The relatively new Clojure eco-system already sports 3 build systems which rely on a project.clj file: Cake, Lein and Polyglot Maven.

All three of these have (or are bound to have) subtle differences in the way they consume/understand the project.clj as there is no standard specification. This project aims to provide that specification.

Ideally if the implementer of an IDE wants to rely on information in the project.clj, he should not have to cater specifically to all 3 build systems but rather code to this spec and the build systems should ensure compatability.

(defproject name-as-SYMBOL-OR-STRING version-as-STRING
    keyword value)

Example:

(defproject build-spec "0.0.1"
    :option value)

The keywords can be the following and accept values of the type described below

Keyword Description Type Example
:description Description of the Project String "My project"
:main Namespace for Jar/War files main entry Symbol project.core
:namespaces Namespaces to be AOT compiled Vector of Symbols [namespace1 namespace2]
:repositories List of Maven repositories used to fetch dependencies Vector of Vectors of Strings [["maven2-repository.dev.java.net" "http://download.java.net/maven/2/"]]
:dependencies List of project dependencies Vector of (Vectors with group-id/artifact-id as symbol and version as string) OR (Vectors of strings). [[org.clojure/clojure "1.2.0"]] OR [["org.clojure/clojure-1.2.0"]]
:dev-dependencies List of project development dependencies Vector of (Vectors with group-id/artifact-id as symbol and version as string) OR (Vectors of strings) [[org.clojure/clojure "1.2.0"]] OR [["org.clojure/clojure-1.2.0"]]
:jar-files List of folders to be embedded in jar-files Vector of Vectors of 2 strings. First string is physical folder, the second is path in the jar files :jar-files [["resources" ""]] (will make project/resources/file.clj appear as /file.clj in the jar-file)
:war-files List of folders to be embedded in war-files Vector of Vectors of 2 strings. First string is physical folder, the second is path in the war files :jar-files [["resources" ""]] (will make project/resources/file.clj appear as /file.clj in the jar-file)
:omit-source Boolean to determine if source is omitted from jar/war files Boolean (true or false) :omit-source true
:aot Enum to enable AOT compilation of all namespaces :all :aot :all
Previous:image_tools