mirror of
https://github.com/spring-projects/spring-boot.git
synced 2026-10-10 19:39:01 +00:00
Polish "Support provided-scope libraries when extracting an executable war"
Make the extracted war runnable with java -jar: move root content such as static files and JSPs to META-INF/resources/, name the application jar *.jar, and write the META-INF/ directory entry before the manifest. Fail early when a library and a provided library share a file name, as both would be extracted to the same location. Assert the Spring-Boot-Lib-Provided attribute in the Maven and Gradle tests and document war extraction. See gh-51372
This commit is contained in:
+4
@@ -33,6 +33,10 @@ $ java -jar my-app/my-app.jar
|
||||
|
||||
After startup, you should not expect any differences in execution time between running an executable jar and running an extracted jar.
|
||||
|
||||
NOTE: An executable war can be extracted in the same way.
|
||||
The result is a jar, for example `my-app/my-app.jar`, that is meant to be run with `java -jar`.
|
||||
Content from the root of the war, such as static files and JSPs from `src/main/webapp`, is moved to `META-INF/resources/` in the extracted jar.
|
||||
|
||||
TIP: Run `java -Djarmode=tools -jar my-app.jar help extract` to see all possible options.
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user