Skip to content
This repository has been archived by the owner on Oct 25, 2023. It is now read-only.

Commit

Permalink
Update Java invoker readme
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Su <[email protected]>
  • Loading branch information
andrew-su committed May 16, 2022
1 parent bf2c9d3 commit 930671e
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions buildpacks/java/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,28 @@ The Java Function Buildpack is a Cloud Native Buildpack that provides a Spring B

## Behaviour
This buildpack will participate if any of the following conditions are met:
* A file with the name `func.yaml` is detected
* One of the configuration environment variables are explicitly set.
* A file with the name `func.yaml` is detected.

The buildpack will do the following if detection passed:
* Request for a JRE to be installed
* Contributes the Spring Boot application to a layer marked `launch` with the layer's path prepended to `$CLASSPATH`
* Contributes environment variables defined in `func.yaml` to the `launch` layer
* Contributes environment variables to configure Spring Boot if any configuration variables are defined. (Overrides anything from `func.yaml`)

## Configuration

| Environment Variable | Description |
|----------------------|-------------|
| `$BP_FUNCTION` | Configure the composition of functions. Defaults to empty (load all functions). |
| `$BP_FUNCTION_PACKAGES` | Configure the package to search for functions. Defaults to `functions`. |


## Getting started
To get started you'll need to create a directory where your function will be defined.

From within this directory we require a few files to properly detect this as a Java function:
* `func.yaml`: We use this to configure the runtime environment variables. See the [Knative Func CLI docs](https://github.com/knative-sandbox/kn-plugin-func/blob/main/docs/guides/func_yaml.md) for more details.
* `func.yaml` (optional): We use this to configure the runtime environment variables. See the [Knative Func CLI docs](https://github.com/knative-sandbox/kn-plugin-func/blob/main/docs/guides/func_yaml.md) for more details.
* `pom.xml` or `build.gradle`: These are used by the other Java buildpacks to compile your function.
* Java package in folder `src/main/java/functions`: This is the default location your function will be detected. If you do choose to use another package to store your functions, you will need to [set a new search location](#TODO).

Expand Down

0 comments on commit 930671e

Please sign in to comment.