Bug 65183 - Dependency on batik-all causes JPMS errors with OOXML artifact
Summary: Dependency on batik-all causes JPMS errors with OOXML artifact
Status: RESOLVED FIXED
Alias: None
Product: POI
Classification: Unclassified
Component: XWPF (show other bugs)
Version: 5.0.x-dev
Hardware: PC Mac OS X 10.1
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-03-13 15:31 UTC by marius
Modified: 2021-04-27 05:44 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description marius 2021-03-13 15:31:47 UTC
Using a build of the 5.+ OOXML artifact in an application built with the Gradle modularity plugin, build-time errors report "error: the unnamed module reads package org.apache.batik.transcoder from both batik.transcoder and batik.all
"

Batik-all is a strange artifact. It's POM declares dependencies on all the sub-JARs, but its JAR has all of the sub-jars repackaged. This results in two JARs with the package "org.apache.batik.transcoder". And since Batik doesn't do any module naming, a conflict occurs.

I think the right answer here is to change the POI OOXML POM to use more specific Batik dependencies, not batik-all. The Ant build already specifies all of the individual JARs and doesn't use batik-all, so it likely doesn't exhibit this behavior.
Comment 1 marius 2021-03-13 15:33:14 UTC
Fix at https://github.com/apache/poi/pull/230

Just checking for all tests to run.
Comment 2 marius 2021-03-13 15:45:57 UTC
Additional user reports in https://issues.apache.org/jira/browse/BATIK-1299
Comment 3 marius 2021-03-14 18:52:19 UTC
Fixed in r1887642
Comment 4 Mark Woon 2021-04-27 00:04:53 UTC
Any chance of a release to get this out sooner rather than later?  This has become a showstopper in one of my projects.
Comment 5 Andreas Beeker 2021-04-27 05:44:31 UTC
If you're using JPMS, you might want to have a look into [1] and fixBatik.
Regarding the release, I'm ok with releasing it soon - have you test drived the nightly?


[1] https://svn.apache.org/viewvc/poi/trunk/poi-ooxml/build.gradle?view=markup