Following on from #12545 we'd like to enhance our fat jar format to support layer folders that are easier to use when writing Dockerfiles.

The following issues will need to be addressed:

  • [x] Polish loader and loader-tools to make it easier to add new features (#19766)
  • [x] Design a new fat jar format that can support layers in a logical way
    • [x] Decide what to do about the Spring-Boot-Lib attribute
    • [x] Provide a manifest attribute that points to the layers index
    • [x] Provide a manifest attribute that points to the classpath index
    • [x] Provide an implicit layer for buildpack contributions (#19771) (target after M1)
  • [x] Update the Repackager and launcher to support the new format (#19767)
  • [x] Update the Maven plugin with an option to generate the new format (#19768)
  • [x] Update the Maven plugin to allow layer customization (#20295)
  • [x] Update the Gradle plugin with an option to generate the new format (#19792)
  • [x] Update the Gradle plugin to allow layer customization (#20296)
  • [x] Add jarmode support to the loader code (#19848)
  • [x] Add layertools jarmode (#19849)
  • [x] Automatically add jarmode jars when packaging (#19865)
  • [x] Add layertools jarmode support to Maven (#19866)
  • [x] Add layertools jarmode support to Gradle (#19867)
  • [x] Provide (or generate) a Dockerfile showing how layered jars can be converted to images
  • [x] Document the new format somewhere
  • [x] Raise a java buildpack issue to ensure the new format can work with the buildpack (https://github.com/cloudfoundry/spring-boot-cnb/issues/6 and https://github.com/cloudfoundry/spring-boot-cnb/issues/9)

Comment From: philwebb

Decide what to do about the Spring-Boot-Lib attribute

Since there isn't one I've dropped it when creating a layered jar. There's a new Spring-Boot-Layers-Index attribute that points to the index file. The buildpack could use this to detect the new format.