Liking cljdoc? Tell your friends :D

cemerick.pomegranate


add-classpathclj

(add-classpath jar-or-dir)
(add-classpath jar-or-dir classloader)

A corollary to the (deprecated) add-classpath in clojure.core. This implementation requires a java.io.File or String path to a jar file or directory, and will attempt to add that path to the right classloader (with the search rooted at the current thread's context classloader).

A corollary to the (deprecated) `add-classpath` in clojure.core. This implementation
requires a java.io.File or String path to a jar file or directory, and will attempt
to add that path to the right classloader (with the search rooted at the current
thread's context classloader).
raw docstring

add-dependenciesclj

(add-dependencies & args)

Resolves a set of dependencies, optionally against a set of additional Maven repositories, and adds all of the resulting artifacts (jar files) to the current runtime via add-classpath:

(add-dependencies :classloader your-classloader :coordinates '[[incanter "1.2.3"]] :repositories (merge cemerick.pomegranate.aether/maven-central {"clojars" "https://clojars.org/repo"}))

Note that the :classloader kwarg is optional; if not provided then resolved dependencies will be added to the closest modifiable classloader in the current thread's hierarchy, as per add-classpath.

Otherwise, acceptable arguments are the same as those for cemerick.pomegranate.aether/resolve-dependencies; returns the dependency graph returned from that function.

Note that Maven central is used as the sole repository if none are specified. If :repositories are provided, then you must merge in the maven-central map from the cemerick.pomegranate.aether namespace yourself.

Resolves a set of dependencies, optionally against a set of additional Maven
repositories, and adds all of the resulting artifacts (jar files) to the
current runtime via `add-classpath`:

(add-dependencies :classloader your-classloader
                  :coordinates '[[incanter "1.2.3"]]
                  :repositories (merge cemerick.pomegranate.aether/maven-central
                                  {"clojars" "https://clojars.org/repo"}))

Note that the `:classloader` kwarg is optional; if not provided then resolved
dependencies will be added to the closest modifiable classloader in the
current thread's hierarchy, as per `add-classpath`.

Otherwise, acceptable arguments are the same as those for
`cemerick.pomegranate.aether/resolve-dependencies`; returns the dependency graph
returned from that function.

Note that Maven central is used as the sole repository if none are specified.
If :repositories are provided, then you must merge in the `maven-central` map from
the cemerick.pomegranate.aether namespace yourself.
raw docstring

classloader-hierarchyclj

(classloader-hierarchy)
(classloader-hierarchy tip)

Returns a seq of classloaders, with the tip of the hierarchy first. Uses the current thread context ClassLoader as the tip ClassLoader if one is not provided.

Returns a seq of classloaders, with the tip of the hierarchy first.
Uses the current thread context ClassLoader as the tip ClassLoader
if one is not provided.
raw docstring

classloader-resourcesclj

(classloader-resources resource-name)
(classloader-resources classloaders resource-name)

Returns a sequence of [classloader url-seq] pairs representing all of the resources of the specified name on the classpath of each classloader. If no classloaders are given, uses the classloader-heirarchy, in which case the order of pairs will be such that the first url mentioned will in most circumstances match what clojure.java.io/resource returns.

Returns a sequence of [classloader url-seq] pairs representing all
of the resources of the specified name on the classpath of each
classloader. If no classloaders are given, uses the
classloader-heirarchy, in which case the order of pairs will be
such that the first url mentioned will in most circumstances match
what clojure.java.io/resource returns.
raw docstring

get-classpathclj

(get-classpath)
(get-classpath classloaders)

Returns the effective classpath (i.e. not the value of (System/getProperty "java.class.path") as a seq of URL strings.

Produces the classpath from all classloaders by default, or from a collection of classloaders if provided. This allows you to easily look at subsets of the current classloader hierarchy, e.g.:

(get-classpath (drop 2 (classloader-hierarchy)))

Returns the effective classpath (i.e. _not_ the value of
(System/getProperty "java.class.path") as a seq of URL strings.

Produces the classpath from all classloaders by default, or from a
collection of classloaders if provided.  This allows you to easily look
at subsets of the current classloader hierarchy, e.g.:

(get-classpath (drop 2 (classloader-hierarchy)))
raw docstring

modifiable-classloader?clj

(modifiable-classloader? cl)

Returns true iff the given ClassLoader is of a type that satisfies the dynapath.dynamic-classpath/DynamicClasspath protocol, and it can be modified.

Returns true iff the given ClassLoader is of a type that satisfies
the dynapath.dynamic-classpath/DynamicClasspath protocol, and it can
be modified.
raw docstring

resourcesclj

(resources resource-name)
(resources classloaders resource-name)

Returns a sequence of URLs representing all of the resources of the specified name on the effective classpath. This can be useful for finding name collisions among items on the classpath. In most circumstances, the first of the returned sequence will be the same as what clojure.java.io/resource returns.

Returns a sequence of URLs representing all of the resources of the
specified name on the effective classpath. This can be useful for
finding name collisions among items on the classpath. In most
circumstances, the first of the returned sequence will be the same
as what clojure.java.io/resource returns.
raw docstring

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

× close