Page 1 of 1

Dependencies Question

PostPosted: Tue Jun 21, 2016 6:41 am
by roytmana@gmail.com
Hi,

There are many dependencies and all of them are brought over to my projects because they all are compile time dependencies.
I wonder if it has to be so. For example I do not need PDF and this FOP and all it brings with it (avalon, probably Xalan , etc). IS it can FOP and maybe some other dependencies be marked as optional in your project. or maybe project popularized a bit with a leaner core less dependencies core and add on modules?

Thank you,
alex

Re: Dependencies Question

PostPosted: Tue Jun 21, 2016 10:50 am
by jason
What version of docx4j are you using?

In 3.3.0, FOP is not a dependency (it has moved to an "add on module": docx4j-export-FO)

Here are the 3.3.0 deps:

Code: Select all

>mvn dependency:tree

[INFO] +- org.plutext:jaxb-svg11:jar:1.0.2:compile

[INFO] +- net.engio:mbassador:jar:1.2.4.2:compile

[INFO] +- org.slf4j:slf4j-api:jar:1.7.21:compile
[INFO] +- org.slf4j:jcl-over-slf4j:jar:1.7.21:compile
[INFO] +- org.slf4j:slf4j-log4j12:jar:1.7.21:compile
[INFO] +- log4j:log4j:jar:1.2.17:compile

[INFO] +- org.apache.commons:commons-lang3:jar:3.4:compile
[INFO] +- commons-codec:commons-codec:jar:1.10:compile
[INFO] +- commons-io:commons-io:jar:2.4:compile

[INFO] +- org.apache.httpcomponents:httpclient:jar:4.5.2:compile
[INFO] |  +- org.apache.httpcomponents:httpcore:jar:4.4.4:compile
[INFO] |  \- commons-logging:commons-logging:jar:1.2:compile

[INFO] +- com.fasterxml.jackson.core:jackson-core:jar:2.7.3:compile
[INFO] +- com.fasterxml.jackson.core:jackson-databind:jar:2.7.3:compile
[INFO] |  \- com.fasterxml.jackson.core:jackson-annotations:jar:2.7.0:compile

[INFO] +- org.apache.xmlgraphics:xmlgraphics-commons:jar:2.1:compile

[INFO] +- org.apache.avalon.framework:avalon-framework-api:jar:4.3.1:compile
[INFO] +- org.apache.avalon.framework:avalon-framework-impl:jar:4.3.1:compile

[INFO] +- xalan:xalan:jar:2.7.2:compile
[INFO] |  \- xalan:serializer:jar:2.7.2:compile

[INFO] +- net.arnx:wmf2svg:jar:0.9.8:compile

[INFO] +- org.antlr:antlr-runtime:jar:3.5.2:compile
[INFO] +- org.antlr:stringtemplate:jar:3.2.1:compile
[INFO] |  \- antlr:antlr:jar:2.7.7:compile

[INFO] +- com.google.guava:guava:jar:19.0:compile

[INFO] +- com.thedeanda:lorem:jar:2.0:compile


Re: Dependencies Question

PostPosted: Tue Jun 21, 2016 12:37 pm
by roytmana@gmail.com
yes sorry I made a mistake with FOP but are Avalon, Xalan, HttpClient and slf4j implementations mandatory?
I guess I am trying to have minimum dependencies (and potential conflicts because we are using Antlr (touchy to version), guava, jackson etc as well) given that I only interested in content control binding

thanks again for your help!

Bidnigs work great with MS Word 2013 unfortunately my client stuck on 2010 so no repeat sections and I am afraid they would not approve use of add on-s and without them it looks like it is not easy to author documents because of the extra xml for repeats ...

Re: Dependencies Question

PostPosted: Fri Jun 24, 2016 4:32 pm
by jason
You don't need the slf4j implementations

HttpClient is only used to call the Plutext PDF Converter (which is also used ToC page number updating, if you use that)

Antlr is used in content control data binding, and iirc, is at the most recent versions we could use without changing our code.

guava is used only lightly, and you can probably use a different version

jackson is used only in ToC page number updating

roytmana@gmail.com wrote:Bidnigs work great with MS Word 2013 unfortunately my client stuck on 2010 so no repeat sections and I am afraid they would not approve use of add on-s and without them it looks like it is not easy to author documents because of the extra xml for repeats ...


The easiest way to author is definitely to use one of the addons.

Alternatively, you could have them write magic strings on the document surface, then programmatically convert those to suitable content controls.