elharo opened a new pull request, #640:
URL: https://github.com/apache/maven-war-plugin/pull/640

   Fixes #526
   
   Add a new `compressLibs` parameter (default: `true`) to the 
maven-war-plugin. When set to `false`, dependency library JARs in 
`WEB-INF/lib/` are stored in the WAR archive using STORED mode (no compression) 
instead of DEFLATED mode.
   
   **Why:** JAR files are already compressed internally. Re-compressing them 
when adding to a WAR provides negligible size reduction but adds CPU overhead 
during both WAR creation and servlet container startup (the JARs must be 
decompressed before they can be loaded). Storing them in STORED mode eliminates 
this redundant compression.
   
   **Implementation:** Creates an `UncompressedLibsWarArchiver` subclass of 
`WarArchiver` that overrides `zipFile()` to temporarily disable compression for 
entries under `WEB-INF/lib/`, while all other entries (classes, resources, 
web.xml, etc.) continue to be compressed normally.
   
   **Usage:**
   ```xml
   <configuration>
     <compressLibs>false</compressLibs>
   </configuration>
   ```
   
   **Changes:**
   - `AbstractWarMojo.java`: Added `compressLibs` parameter with getter
   - `WarMojo.java`: Added `UncompressedLibsWarArchiver` inner class; 
`getWarArchiver()` returns it when `compressLibs=false`
   - Integration test `MWAR-446` verifying JARs are STORED and other entries 
are DEFLATED


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to