(artifact x)(artifact type x)converts various artifact formats
(artifact :string '[hara/hara "2.4.0"]) => "hara:hara:jar:2.4.0"
(artifact :path "hara:hara:2.4.0") => (str base/local-repo "/hara/hara/2.4.0/hara-2.4.0.jar")
converts various artifact formats
(artifact :string '[hara/hara "2.4.0"])
=> "hara:hara:jar:2.4.0"
(artifact :path "hara:hara:2.4.0")
=> (str base/*local-repo*
"/hara/hara/2.4.0/hara-2.4.0.jar")(artifact-coord x)(artifact-coord _ x)converts an artifact in any format to the coord representation
(artifact-coord "hara:hara:jar:2.4.0") => '[hara/hara "2.4.0"]
converts an artifact in any format to the coord representation (artifact-coord "hara:hara:jar:2.4.0") => '[hara/hara "2.4.0"]
(artifact-default x)(artifact-default _ x)converts an artifact in any format to the default representation
(artifact-default '[hara/hara "2.4.0"]) => rep?
converts an artifact in any format to the default representation (artifact-default '[hara/hara "2.4.0"]) => rep?
(artifact-path x)(artifact-path _ x)converts an artifact in any format to the path representation
(artifact-path '[hara/hara "2.4.0"]) => "<.m2>/hara/hara/2.4.0/hara-2.4.0.jar"
converts an artifact in any format to the path representation (artifact-path '[hara/hara "2.4.0"]) => "<.m2>/hara/hara/2.4.0/hara-2.4.0.jar"
(artifact-string x)(artifact-string _ x)converts an artifact in any format to the string representation
(artifact-string '[hara/hara "2.4.0"]) => "hara:hara:jar:2.4.0"
converts an artifact in any format to the string representation (artifact-string '[hara/hara "2.4.0"]) => "hara:hara:jar:2.4.0"
(artifact-symbol x)(artifact-symbol _ x)converts an artifact in any format to the symbol representation
(artifact-symbol '[hara/hara "2.4.0"]) => 'hara/hara
converts an artifact in any format to the symbol representation (artifact-symbol '[hara/hara "2.4.0"]) => 'hara/hara
(coord->rep [name version & {:keys [scope exclusions]}])converts a coord to a rep instance
(coord->rep '[hara/hara "2.4.0"]) => (contains {:group "hara" :artifact "hara" :version "2.4.0"})
converts a coord to a rep instance
(coord->rep '[hara/hara "2.4.0"])
=> (contains {:group "hara"
:artifact "hara"
:version "2.4.0"})(coord? obj)checks for a valid coordinate
(coord? '[org.clojure/clojure "1.8.0"]) => true
(coord? '[1 2 3]) => false
checks for a valid coordinate (coord? '[org.clojure/clojure "1.8.0"]) => true (coord? '[1 2 3]) => false
(path->rep x)converts a path to a rep instance
(path->rep (str base/local-repo "/hara/hara/2.4.0/hara-2.4.0.jar")) => (contains {:group "hara" :artifact "hara" :version "2.4.0"})
converts a path to a rep instance
(path->rep (str base/*local-repo* "/hara/hara/2.4.0/hara-2.4.0.jar"))
=> (contains {:group "hara"
:artifact "hara"
:version "2.4.0"})(rep obj)converts various formats to a rep
(str (rep '[hara/hara "2.4.0"])) => "hara:hara:jar:2.4.0"
(str (rep "hara:hara:2.4.0")) => "hara:hara:jar:2.4.0"
converts various formats to a rep (str (rep '[hara/hara "2.4.0"])) => "hara:hara:jar:2.4.0" (str (rep "hara:hara:2.4.0")) => "hara:hara:jar:2.4.0"
(rep->coord {:keys [group artifact version exclusions scope]})encodes the rep to a coordinate
(-> {:group "hara" :artifact "hara" :version "2.4.0"} (map->Rep) (rep->coord)) => '[hara/hara "2.4.0"]
encodes the rep to a coordinate
(-> {:group "hara" :artifact "hara" :version "2.4.0"}
(map->Rep)
(rep->coord))
=> '[hara/hara "2.4.0"](rep->path {:keys [group artifact version extension]})encodes the rep to a path
(-> {:group "hara" :artifact "hara" :version "2.4.0"} (map->Rep) (rep->path)) => "<.m2>/hara/hara/2.4.0/hara-2.4.0.jar"
encodes the rep to a path
(-> {:group "hara" :artifact "hara" :version "2.4.0"}
(map->Rep)
(rep->path))
=> "<.m2>/hara/hara/2.4.0/hara-2.4.0.jar"(rep->string {:keys [group artifact extension version]})encodes the rep to a string
(-> {:group "hara" :artifact "hara" :version "2.4.0"} (map->Rep) (rep->string)) => "hara:hara:2.4.0"
encodes the rep to a string
(-> {:group "hara" :artifact "hara" :version "2.4.0"}
(map->Rep)
(rep->string))
=> "hara:hara:2.4.0"(rep-default x)creates the default representation of a artifact
(into {} (rep-default "hara:hara:2.4.0")) => {:properties {}, :group "hara", :classifier nil, :file nil, :exclusions nil, :scope nil, :extension "jar", :artifact "hara", :version "2.4.0"}
creates the default representation of a artifact
(into {} (rep-default "hara:hara:2.4.0"))
=> {:properties {},
:group "hara",
:classifier nil,
:file nil,
:exclusions nil,
:scope nil,
:extension "jar",
:artifact "hara",
:version "2.4.0"}(rep? obj)checks if an object is of type hara.module.artifact.Rep
(rep? (rep "hara:hara:2.4.0")) => true
checks if an object is of type `hara.module.artifact.Rep` (rep? (rep "hara:hara:2.4.0")) => true
(string->rep s)converts a string to a rep instance
(string->rep "hara:hara:2.4.0") => (contains {:group "hara" :artifact "hara" :version "2.4.0"})
converts a string to a rep instance
(string->rep "hara:hara:2.4.0")
=> (contains {:group "hara"
:artifact "hara"
:version "2.4.0"})cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |