CircleCI-Public / cimg-openjdk

The CircleCI OpenJDK (Java) Docker Convenience Image.
https://circleci.com/developer/images/image/cimg/openjdk
MIT License
18 stars 25 forks source link

Determine if Maven should be pre-installed in this image #30

Closed FelicianoTech closed 4 years ago

KyleTryon commented 4 years ago

Maven was pre-installed on the predecessor image circleci/openjdk. Our Maven Orb currently relies on Maven being installed in the convenience image. There is a parallel initiative to update all certified orbs to the new cimg types. An alternative solution for the Maven Orb would be to implement a new install command for Maven, which would result in a longer build time for maven users.

Maven Orb Stats (30 days): Builds: 1376 Projects: 43 Orgs: 21

The Maven package reports to be 10MB

Summary

Potential current solutions (please add more):

  1. Include an install command for Maven orb. The user could bring their own image alternatively.
  2. Add the Maven package to the cimg/openJDK image, adding a layer and 10MB.
  3. Create an OpenJDK image variant with additional tools. This is less consistent with our other images.
  4. Build new images using OpenJDK as the base specifically for Maven and Android for example.

Maven Orb update awaiting this issue: https://github.com/CircleCI-Public/maven-orb/pull/1

FelicianoTech commented 4 years ago

This is likely a good time to consider Gradle as well. Especially if both can co-exist easily in the same image.

KyleTryon commented 4 years ago

Perhaps 3 images:

OpenJDK -> Maven + Gradle -> Android

Could be knocked down to 2 images if we include maven and gradle in the base image. It would add some weight to the image but we'd probably hopefully see better caching since all users would pull it. If we have any idea of how many users are using OpenJDK without Maven/Gradle vs how many are, that could be useful but without that I think I am leaning to include them, and then have another Android image that builds from there.

I however am not a java dev. What types of issues might we see with users wanting a different combo of the version of maven and gradle? Hopefully keeping them both at The most current is acceptable?

FelicianoTech commented 4 years ago

@KyleTryon The latest version tags for OpenJDK v11.0.x, v12.0.x, and v13.0.x have been respun to include this change.

From your solutions list above, I went with option number 2 as that worked well with our current setup, Maven and Gradle are common Java build tools, and would serve as a nice migration path from the legacy images.

I'd suggest that we also go with option 1 as well though. The orb could use an install command for when someone isn't using the default executor.