问题
I tried to add jasper reports library (net.sf.jasperreports:jasperreports:5.2.0) as a maven dependency to my project , unfortunately one of it's dependencies com.lowagie:itext:2.1.7.js2 is a little bit untypical and cannot be located in maven central. I've found, however, that it's available at http://jasperreports.sourceforge.net/maven2/com/lowagie/itext/ .
My questions are:
What is the purpose of jaspersoft custom-build of iText? Patches?
Is it safe to use regular iText library, version 2.1.7 found in maven central repo?
回答1:
Since the iText license changed from MPL/LGPL Jasper Report couldn't upgrade. So according to the LGPL they supplied a jar file with their changes.
You may ask what changes are:
- they added a pom.xml (not relevant in your case)
- they did a minor change to the ant.properties for their own version numbering (not relevant in your case)
- patched the
PdfGraphics2D.javafile (fixed a transparency bug)
The change is about the currentFillGState, Lines 1089, 1490, 1616-1628.
What this means for you is difficult to tell but you have the following possibilities:
- exchange the patched.jar with the default and run (extensive) tests
- add the patched.jar to your repository
- add the public jasper report repo to your repo (http://jasperreports.sourceforge.net/maven2)
- and as others pointed out ask jr folks for further details, e.g. here would be a start: http://community.jaspersoft.com/jasperreports-library/issues/2594-0
来源:https://stackoverflow.com/questions/17743418/custom-built-itext-version-required-by-jasperreports-library