Closed gian1200 closed 3 weeks ago
Is there any reason why you are building with ghcr.io/graalvm/graalvm-community:21-ol7
specifically instead of Mandrel (you need Mandrel 23.1.5.0 - see the compatibility matrix for the exact version)?
Also, you can remove the following dependencies as they are resolved transitively:
<!-- https://mvnrepository.com/artifact/org.apache.poi/poi-ooxml -->
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>5.3.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.poi/poi-ooxml-lite -->
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml-lite</artifactId>
<version>5.3.0</version>
</dependency>
Is there any reason why you are building with
ghcr.io/graalvm/graalvm-community:21-ol7
specifically instead of Mandrel (you need Mandrel 23.1.5.0 - see the compatibility matrix for the exact version)?
Good question. Last time I check I wasn't able to use Mandrel in our pipeline, because we needed to use root permissions for a command (the image I found didn't allow it). Maybe it was a different kind of image (first time I see that matrix), or maybe I tried a non oficial image. Will give it a try tomorrow. I'll try to find an equivalent for my ghcr.io/graalvm/graalvm-community:21-ol7
.
Thanks!
Also, you can remove the following dependencies as they are resolved transitively:
Although it's true, quarkus-poi
doesn't always updates as fast as poi do releases (e.g. quarkus-poi
2.0.6 depends on poi 5.2.5, not 5.3.0 😄 ).
As a workaround, it worked by changing ghcr.io/graalvm/graalvm-community:21-ol7
with ghcr.io/graalvm/native-image-community:21-ol7
.
Regarding the Mandrel image. The one I found is quay.io/quarkus/ubi-quarkus-mandrel-builder-image:23.1-jdk-21
. Just to confirm, is this the correct source? By default, it seems to have many things disabled (or limited), which seems to be reasonable from a security point of view, but breaks my current pipeline. A quick look to the manifest, make me believe that I should create a Dockerfile to do the compilation (but is something specific to my context, not related to quarkus-poi
)
Given that I managed to solve the main issue with a workaround, I'm ok with closing the issue. I'll just wait the confirmation regarding the image source.
Although it's true,
quarkus-poi
doesn't always updates as fast as poi do releases (e.g.quarkus-poi
2.0.6 depends on poi 5.2.5, not 5.3.0 😄 ).
You must use the same version quarkus-poi
is using, otherwise your native compilation will fail.
Regarding the Mandrel image. The one I found is
quay.io/quarkus/ubi-quarkus-mandrel-builder-image:23.1-jdk-21
. Just to confirm, is this the correct source?
Yes, that's correct.
Glad you sorted that out. Closing 👍🏻
Thanks for your answer!
You must use the same version
quarkus-poi
is using, otherwise your native compilation will fail.
Is it really a MUST, or a recommendation? https://github.com/quarkiverse/quarkus-poi/pull/111 doesn't seem to update anything custom, just pom.xml
. Also, have been working fine so far.
I also noticed that quarkus-poi
depends on poi-ooxml-full
(my use case only needs poi-ooxml-lite
). From my little understanding on the matter, it will mean a bigger (unnecessary) compilation output. Am I correct?
If that's the case, is there a way to make quarkus-poi
use poi-ooxml-lite
? Can this be a new requirement, or is a limitation? My guess would be to manually exclude dependencies on my side (pom.xml
) and keep my dependencies (I just wonder about the "must" part).
It depends on how you are packaging? Native mode already goes through and only includes classes in use. I would think the only way it would matter is Fast Jar or UberJar as far as size goes.
from ChatGPT:
The difference between poi-ooxml-full and poi-ooxml-lite mainly lies in the breadth of functionality and dependencies included for working with Microsoft Office Open XML (OOXML) formats in Apache POI:
poi-ooxml-full: This version includes the full set of features and dependencies required to work with OOXML files. It bundles all the required third-party libraries, making it easier for users who need the complete functionality (e.g., advanced formatting, formula evaluation, and handling complex OOXML elements). However, this full version is larger in size due to these extra dependencies.
poi-ooxml-lite: This is a lighter version with a reduced feature set, omitting some of the larger dependencies used in poi-ooxml-full. It’s suitable for applications with basic needs for reading and writing OOXML files without the more advanced or resource-heavy features. This version is ideal for those who want to minimize library size and only need core functionalities.
In general, if your project requires advanced Excel, Word, or PowerPoint features, poi-ooxml-full is a better choice. But if your needs are basic and you want a smaller dependency footprint, poi-ooxml-lite might suffice.
I don't think we want to limit users feature set in an extension?
Native mode already goes through and only includes classes in use
True, unless reflection is involved. I though that quarkus-poi
had some "hardcoded" configuration to make poi
work. If that is not the case, then you are absolutely correct.
Ultimately I believe it'd be best for me if I do some testing and comparison before doing any kind of optimization.
Thanks for taking your time to answer!
Even though another component fails, posting here because the only change was updating this package.
When updating from Quarkus-poi
2.0.6
to2.1.0
or2.1.1
, the following error appears.3.15.1
ghcr.io/graalvm/graalvm-community:21-ol7
Error
Pom.xml fragment:
Additional info
I checked the changelogs and the only thing that might be the cause is https://github.com/quarkiverse/quarkus-poi/pull/110. However, I'm not sure.