Liking cljdoc? Tell your friends :D

clojure.tools.build.tasks.process


java-commandclj

(java-command {:keys [java-cmd cp basis java-opts main main-args use-cp-file]
               :or {use-cp-file :auto}
               :as _params})

Create Java command line args. The classpath will be the combination of :cp followed by the classpath from the basis, both are optional.

Options: :java-cmd - Java command, default = $JAVA_CMD or 'java' on $PATH, or $JAVA_HOME/bin/java :cp - coll of string classpath entries, used first (if provided) :basis - runtime basis used for classpath, used last (if provided) :java-opts - coll of string jvm opts :main - required, main class symbol :main-args - coll of main class args :use-cp-file - one of: :auto (default) - use only if os=windows && Java >= 9 && command length >= 8k :always - always write classpath to temp file and include :never - never write classpath to temp file (pass on command line)

Returns: :command-args - coll of command arg strings

Create Java command line args. The classpath will be the combination of
:cp followed by the classpath from the basis, both are optional.

Options:
  :java-cmd - Java command, default = $JAVA_CMD or 'java' on $PATH, or $JAVA_HOME/bin/java
  :cp - coll of string classpath entries, used first (if provided)
  :basis - runtime basis used for classpath, used last (if provided)
  :java-opts - coll of string jvm opts
  :main - required, main class symbol
  :main-args - coll of main class args
  :use-cp-file - one of:
                   :auto (default) - use only if os=windows && Java >= 9 && command length >= 8k
                   :always - always write classpath to temp file and include
                   :never - never write classpath to temp file (pass on command line)

Returns:
  :command-args - coll of command arg strings
sourceraw docstring

java-executableclj

(java-executable)

Given the environment, emulate the Clojure CLI logic to determine the Java executable path and return it by trying in order: $JAVA_CMD java on the PATH $JAVA_HOME/bin/java

Given the environment, emulate the Clojure CLI logic to determine the
Java executable path and return it by trying in order:
  $JAVA_CMD
  java on the PATH
  $JAVA_HOME/bin/java
sourceraw docstring

processclj

(process {:keys [command-args dir env out err out-file err-file]
          :or {dir "." out :inherit err :inherit}
          :as opts})

Exec the command made from command-args, redirect out and err as directed, and return {:exit exit-code, :out captured-out, :err captured-err}

Options: :command-args - required, coll of string args :dir - directory to run the command from, default current directory :out - one of :inherit :capture :write :append :ignore :err - one of :inherit :capture :write :append :ignore :out-file - file path to write if :out is :write or :append :err-file - file path to write if :err is :write or :append :env - map of environment variables to set

The :out and :err input flags take one of the following options: :inherit - inherit the stream and write the subprocess io to this process's stream (default) :capture - capture the stream to a string and return it :write - write to :out-file or :err-file :append - append to :out-file or :err-file :ignore - ignore the stream

Exec the command made from command-args, redirect out and err as directed,
and return {:exit exit-code, :out captured-out, :err captured-err}

Options:
  :command-args - required, coll of string args
  :dir - directory to run the command from, default current directory
  :out - one of :inherit :capture :write :append :ignore
  :err - one of :inherit :capture :write :append :ignore
  :out-file - file path to write if :out is :write or :append
  :err-file - file path to write if :err is :write or :append
  :env - map of environment variables to set

The :out and :err input flags take one of the following options:
  :inherit - inherit the stream and write the subprocess io to this process's stream (default)
  :capture - capture the stream to a string and return it
  :write - write to :out-file or :err-file
  :append - append to :out-file or :err-file
  :ignore - ignore the stream
sourceraw docstring

whichclj

(which cmd)

Given the name of an executable, return either a full path to its location on the system PATH or nil if not found

Given the name of an executable, return either a full path to
its location on the system PATH or nil if not found
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close