Adding the following exclusions should make your war smaller:
<exclusion>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>batik-all</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.santuario</groupId>
<artifactId>xmlsec</artifactId>
</exclusion>
<exclusion>
<groupId>org.bouncycastle</groupId>
<artifactId>*</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.pdfbox</groupId>
<artifactId>pdfbox</artifactId>
</exclusion>
Apache Batik is only required to render WMF/EMF images.
Apache XML Security for Java and Bouncy Castle are only required to sign or
validate signed Office documents.
PDFBox is only required to render to PDF documents. The required jars can
be downloaded from:
Core XLSX generation should work fine without them.
Yegor
On Thu, May 20, 2021 at 7:27 PM Steve Lopez <[email protected]>
wrote:
> Upgrading from v4.1 to 5.0 has resulted in an additional 24MB of
> dependencies. This adds significant bulk to our war file and difficult to
> believe it is correct.
>
> it looks like the majority of this bloat is from from batik. Is there a
> build or version that allows removing all of this without jeopardizing core
> XLSX generation?
>
> This is the pom being used (Old v4)
>
> <groupId>org.apache.poi</groupId>
> <artifactId>poi</artifactId>
> <version>4.1.2</version>
> </dependency>
> <dependency>
> <groupId>org.apache.poi</groupId>
> <artifactId>poi-ooxml</artifactId>
> <version>4.1.2</version>
> <exclusions>
> <exclusion>
> <groupId>xml-apis</groupId>
> <artifactId>xml-apis</artifactId>
> </exclusion>
> </exclusions>
> </dependency>
>
> And upgrading to 5 (resulting in addl 24MB of jars!)
>
> <groupId>org.apache.poi</groupId>
> <artifactId>poi</artifactId>
> <version>5.0.0</version>
> </dependency>
> <dependency>
> <groupId>org.apache.poi</groupId>
> <artifactId>poi-ooxml</artifactId>
> <version>5.0.0</version>
> <exclusions>
> <exclusion>
> <groupId>xml-apis</groupId>
> <artifactId>xml-apis</artifactId>
> </exclusion>
> </exclusions>
> </dependency>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>