enhancement
major
minor
defect
minor
#26484
In-app template for grid and tables: Function "Verifier for use as list item" does not get component model
#26885
Constraints on declarative forms with arguments from a container reference lead to errors for new elements
#26922
With generated subject classes, a default provider of an attribute in a non-structure class does not get a create context
defect
Depending on the size of the generated WAR and the machine on which the build is running, the WAR generation process appears to allocate a disproportionate amount of memory—significantly more than the size of the generated output.
Among other things, the maven-archiver plugin is used for WAR generation, which in turn uses the plexus-archiver plugin.
It has been reported (https://stackoverflow.com/questions/54406918/maven-war-plugin-version-cause-oom) that plexus-archiver, starting with version 2.9.1, has issues with excessive memory consumption. Although these issues are reportedly fixed (https://issues.apache.org/jira/browse/MSOURCES-94), they can still be observed:
Caused by: java.lang.OutOfMemoryError: Java heap space
at org.codehaus.plexus.archiver.zip.ByteArrayOutputStream.needNewBuffer (ByteArrayOutputStream.java:153)
at org.codehaus.plexus.archiver.zip.ByteArrayOutputStream.write (ByteArrayOutputStream.java:192)
at org.apache.commons.io.output.ThresholdingOutputStream.write (ThresholdingOutputStream.java:232)
at org.codehaus.plexus.archiver.zip.DeferredScatterOutputStream.writeOut (DeferredScatterOutputStream.java:44)
at org.apache.commons.compress.archivers.zip.StreamCompressor$ScatterGatherBackingStoreCompressor.writeOut (StreamCompressor.java:291)
at org.apache.commons.compress.archivers.zip.StreamCompressor.writeCounted (StreamCompressor.java:273)
at org.apache.commons.compress.archivers.zip.StreamCompressor.deflate (StreamCompressor.java:264)
at org.apache.commons.compress.archivers.zip.StreamCompressor.deflateUntilInputIsNeeded (StreamCompressor.java:257)
at org.apache.commons.compress.archivers.zip.StreamCompressor.writeDeflated (StreamCompressor.java:238)
at org.apache.commons.compress.archivers.zip.StreamCompressor.write (StreamCompressor.java:205)
at org.apache.commons.compress.archivers.zip.StreamCompressor.deflate (StreamCompressor.java:184)
at org.apache.commons.compress.archivers.zip.ScatterZipOutputStream.addArchiveEntry (ScatterZipOutputStream.java:100)
at org.apache.commons.compress.archivers.zip.ParallelScatterZipCreator$4.call (ParallelScatterZipCreator.java:237)
at org.apache.commons.compress.archivers.zip.ParallelScatterZipCreator$4.call (ParallelScatterZipCreator.java:233)
at java.util.concurrent.FutureTask.run (FutureTask.java:264)
at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1128)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:628)
at java.lang.Thread.run (Thread.java:829)
Solution
Downgrade to maven-archiver 3.0.0 and plexus-archiver 2.9.1.
Test
- Build a large WAR (150M) using a VM with a maximum memory limit of 256M. Depending on the machine, even a much larger memory allocation of 1G may not be sufficient to build the WAR.