Functionality related to combing Maven POMs for license information.
In this namespace abbreviations are used for Maven's groupId, artifactId, and version concepts. So for example:
GA
means groupId & artifactIdGAV
means groupId, artifactId & versionIn function calls where a version isn't required or provided, the library will determine and use the latest available version, as determined from (in order):
Other/custom Maven artifact repositories are not currently supported.
Functionality related to combing Maven POMs for license information. In this namespace abbreviations are used for Maven's groupId, artifactId, and version concepts. So for example: * `GA` means groupId & artifactId * `GAV` means groupId, artifactId & version In function calls where a version isn't required or provided, the library will determine and use the latest available version, as determined from (in order): 1. your local Maven cache (usually ~/.m2/repository) 2. Maven Central 3. Clojars Other/custom Maven artifact repositories are not currently supported.
A String containing a file path for the default local Maven artifact cache that the library uses. Attempts to use this Maven client command to determine this value:
mvn help:evaluate -Dexpression=settings.localRepository -q -DforceStdout
but falls back on a "best guess" if the Maven client isn't installed or cannot be executed.
A String containing a file path for the default local Maven artifact cache that the library uses. Attempts to use this Maven client command to determine this value: mvn help:evaluate -Dexpression=settings.localRepository -q -DforceStdout but falls back on a "best guess" if the Maven client isn't installed or cannot be executed.
A map containing the default remote Maven artifact repositories that the library uses. Each key is a string that's the short identifier of the repo (e.g. "clojars"), and each value is the base URL of that artifact repository (e.g. "https://repo.clojars.org").
A map containing the default remote Maven artifact repositories that the library uses. Each key is a string that's the short identifier of the repo (e.g. "clojars"), and each value is the base URL of that artifact repository (e.g. "https://repo.clojars.org").
(ga->metadata-uri {:keys [group-id artifact-id]})
(ga->metadata-uri group-id artifact-id)
Returns a java.net.URI pointing to the maven-metadata.xml for the given GA, or nil if one cannot be found. The returned URI is guaranteed to be resolvable - either to a file that exists in the local Maven cache, or to an HTTP-accessible resource on a remote Maven repository (e.g. Maven Central, Clojars) that resolves.
Returns a java.net.URI pointing to the maven-metadata.xml for the given GA, or nil if one cannot be found. The returned URI is guaranteed to be resolvable - either to a file that exists in the local Maven cache, or to an HTTP-accessible resource on a remote Maven repository (e.g. Maven Central, Clojars) that resolves.
(ga-latest-version group-id artifact-id)
Determines the latest version of the given GA as a String, or nil if it cannot be determined.
Note that this could be a SNAPSHOT, RC, or other pre-release version.
Determines the latest version of the given GA as a String, or nil if it cannot be determined. Note that this could be a SNAPSHOT, RC, or other pre-release version.
(ga-release-version group-id artifact-id)
Determines the release version (if any) of the given GA as a String, or nil if it cannot be determined or the GA doesn't have a released version yet.
Determines the release version (if any) of the given GA as a String, or nil if it cannot be determined or the GA doesn't have a released version yet.
(gav->expressions group-id artifact-id)
(gav->expressions group-id artifact-id version)
Returns a set of SPDX expressions (Strings) for the given GA and optionally V.
If version is not provided, the latest version is looked up (which involves file and potentially also network I/O).
Returns a set of SPDX expressions (Strings) for the given GA and optionally V. If version is not provided, the latest version is looked up (which involves file and potentially also network I/O).
(gav->expressions-info group-id artifact-id)
(gav->expressions-info group-id artifact-id version)
Returns an expressions-info map for the given GA and (optionally) V.
If version is not provided, the latest version is looked up (which involves file and potentially also network I/O).
Returns an expressions-info map for the given GA and (optionally) V. If version is not provided, the latest version is looked up (which involves file and potentially also network I/O).
(gav->metadata-uri {:keys [group-id artifact-id version]})
(gav->metadata-uri group-id artifact-id version)
Returns a java.net.URI pointing to the maven-metadata.xml for the given GAV, or nil if one cannot be found. The returned URI is guaranteed to be resolvable - either to a file that exists in the local Maven cache, or to an HTTP-accessible resource on a remote Maven repository (e.g. Maven Central, Clojars) that resolves.
Returns a java.net.URI pointing to the maven-metadata.xml for the given GAV, or nil if one cannot be found. The returned URI is guaranteed to be resolvable - either to a file that exists in the local Maven cache, or to an HTTP-accessible resource on a remote Maven repository (e.g. Maven Central, Clojars) that resolves.
(gav->pom-uri {:keys [group-id artifact-id version]})
(gav->pom-uri group-id artifact-id)
(gav->pom-uri group-id artifact-id version)
Returns a java.net.URI pointing to the POM for the given GAV, or nil if one cannot be found. The returned URI is guaranteed to be resolvable - either to a file that exists in the local Maven cache, or to an HTTP-accessible resource on a remote Maven repository (e.g. Maven Central, Clojars) that resolves.
If version is not provided, determines the latest version (which may be a SNAPSHOT) and uses that.
Returns a java.net.URI pointing to the POM for the given GAV, or nil if one cannot be found. The returned URI is guaranteed to be resolvable - either to a file that exists in the local Maven cache, or to an HTTP-accessible resource on a remote Maven repository (e.g. Maven Central, Clojars) that resolves. If version is not provided, determines the latest version (which may be a SNAPSHOT) and uses that.
(init!)
Initialises this namespace upon first call (and does nothing on subsequent calls), returning nil. Consumers of this namespace are not required to call this fn, as initialisation will occur implicitly anyway; it is provided to allow explicit control of the cost of initialisation to callers who need it.
Initialises this namespace upon first call (and does nothing on subsequent calls), returning nil. Consumers of this namespace are not required to call this fn, as initialisation will occur implicitly anyway; it is provided to allow explicit control of the cost of initialisation to callers who need it.
(local-maven-repo)
The current local Maven repo in use, as a String containing a file path.
The current local Maven repo in use, as a String containing a file path.
(pom->expressions pom)
(pom->expressions pom filepath)
Returns a set of SPDX expressions (Strings) for the given POM file (an InputStream or something that can have an io/input-stream opened on it), or nil if no expressions were found.
If an InputStream is provided, it is the caller's responsibility to open and close it, and a filepath associated with the InputStream must be provided as the second parameter (it is optional for other types of input).
Returns a set of SPDX expressions (Strings) for the given POM file (an InputStream or something that can have an io/input-stream opened on it), or nil if no expressions were found. If an InputStream is provided, it is the caller's responsibility to open and close it, and a filepath associated with the InputStream *must* be provided as the second parameter (it is optional for other types of input).
(pom->expressions-info pom)
(pom->expressions-info pom filepath)
Returns an expressions-info map for the given POM file (an InputStream or something that can have an io/input-stream opened on it), or nil if no expressions were found.
If an InputStream is provided, it is the caller's responsibility to open and close it, and a filepath associated with the InputStream must be provided as the second parameter (it is optional for other types of input).
Note: throws on XML parsing error
Returns an expressions-info map for the given POM file (an InputStream or something that can have an io/input-stream opened on it), or nil if no expressions were found. If an InputStream is provided, it is the caller's responsibility to open and close it, and a filepath associated with the InputStream *must* be provided as the second parameter (it is optional for other types of input). Note: throws on XML parsing error
(remote-maven-repos)
The current remote Maven repos in use, as a map in the format described in
default-remote-maven-repos
.
The current remote Maven repos in use, as a map in the format described in `default-remote-maven-repos`.
(set-local-maven-repo! dir)
Sets the local Maven repo to use from this point onward. The argument is a String containing a file path that must be a readable directory that exists (throws ex-info if these conditions are not met).
Sets the local Maven repo to use from this point onward. The argument is a String containing a file path that must be a readable directory that exists (throws ex-info if these conditions are not met).
(set-remote-maven-repos! repos)
Sets the remote Maven repos to use from this point onward. The argument is a
map in the format described in default-remote-maven-repos
.
For most use cases you should merge default-remote-maven-repos
with whatever
additional repos you wish to provide (the rare exceptions being situations
such as a dev environment that contains a custom Maven artifact repository
that proxies/caches Maven Central and/or Clojars).
Sets the remote Maven repos to use from this point onward. The argument is a map in the format described in `default-remote-maven-repos`. For most use cases you should merge `default-remote-maven-repos` with whatever additional repos you wish to provide (the rare exceptions being situations such as a dev environment that contains a custom Maven artifact repository that proxies/caches Maven Central and/or Clojars).
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close