The documentation for the classpath index section of nested jars should mention the different behaviour if reproducible builds are enabled. [1]

I ran into issues with classpath order after enabling reproducible maven builds (different, outdated JAXB implementation picked up) and came across that page. Since there was no mention of reproducible builds, I suspected a bug and looked at the source code responsible for classpath.idx.

[1] https://github.com/spring-projects/spring-boot/blob/70a5dc64f6b4160ec9c20d48d84a0869ef735df8/spring-boot-project/spring-boot-docs/src/docs/antora/modules/specification/pages/executable-jar/nested-jars.adoc?plain=1#L99

Comment From: wilkinsona

Sorry, I'm not sure what you're suggesting. We already document the fact that the order in the index file matches the order that's used by the build system. What more did you want to see? I'm a little reluctant to mention specifics as there are lots of ways in which a build system's classpath ordering can be changed and we don't want to try to document them all.

Comment From: schosin

My bad, I am talking about the changes made by this commit: https://github.com/spring-projects/spring-boot/commit/40a9c4d90f9659dcc27ff931c5a50a54343ad300

It changes the order of the classpath.idx for reproducible builds to alphabetical. I'm suggesting that this should be mentioned in the documentation.

Comment From: wilkinsona

Thanks. I'd forgotten that Maven doesn't apply reproducible ordering consistently and that there's some logic in its war plugin that we had to replicate. I agree that this is worth documenting if it only applies when packaging and not to when running (spring-boot:run) or testing the application.