_Add support for installing Java and Java build tools._
Relevant package managers:
What the BuildPack would do is
$ 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
Users would have to install Java and build tools/project managers manually, e.g. using postBuild.
Java users.
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.
Somebody familiar with BuildPacks and Java, and the different Java build tools.
I might have a good reason to try this out early next year, just adding a few notes. There are options to run Java from Jupyter Notebooks, one of which should be included by default.
IJavaIJava already somehow supports Binder! https://mybinder.org/v2/gh/SpencerPark/ijava-binder/master?urlpath=lab/tree/home/jovyan/3rdPartyDependency.ipynb > https://github.com/SpencerPark/ijava-binder has a custom Dockerfile.
Pinging @SpencerPark - have you thought about adding Java support natively in repo2docker? Just want to make sure I'm not missing any big obstacles here.
The official kernel list also lists most of the above projects: https://github.com/jupyter/jupyter/wiki/Jupyter-kernels
Just wanted to upvote this idea! @nuest @SpencerPark
Do you want to give implementing this a try @melaniewalsh ?
Hi all, I'm happy to help out where I can but have little experience with Docker. Had to use docker classroom to build the dockerfile used in the ijava-binder :p The Dockerfile over there is super simple, the base layer (forgive my docker terminology) is some stable jdk which is itself based on some linux layer (I think ubuntu). So it just installs python and jupyter on top of that and runs the ijava install.
The docs look a bit different than the last time I visited but https://mybinder.readthedocs.io/en/latest/sample_repos.html#minimal-dockerfiles-for-binder contains everything I based the Docker file on.
IJava is intentionally light on the dependencies for an easy install, just jupyter (and the transitive dep, python) and a jdk. The default kernel.json picks up java from the $PATH, jshell is distributed with the jdk and the rest of the libs are packaged with the kernel so the only system dep is the jdk.
So a few naive questions:
A build pack is a class in repo2docker that does two things. 1) it has a method that when pointed at a directory can decide if this build pack should be applied and 2) a method that generates statements that should be added in the Dockerfile repo2docker generates. In more detail: https://repo2docker.readthedocs.io/en/latest/architecture.html#buildpacks
"adding it natively" means that as a user I wouldn't have to write a Dockerfile any more. Placing for example a pom.xml at the root of my repository would be enough to trigger the installation of the jdk, ijava and packages listed in the pom.xml file.
Most helpful comment
I might have a good reason to try this out early next year, just adding a few notes. There are options to run Java from Jupyter Notebooks, one of which should be included by default.
IJavaIJavaalready somehow supports Binder! https://mybinder.org/v2/gh/SpencerPark/ijava-binder/master?urlpath=lab/tree/home/jovyan/3rdPartyDependency.ipynb > https://github.com/SpencerPark/ijava-binder has a customDockerfile.Pinging @SpencerPark - have you thought about adding Java support natively in repo2docker? Just want to make sure I'm not missing any big obstacles here.