Work around incorrect layout of generated epub archive

Previously, the Docbook Maven plugin would generate an epub archive
with the majority of contents in OEBPS/, including content.opf, while
the META-INF/container.xml file reference to content.opf in the root
of the archive.

This commit overrides the epub.oebps.dir variable to move the content
into the root of the archive where it's expected to be. Implementing
this override highlighted that our customization stylesheet was not
being applied as the configuration property was incorrect (it was
epubCustomnization rather than the required epub3Customization). This
has been corrected along with a problem with missing images that
fixing it revealed.

Closes gh-11470
pull/11486/head
Andy Wilkinson 7 years ago
parent 8286cbc9f3
commit 70e14edaf7

@ -1261,8 +1261,15 @@
</goals>
<phase>prepare-package</phase>
<configuration>
<epubCustomization>${basedir}/src/main/docbook/xsl/epub.xsl</epubCustomization>
<epub3Customization>${basedir}/src/main/docbook/xsl/epub.xsl</epub3Customization>
<targetDirectory>${basedir}/target/docbook/epub</targetDirectory>
<preProcess>
<copy todir="${basedir}/target/docbook/epub/images">
<fileset dir="${basedir}/src/main/docbook/images">
<include name="*.png" />
</fileset>
</copy>
</preProcess>
<postProcess>
<copy todir="${basedir}/target/contents/reference/epub">
<fileset dir="${basedir}/target/docbook">

@ -27,5 +27,6 @@ under the License.
<xsl:import href="urn:docbkx:stylesheet"/>
<xsl:import href="common.xsl"/>
<xsl:variable name="epub.oebps.dir" select="'./'"/>
</xsl:stylesheet>

Loading…
Cancel
Save