Page 1 of 1

Building docx4j

PostPosted: Fri May 24, 2013 12:00 am
by benpoole
Hi there

I seem to recall that there was some issue in the past with building via Maven when it came to xhtmlrenderer. Can't for the life of me remember what it was / how to fix it, but having cloned docx4j from Github I am now unable to build it. Normally I would issue this command from the docx4j directory: "mvn install -Dmaven.test.skip=true"

… however, the build fails reporting the following:

[ERROR] Failed to execute goal on project docx4j: Could not resolve dependencies for project org.docx4j:docx4j:jar:3.0.0-SNAPSHOT: Could not find artifact org.docx4j:xhtmlrenderer:jar:1.0.1-SNAPSHOT in EclipseLink Repo (http://www.eclipse.org/downloads/downlo ... maven.repo) -> [Help 1]

I changed the pom to reference 1.0.0 instead (I don't think 1.0.1 is released anywhere is it?) but same problem. I've even put the snapshot 1.0.0 jar for xhtmlrenderer in ~/.m2/repository to no avail.

Apologies if I'm missing something obvious...

Re: Building docx4j

PostPosted: Fri May 24, 2013 12:52 am
by jason
Please see http://search.maven.org/#artifactdetail ... .0.0%7Cjar

Per the above, 1.0.0 should work; its in the central repo.

Re: Building docx4j

PostPosted: Tue Aug 06, 2013 11:34 am
by Siilk
Sorry for reanimating the thread, but I have troubles building the latest version of docx4j. I got the sources from https://github.com/plutext/docx4j and followed the instructions but when I am trying to build the sources, the build keeps failing the tests because of the following exception "javax.xml.bind.JAXBException: Provider org.eclipse.persistence.jaxb.JAXBContextFactory not found" and multiple null pointer exceptions, caused by it(here's the full build log: http://pastebin.com/aBEBaDrB). Do I miss a dependency here?

Re: Building docx4j

PostPosted: Tue Aug 06, 2013 4:34 pm
by jason
Try:

mvn install -DskipTests

docx4j can use either the JAXB reference implementation, or MOXy.

Looks like your install is trying to use MOXy (org.eclipse.persistence) for some reason....

The intent is that to use MOXy, you enable profile moxy by running mvn -Pmoxy

Looks like you might have done that accidentally, which has the effect of copying some files into the source tree.

You could try getting rid of them by running ant JAXB-switch-from-MOXy-to-Oracle

Re: Building docx4j

PostPosted: Wed Aug 07, 2013 4:20 pm
by Siilk
Thanks, jason, I'll give that a try.