Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/paketo-buildpacks/clojure-tools

A Cloud Native Buildpack that builds Clojure-based applications from source
https://github.com/paketo-buildpacks/clojure-tools

build-system clojure cnb jvm-applications

Last synced: about 5 hours ago
JSON representation

A Cloud Native Buildpack that builds Clojure-based applications from source

Awesome Lists containing this project

README

        

# `gcr.io/paketo-buildpacks/clojure-tools`

The Paketo Buildpack for Clojure Tools is a Cloud Native Buildpack that builds Clojure-based applications from source.

## Behavior

This buildpack will participate all the following conditions are met

* `/deps.edn` exists

The buildpack will do the following:

* Requests that a JDK be installed
* Links the `~/.m2` to a layer for caching
* If `/deps.edn` exists
* Contributes Clojure Tools to a layer with all commands on `$PATH`
* Runs `/clojure -X:uberjar` to build the application
* Removes the source code in ``, following include/exclude rules
* If `$BP_CLJ_BUILT_ARTIFACT` matched a single file
* Restores `$BP_CLJ_BUILT_ARTIFACT` from the layer, expands the single file to ``
* If `$BP_CLJ_BUILT_ARTIFACT` matched a directory or multiple files
* Restores the files matched by `$BP_CLJ_BUILT_ARTIFACT` to ``

## Configuration

| Environment Variable | Description |
| ------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `$BP_CLJ_TOOLS_BUILD_ENABLED` | Configure the arguments to enable tools build. |
| `$BP_CLJ_TOOLS_BUILD_ARGUMENTS` | Configure the arguments to pass to build system. Defaults to `-T:build uber`. |
| `$BP_CLJ_DEPS_ARGUMENTS` | Configure the arguments to pass to build system. Defaults to `-X:uberjar`. |
| `$BP_CLJ_BUILT_MODULE` | Configure the module to find application artifact in. Defaults to the root module (empty). |
| `$BP_CLJ_BUILT_ARTIFACT` | Configure the built application artifact explicitly. Supersedes `$BP_CLJ_BUILT_MODULE`. Defaults to `target/*.jar`. Can match a single file, multiple files or a directory. Can be one or more space separated patterns. |
| `$BP_INCLUDE_FILES` | Colon separated list of glob patterns to match source files. Any matched file will be retained in the final image. Defaults to `` (i.e. nothing). |
| `$BP_EXCLUDE_FILES` | Colon separated list of glob patterns to match source files. Any matched file will be specifically removed from the final image. If include patterns are also specified, then they are applied first and exclude patterns can be used to further reduce the fileset. |

## Bindings

The buildpack optionally accepts the following bindings:

### Type: `dependency-mapping`

| Key | Value | Description |
| --------------------- | ------- | ------------------------------------------------------------------------------------------------- |
| `` | `` | If needed, the buildpack will fetch the dependency with digest `` from `` |

## License

This buildpack is released under version 2.0 of the [Apache License][a].

[a]: http://www.apache.org/licenses/LICENSE-2.0