Page 1 of 1
Minimum list of supporting JARs needed
Posted:
Fri Jul 24, 2009 5:26 pm
by jbeltran
Hi all,
Is there a list of JARs that are needed to support docx4j? I'd like to keep my application's classpath relatively small so I was wondering if there was a list of the minimum amount of jars needed to support basic docx4j functionality.
Thanks!
Justin
Re: Minimum list of supporting JARs needed
Posted:
Tue Jul 28, 2009 3:05 pm
by jason
I will try to post a list of how the jars are in the next couple of days (when i next get a connection); it may help you to work out which you can omit for your application.
Re: Minimum list of supporting JARs needed
Posted:
Tue Jul 28, 2009 7:11 pm
by jbeltran
Below are the JARs I needed to add to for my own personal project using docx4j
docx4j-nightly-20090528.jar
log4j-1.2.13.jar
jaxb-api.jar
jaxb-impl.jar
dom4j-1.6.1.jar
parent-pointer-plugin-1.0.jar
activation-1.1.jar
stax-api-1.0-2.jar
xalan-patched-2.7.0.jar
commons-vfs-patched-1.9.1.jar
Please let me know if I should add or remove jars. I copied the actual jars from the maven-enabled docx4j source.
Justin
Re: Minimum list of supporting JARs needed
Posted:
Mon Aug 03, 2009 10:53 am
by jason
- Code: Select all
JAXB: as from r.862, at runtime docx4j can use either the JAXB implementation included in Java 6, or the 2.x reference implementation.
(If you are using the 1.5 JRE, you will need the JAXB 2.x reference implementation)
At build time, both must be on the class path.
org/jvnet/jaxb2_commons/ppp/parent-pointer-plugin/1.0/parent-pointer-plugin-1.0.jar (TODO: add this small source code to our source tree,
so the jar is not required? Still need it to generated classes with XJC - unless we take it out
altogether, in which case applications such as docx4all would need their own private build)
log4j/log4j/1.2.13/log4j-1.2.13.jar
xml-apis/xml-apis/1.3.03/xml-apis-1.3.03.jar
Fonts & one option for PDF output: com/lowagie/itext-unsigned/2.0.8/itext-unsigned-2.0.8.jar
Fonts & another option for PDF output: FOP .. see below under "Patched & Required"
(Following may be removed, with loss of corresponding functionality)
Load/save via WebDAV:
org/apache/commons/commons-vfs-patched/1.9.1/commons-vfs-patched-1.9.1.jar
jdom/jdom/1.0/jdom-1.0.jar <!-- for commons-vfs -->
Load/save via JCR:
javax/jcr/jcr/1.0/jcr-1.0.jar
Image processing:
org/apache/xmlgraphics/xmlgraphics-commons/1.3.757686/xmlgraphics-commons-1.3.757686.jar
(Support (conversion) of certain image types requires ImageMagick)
binary .doc to docx conversion; OLE:
org/apache/poi/hwpf/3.4.0/hwpf-3.4.0.jar
For OLE: commons-codec/commons-codec/1.3/commons-codec-1.3.jar
Patched & Required:
docx4j/fop-patched/0.95.756434/fop-patched-0.95.756434.jar
FOP (iirc) requires:
org/apache/avalon/framework/avalon-framework-api/4.3.1/avalon-framework-api-4.3.1.jar
org/apache/avalon/framework/avalon-framework-impl/4.3.1/avalon-framework-impl-4.3.1.jar
commons-io/commons-io/1.3.1/commons-io-1.3.1.jar
commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar
Patched FOP is currently required. It can be made optional once org.docx4j.fonts package
is modified.
Patched & Optional:
XSLT: xalan/xalan-patched/2.7.0/xalan-patched-2.7.0.jar
We use a patched version, as a workaround for http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6396599
in the thing which Sun ships. Just remove META-INF/services from the xalan jar to prevent xalan
being picked up as the default provider for jaxp transform.
(this doesn't affect docx4j, but may otherwise affect eg Swing applications
which use it); also, some classes not required by docx4j are removed.
Optional:
pdf-renderer/pdf-renderer/0.2009.0324/pdf-renderer-0.2009.0324.jar (displays a PDF without the need for
Acrobat Reader; useful for working with PDF output code; required to build & run sample)
Dependencies to be removed:
dom4j/dom4j/1.6.1/dom4j-1.6.1.jar
OLD PDF output (ie via XHTML):
xhtmlrenderer/minium/0.1/minium-0.1.jar
xhtmlrenderer/core-renderer/R8pre2/core-renderer-R8pre2.jar
src/diffx (required to build src/main/java):
commons-lang/commons-lang/2.4/commons-lang-2.4.jar
(com/topologi/diffx/0.61/diffx-0.61.jar is NOT required, since this code is now in src/diffx)
src/test/java only
junit/junit/4.4/junit-4.4.jar