API for clojure.tools.cli.api - tools.deps.alpha 0.12.1085-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



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], :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.

    
    
    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], :as opts})
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]})
Sync or create pom.xml from deps.edn.

Options:
  :argmaps - vector of aliases to combine into argmaps to resolve-deps and make-classpath

    
    
    Source
  


prep

function
Usage: (prep {:keys [basis force log], :or {log :info}, :as params})
Prep the unprepped libs found in the transitive lib set of basis.
If no basis is provided, create and use the default project basis.

Options:
  :basis - basis to prep. If not provided, use (create-basis nil).
  :force - flag on whether to force prepped libs to re-prep (default = false)
  :log - :none, :info (default), or :debug

Returns params modified.

    
    
    Source
  


tree

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

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.

Input options:
  :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.