Re: 4.1 -> 5.0 results in enormous increase in dependencies and WAR file size
Steve Lopez <[email protected]>
| Newsgroups | gmane.comp.jakarta.poi.user |
|---|---|
| Message-ID | <pony-41ee83fdb4e2868627efbafa799e1c03256d3c3a-12ab354a144aec0d263493b55854f6c3971d0ee8@user.poi.apache.org> |
Thank you for the quick reply. unfortunately I get the following error after adjusting the pom Caused by: java.lang.NoClassDefFoundError: Could not initialize class org.apache.poi.xssf.model.SharedStringsTable My updated pom has the following for POI (and war file increased about 6MB compared with POI 4.1.2) <dependency> <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> <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> </exclusions> </dependency> On 2021/05/21 12:30:01, Yegor Kozlov <[email protected]> wrote: > 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] > > > > >