Add classpath index support for exploded war archives

Update the Maven and Gradle packaging for war files so that a
`classpath.idx` file is written into the archive that provides the
original order of the classpath, as was previously done for jar files.
The `WarLauncher` class will use this file when running as an exploded
archive to ensure that the classpath order is the same as when running
from the far war.

Fixes gh-19875
This commit is contained in:
Scott Frederick
2021-12-09 16:25:30 -06:00
parent 8b5600fca8
commit 8f57f0babb
14 changed files with 168 additions and 76 deletions

View File

@@ -161,6 +161,11 @@ public final class Layouts {
return "WEB-INF/classes/";
}
@Override
public String getClasspathIndexFileLocation() {
return "WEB-INF/classpath.idx";
}
@Override
public String getLayersIndexFileLocation() {
return "WEB-INF/layers.idx";