Commit 70e14eda authored by Andy Wilkinson's avatar Andy Wilkinson

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
parent 8286cbc9
......@@ -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>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment