Alfresco 5.0 and DocX4J
Posted: Thu Feb 12, 2015 11:10 pm
Hello DocX4J forum,
We are working on a project were we need to generate docx documents inside Alfresco. In order to do so we use docx4j, so this dependency is added to our repo pom.xml file
However, adding this depenency results in a runtime error in Alfresco when using basic functionality (Alfresco is deployed inside the web-container tomcat)
The problem was related to the dependencies of docx4j. A newer version of the artifacts fop 1.1 and xml-graphics-commons 1.5 from the group org.apache.xmlgraphics is required and provided by docx4j, so adding the following averted the problem.
Obviously this leaves the docx4j in a somewhat far from optimal position and not suprisingly generation of new documents results in runtime exceptions...
Do you have any recommendation, experiences or solution in this matter ?
At the moment we are trying to rebuild docx4j with shaded dependencies to org.apache via the mvn plugin http://maven.apache.org/plugins/maven-s ... ation.html
Hope to hear from you
Andreas
We are working on a project were we need to generate docx documents inside Alfresco. In order to do so we use docx4j, so this dependency is added to our repo pom.xml file
- Code: Select all
<dependency>
<groupId>org.docx4j</groupId>
<artifactId>docx4j</artifactId>
<version>3.2.0</version>
</dependency>
However, adding this depenency results in a runtime error in Alfresco when using basic functionality (Alfresco is deployed inside the web-container tomcat)
The problem was related to the dependencies of docx4j. A newer version of the artifacts fop 1.1 and xml-graphics-commons 1.5 from the group org.apache.xmlgraphics is required and provided by docx4j, so adding the following averted the problem.
- Code: Select all
<dependency>
<groupId>org.docx4j</groupId>
<artifactId>docx4j</artifactId>
<version>3.2.0</version>
<exclusions>
<exclusion>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>xmlgraphics-commons</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>fop</artifactId>
</exclusion>
</exclusions>
</dependency>
Obviously this leaves the docx4j in a somewhat far from optimal position and not suprisingly generation of new documents results in runtime exceptions...
Do you have any recommendation, experiences or solution in this matter ?
At the moment we are trying to rebuild docx4j with shaded dependencies to org.apache via the mvn plugin http://maven.apache.org/plugins/maven-s ... ation.html
Hope to hear from you
Andreas