API for clojure.tools.cli.api - tools.deps.alpha 0.15.1255-SNAPSHOT (in development)


Full namespace name: clojure.tools.cli.api

Overview

This api provides functions that can be executed from the Clojure tools using -X:deps.

Public Variables and Functions



aliases

function
Usage: (aliases params)
List all aliases available for use with the CLI using -M, -X or -T execution
(note that some aliases may be usable with more than one of these). Also, the
deps.edn sources of the alias are specified.

This program accepts the same basis-modifying arguments from the `basis` program.
Each dep source value can be :standard, a string path, a deps edn map, or nil.
Sources are merged in the order - :root, :user, :project, :extra.

For example, to print only aliases defined in this project:
  clj -X:deps aliases :root nil :user nil

Basis options:
  :root    - dep source, default = :standard
  :user    - dep source, default = :standard
  :project - dep source, default = :standard ("./deps.edn")
  :extra   - dep source, default = nil

The aliases are printed to the console.

    
    
    Source
  


basis

function
Usage: (basis params)
Create a basis from a set of deps sources and a set of aliases. By default, use
root, user, and project deps and no argmaps (essentially the same classpath you get by
default from the Clojure CLI).

Each dep source value can be :standard, a string path, a deps edn map, or nil.
Sources are merged in the order - :root, :user, :project, :extra.

Aliases refer to argmaps in the merged deps that will be supplied to the basis
subprocesses (tool, resolve-deps, make-classpath-map).

The following subprocess argmap args can be provided:
  Key                  Subproc             Description
  :replace-deps        tool                Replace project deps
  :replace-paths       tool                Replace project paths
  :extra-deps          resolve-deps        Add additional deps
  :override-deps       resolve-deps        Override coord of dep
  :default-deps        resolve-deps        Provide coord if missing
  :extra-paths         make-classpath-map  Add additional paths
  :classpath-overrides make-classpath-map  Replace lib path in cp

Options:
  :root    - dep source, default = :standard
  :user    - dep source, default = :standard
  :project - dep source, default = :standard ("./deps.edn")
  :extra   - dep source, default = nil
  :aliases - coll of aliases of argmaps to apply to subprocesses

Returns {:basis basis}, which basis is initial deps edn map plus these keys:
  :resolve-args - the resolve args passed in, if any
  :classpath-args - the classpath args passed in, if any
  :libs - lib map, per resolve-deps
  :classpath - classpath map per make-classpath-map
  :classpath-roots - vector of paths in classpath order

    
    
    Source
  


find-versions

function
Usage: (find-versions {:keys [lib tool n], :or {n 8}, :as args})
Find available tool versions given either a lib (with :lib) or
existing installed tool (with :tool). If lib, check all registered
procurers and print one coordinate per line when found.

Options:
  :lib  Qualified lib symbol
  :tool Tool name for installed tool
  :n    Number of coordinates to return, default = 8, :all for all

    
    
    Source
  


git-resolve-tags

function
Usage: (git-resolve-tags _)
Resolve git tags in deps.edn git deps to full shas.

    
    
    Source
  


list

function
Usage: (list params)
List all deps on the classpath, optimized for knowing the final set of included
libs. The `tree` program can provide more info on why or why not a particular
lib is included.

Licenses will be printed in short form by default but can also be listed as
in :full or :none for none at all using the :license key.

By default, :format will :print to the console in a human friendly tree. Use
:edn mode to print the tree to edn.

This program accepts the same basis-modifying arguments from the `basis` program.
Each dep source value can be :standard, a string path, a deps edn map, or nil.
Sources are merged in the order - :root, :user, :project, :extra.

Options:
  :license - :full, :short (default), :none

Output mode options:
  :format    :print (default) or :edn

Basis options:
  :root    - dep source, default = :standard
  :user    - dep source, default = :standard
  :project - dep source, default = :standard ("./deps.edn")
  :extra   - dep source, default = nil
  :aliases - coll of kw aliases of argmaps to apply to subprocesses

The libs are printed to the console.

    
    
    Source
  


mvn-install

function
Usage: (mvn-install {:keys [jar pom lib version classifier local-repo]})
Install a jar and pom to the Maven local cache.
The pom file must either be supplied, or generated based
on provided lib/version/classifier, or provided inside the jar.
The group/artifact/version coordinate will be pulled from the
pom source as above.

Required:
  :jar (reqired) - path to jar file (embedded pom used by default)

Explicit pom options:
  :pom - path to pom file (pom in jar ignored)

Generated pom options:
  :lib - qualified symbol like my.org/lib
  :version - string
  :classifier - string

Other options:
  :local-repo (optional) - path to local repo (default = ~/.m2/repository)

Execute ad-hoc:
  clj -X:deps mvn/install :jar '"foo-1.2.3.jar"'

    
    
    Source
  


mvn-pom

function
Usage: (mvn-pom {:keys [argmaps], :as opts})
Sync or create pom.xml from deps.edn.

This program accepts the same basis-modifying arguments from the `basis` program.
Each dep source value can be :standard, a string path, a deps edn map, or nil.
Sources are merged in the order - :root, :user, :project, :extra.

Basis options:
  :root    - dep source, default = :standard
  :user    - dep source, default = :standard
  :project - dep source, default = :standard ("./deps.edn")
  :extra   - dep source, default = nil
  :aliases - coll of kw aliases of argmaps to apply to subprocesses

Deprecated options (use the basis :aliases above instead):
  :argmaps - vector of aliases to combine into argmaps to resolve-deps and make-classpath

    
    
    Source
  


prep

function
Usage: (prep {:keys [force log current], :or {log :info, current false}, :as params})
Prep the unprepped libs found in the transitive lib set of basis.

This program accepts the same basis-modifying arguments from the `basis` program.
Each dep source value can be :standard, a string path, a deps edn map, or nil.
Sources are merged in the order - :root, :user, :project, :extra.

Options:
  :force - flag on whether to force prepped libs to re-prep (default = false)
  :current - flag on whether to prep current project too (default = false)
  :log - :none, :info (default), or :debug

Basis options:
  :root    - dep source, default = :standard
  :user    - dep source, default = :standard
  :project - dep source, default = :standard ("./deps.edn")
  :extra   - dep source, default = nil
  :aliases - coll of kw aliases of argmaps to apply to subprocesses

Returns params used.

    
    
    Source
  


tree

function
Usage: (tree opts)
Print deps tree for the current project's deps.edn built from either the
a basis, or if provided, the trace file.

This program accepts the same basis-modifying arguments from the `basis` program.
Each dep source value can be :standard, a string path, a deps edn map, or nil.
Sources are merged in the order - :root, :user, :project, :extra.

By default, :format will :print to the console in a human friendly tree. Use
:edn mode to print the tree to edn.

In print mode, deps are printed with prefix of either . (included) or X (excluded).
A reason code for inclusion/exclusion may be added at the end of the line.

Basis options:
  :root    - dep source, default = :standard
  :user    - dep source, default = :standard
  :project - dep source, default = :standard ("./deps.edn")
  :extra   - dep source, default = nil
  :aliases - coll of kw aliases of argmaps to apply to subprocesses

Input options (if provided, basis options ignored):
  :file      Path to trace.edn file (from clj -Strace) to use in computing the tree

Output mode:
  :format    :print (default) or :edn

Print output mode modifiers:
  :indent    Indent spacing (default = 2)
  :hide-libs Set of libs to hide as deps (if not top dep), default = #{org.clojure/clojure}

    
    
    Source
  
Logo & site design by Tom Hickey.
Clojure auto-documentation system by Tom Faulhaber.