Hi, I tried to migrate one of my projects from 2.3.0.M1 to 2.3.0.M4 and see a regression in layertools extract.

This is an output of M1:

root@ebf1fd3c66fa:/build# ls extracted-app/
application  dependencies  resources  snapshot-dependencies

With the corresponding dockerfile line:

RUN cd extracted-app && java -Djarmode=layertools -jar ../target/application.jar extract

This is an output of M4:

root@216b922bff08:/build# ls extracted-app/
application  dependencies  spring-boot-loader

with exact same dockerfile.

I can't see any changes in documentation except pom.xml usage:

<configuration>
    <layout>LAYERED_JAR</layout>
</configuration>

to

<configuration>
    <layers>
        <enabled>true</enabled>
    </layers>
</configuration>

https://docs.spring.io/spring-boot/docs/2.3.0.M4/maven-plugin/reference/html/#repackage-layers documentation also doesn't mention anything.

Comment From: philwebb

We have combined the application and resource layers in this release (see #20562). If you have no SNAPSHOT jars then the output for M4 is as I would expect. Can you expand a bit more on the problem you're having?

Comment From: sanyarnd

I am referring to this part from M4 docs: изображение

If it was updated, then it'd be good to update docs as well as https://spring.io/blog/2020/01/27/creating-docker-images-with-spring-boot-2-3-0-m1

By the way, I observe the same text in snapshot documentation too: https://docs.spring.io/spring-boot/docs/2.3.0.BUILD-SNAPSHOT/maven-plugin/html/#repackage-layers

Comment From: scottfrederick

If it was updated, then it'd be good to update docs as well as https://spring.io/blog/2020/01/27/creating-docker-images-with-spring-boot-2-3-0-m1

That's a blog post, not documentation. As such, it is fixed at 2.3.0.M1 instead of being versioned to match each build as official documentation is. There's an issue (#20870) that covers updating the blog post to mention changes in subsequent versions.

By the way, I observe the same text in snapshot documentation too: https://docs.spring.io/spring-boot/docs/2.3.0.BUILD-SNAPSHOT/maven-plugin/html/#repackage-layers

That's an old documentation link for the Maven plugin. The correct link is https://docs.spring.io/spring-boot/docs/2.3.0.BUILD-SNAPSHOT/maven-plugin/reference/html/#repackage-layers (/reference was added to the path). There are probably some links to the old path hanging around. The latest docs snapshots at the new path are correct.

Documentation for the Dockerfile is in the main reference docs, not in the plugin docs . There is another issue for updating the Dockerfile example to match the new layers (#21020).

Apologies for any confusion around these docs as we've iterated over the feature set. I'll mark this issue as duplicate since I think we have other issues to address the things you've run into.