Skip to content

Add support for Java #780

Open
Open
@nuest

Description

@nuest

Proposed change

Add support for installing Java and Java build tools.

Relevant package managers:

  • Maven triggered by pom.xml
  • Ant triggered by build.xml
  • Gradle triggered by gradle.build

What the BuildPack would do is

  • install Java (anything speaking against always installing the JDK?), matching the version configured in the configuration file
    • Java 8, 11, 12, and 13 are available from default sources, which seems enough options
$ docker run --rm -it buildpack-deps:bionic apt-get update && apt-cache search openjdk | grep Kit
[..]                                                  
Fetched 17.1 MB in 15s (1115 kB/s)                                                                                                            
Reading package lists... Done
default-jdk - Standard Java or Java compatible Development Kit
default-jdk-doc - Standard Java or Java compatible Development Kit (documentation)
default-jdk-headless - Standard Java or Java compatible Development Kit (headless)
openjdk-11-doc - OpenJDK Development Kit (JDK) documentation
openjdk-11-jdk - OpenJDK Development Kit (JDK)
openjdk-11-jdk-headless - OpenJDK Development Kit (JDK) (headless)
openjdk-11-source - OpenJDK Development Kit (JDK) source files
openjdk-12-doc - OpenJDK Development Kit (JDK) documentation
openjdk-12-jdk - OpenJDK Development Kit (JDK)
openjdk-12-jdk-headless - OpenJDK Development Kit (JDK) (headless)
openjdk-12-source - OpenJDK Development Kit (JDK) source files
openjdk-13-doc - OpenJDK Development Kit (JDK) documentation
openjdk-13-jdk - OpenJDK Development Kit (JDK)
openjdk-13-jdk-headless - OpenJDK Development Kit (JDK) (headless)
openjdk-13-source - OpenJDK Development Kit (JDK) source files
openjdk-8-doc - OpenJDK Development Kit (JDK) documentation
openjdk-8-jdk - OpenJDK Development Kit (JDK)
openjdk-8-jdk-headless - OpenJDK Development Kit (JDK) (headless)
openjdk-8-source - OpenJDK Development Kit (JDK) source files
  • install the build tool
  • run the build tool (Is there a need or a good way to define the used options?)

Alternative options

Users would have to install Java and build tools/project managers manually, e.g. using postBuild.

Who would use this feature?

Java users.

How much effort will adding it take?

Depending on how many build tools are supported (could of course be added later) I guess 2 days of work. A good part of that would be to create different project configurations for tests.

Who can do this work?

Somebody familiar with BuildPacks and Java, and the different Java build tools.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions