Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Module / Split Package Issue with pdf-xml #185

Closed
ctolkmit opened this issue May 2, 2019 · 5 comments · Fixed by #187
Closed

Module / Split Package Issue with pdf-xml #185

ctolkmit opened this issue May 2, 2019 · 5 comments · Fixed by #187

Comments

@ctolkmit
Copy link

ctolkmit commented May 2, 2019

Both the JAR pdf-xml and openpdf contain a package com.lowagie.text.pdf and com.lowagie.text.xml
This is not allowed in a modular/jigsaw context, unless you use the strongly discouraged patching mechanisms.

@ctolkmit
Copy link
Author

ctolkmit commented May 3, 2019

You could in theory merge all jars that contain the same package into one. (I think, there is the same issue
Then you would only have a single module (Sadly, you cannot have multiple Modules in a single JAR) and thus only a single module name.

There are other occurrences of the same problem in the project, as I see:

I use the following command to find the packages used by each jar/module and inspect the (not too long result) manually:

find */src/main/java -type f -name "*.java" -exec dirname {} \; | sed -E -e 's,^([^/]*).*main/java/,\1 - ,' | uniq | sort -k 2 | uniq |  sed -e 's,/,.,g'

The following packages are split:

  • com.lowagie.text.html both in openpdf and pdf-html
  • com.lowagie.text.pdf both in openpdf and pdf-xml
  • com.lowagie.text.xml both in openpdf and pdf-xml

So, the easiest would probably be to combine openpdf, pdf-html, pdf-xml into a single artifact if you do not want to break external API

@andreasrosdal
Copy link
Contributor

andreasrosdal commented May 3, 2019

@daviddurand @rtfarte @asturio @albfernandez What do you think of this?
OpenPDF should still be API compatible with old iText versions.

@andreasrosdal
Copy link
Contributor

There is a proposal to fix this here: #187

andreasrosdal added a commit that referenced this issue May 6, 2019
Merge pdf-html and pdf-xml into the openpdf module. #185
@andreasrosdal
Copy link
Contributor

@ctolkmit Can you please verify that this is working as you expect now?

@ctolkmit
Copy link
Author

ctolkmit commented May 6, 2019

@andreasrosdal With openpdf-1.2.17-SNAPSHOT built from the current master, everything is fine in my build/runtime now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants