I've been trying to integrate docx4j with a custom JIRA plugin and I'm having a hell of a time. The first approach was to add:
<dependency>
<groupId>org.docx4j</groupId>
<artifactId>docx4j</artifactId>
<version>3.3.2</version>
</dependency>
to the pom.xml
file. The plugin built fine, but deployed (through the UPM) in a disabled state and gave a warning about missing functionality. I checked the logs and the base error seemed to be:
Caused by: org.osgi.framework.BundleException: Unresolved constraint in bundle <project_bundle> [233]: Unable to resolve 233.0: missing requirement [233.0] osgi.wiring.package; (osgi.wiring.package=com.google.appengine.api.images)
at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:3974)
at org.apache.felix.framework.Felix.startBundle(Felix.java:2037)
at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:955)
at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:942)
at com.atlassian.plugin.osgi.factory.OsgiPlugin.enableInternal(OsgiPlugin.java:400)
That led down a rabbit hole of adding exclusions to Import-Package
in the instructions
portion of the pom.xml
to fix the unresolved constraints. I eventually got to the end of that and then also changed the dependency to:
<dependency>
<groupId>org.docx4j</groupId>
<artifactId>docx4j</artifactId>
<version>3.3.2</version>
<exclusions>
<exclusion>
<artifactId>*</artifactId>
<groupId>*</groupId>
</exclusion>
</exclusions>
</dependency>
This led to the plugin successfully deploying, but being unable to use actually use docx4j in the code without it erroring out. And that's kind of where I am now.
My question is, does anyone have experience integrating docx4j with a JIRA plugin or know how to troubleshoot these problems?
I'm using docx4j version 3.3.2 and JIRA 7.1.7.