Git Product home page Git Product logo

java-function-buildpack's Introduction

java-function-buildpack

CircleCI

The Java Function Buildpack is a Cloud Native Buildpack V3 that provides the riff Java Function Invoker to functions.

This buildpack is designed to work in collaboration with other Heroku buildpacks, which are tailored to support (and know how to build / run) languages supported by Heroku.

NOTE: Java 11 is required for building your Java Function. To specific Java 11, please add a system.properties file with java.runtime.version=11 in the body of the file. Here's an example of a Java Function project.

In Plain English

When combined with the other buildpacks present in the Heroku functions builder, users can use the pack create-builder command to build a builder image to build a Java Function image via pack build.

  • The presence of a pom.xml file will result in the compilation and execution of a java function, thanks to the java invoker
  • Ambiguity in the detection process will result in a build failure

Detailed Buildpack Behavior

Detection Phase

Detection passes if:

TBD

If detection passes, the buildpack will contribute an openjdk-jre key with launch metadata to instruct the openjdk-buildpack to provide a JRE. It will also add a riff-invoker-java key and handler metadata extracted from the riff metadata.

If several languages are detected simultaneously, the detect phase errors out. The override key in riff.toml can be used to bypass detection and force the use of a particular invoker.

Build Phase

If a java build has been detected

  • Contributes the riff Java Invoker to a launch layer, set as the main java entry point with function.uri = <build-directory>?handler=<handler> set as an environment variable (FUNCTION_URI). This value is automatically set to point to the .jar file located in /workspace/target. At the moment, it is assumed only 1 .jar exits in this directory.

The function behavior is exposed via standard buildpack process types:

  • Contributes web process
  • Contributes function process

How to Build

Prerequisites

To build the java-function-buildpack you'll need

You can build the buildpack by running

make build

This will package (with pre-downloaded cache layers) the buildpack in the root directory. That can be used as a uri in a functions-builder.toml file of a builder (see https://github.com/heroku/pack-images)

License

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

java-function-buildpack's People

Contributors

elbandito avatar jabrown85 avatar jkutner avatar scothis avatar svc-scm avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

malax

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.