Hello Jan,

TL;DR: I'm not adding examples on how to use the package manager to achieve a 
minimal POI version, as the components are covered in POI and the package 
manager exclusions are documented in their related sites.


sorry for postponing this nearly one month ... somehow I hoped someone else 
would jump in ...

Missed expectations:
I guess I can understand the irritation - the expectation is to the change the 
dependency version and hopefully everything works as before.
We went the way of semantic versioning and the POI rule of being able to remove 
obsolete constructs after two major releases.
So basically the major version is already a sign that things might have changed.

Missed documentation:
The dependencies are actually documented at 
https://poi.apache.org/components/index.html#components

Missed examples:
Some areas of POI are documented well at Stackoverflow and our own example areas, but 
other parts like dissecting the release to a minimal version are indeed not existing. For 
this, we would need to document examples in Ant/Ivy, Maven, Gradle to cover the usual 
package manager and build up a matrix of the usual usages like "a) only use XSSF, b) 
a + encryption, c) use HSSF, d) use XSSF/HSSF" ... and so on with the other modules 
- I think, this would be even more confusing.

Although I just recently faced a similar issues with an unknown to me reactjs/npmjs 
library/environment (... and in the end I've decided to skip that hurdle) - in the end 
you'll need that learning curve of your chosen package manager and the library you use. 
The exclusion mechanism is specific to the package manager and can be easily googled by 
e.g. "gradle exclusion".
So for my part I don't think we need detailed examples in POIs website on how 
to exclude parts of the distribution.
This would actually be counter productive for users using POI on the module-path (JPMS), 
as you wouldn't be able to launch without that dependencies if we just provide a minimal 
version as default and expect users to add modules via "--add-modules" or 
similar.

Missed patches:
If I couldn't convince you, feel free to submit a documentation patch for 
getting things in the right way.

Missed drive space:
the quote of [1] missed the first sentence "/we have a number of optional 
dependencies ... which can be easily not/included on the classpath/".
so to justify myself, given the components info (above) + google e.g. "maven 
exclusion", the drive space argument is not so questionable to me.

Missed tests:
The thing which hit me with 5.0.0 is that our tests - which ought to be on JPMS 
when executed on Java 9+ - worked with batik and when POI is used in the real 
world on the module-path it's not working at all. Hence POI 5.0.1 will change 
the module dependencies to batik to static/optional - the package manager 
dependencies will change to the submodules of batik as batik-all is referencing 
them all again. So you need to exclude batik-* - it transitive dependencies 
like xml-apis:xml-apis-ext:1.3.04 should then also be excluded without the need 
to name them explicitly.

So ... I imagine the above is not what you've expected and related only to the 
inquiry of adding package manager examples.
If you need further help don't hesitate to ping us on the user/dev list.

Andi.


[1] 
http://apache-poi.1045710.n5.nabble.com/Optional-dependencies-and-JPMS-td5736219.html

On 03.06.21 08:43, Vodolan, Jan wrote:
Hello,
Could you mentions these in docs somewhere? Something like "the minimalist example 
pom.xml" with excludes, and better explanation of what each (optional?) dependency 
doing ... and possibly links to these discussions. At least, add it to FAQ.
Docs components-map is describes these, but without info/example how to get rid 
(exclude?) of potentionally unnecessary dependencies. Unfortunatelly, it is 
unintuitive and hidden for common uses.
I personally, would prefer oposite way. To be able depend on "?-minimal" 
version... and add more dependencies if I need them (e.g.: batik).
Thanks and have a nice day,
   J.V.
PS: argument: drive space is not really an issue nowadays ... is at least 
questinable


Reply via email to