CircleCI Ideas

Provide Multi-Version Java Docker Convenience Images

A multi-version Java Docker Convenience Image would be very helpful.

If you e. g. want to build a multi-release JAR, you need to do some cross-compilation,
as in compile 80% of the project with JDK 8 so that it is compatible with JDK 8 at runtime
and compile the JDK 9 specific parts with JDK 9, stuffing them in a multi-release JAR that
then can work properly on both JDK 8 and JDK 9 with having JDK 9 specific stuff that is simply ignored for JDK 8.

It would require much CircleCI specific work to be done in the build to use workflows to do the JDK 9
specific part in one image and move the result via workspace to the remaining tasks that can be done
with the JDK 8 image. It would be much easier, more convenient and used as is at the developer
box if there would be an image with both versions installed.

Of course I can either install the missing JDK or build a custom docker container with both Java version installed,
but I think this could be a quite common requirement, so it might be feasible to also provide a pre-configured
convenience image that contains multiple Java versions.

  • Avatar32.5fb70cce7410889e661286fd7f1897de Guest
  • Mar 17 2018
  • Taking votes
  • Attach files