git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@279355 13f79535-47bb-0310-9956-ffa450edef68
168 lines
7.1 KiB
XML
168 lines
7.1 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!--
|
|
/*
|
|
* Copyright 2001-2004 The Apache Software Foundation.
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/
|
|
-->
|
|
<faqs title="Frequently Asked Questions">
|
|
<part id="usage">
|
|
<title>Plugin Usage</title>
|
|
<faq id="how-use">
|
|
<question>How do I use the PDF Plugin ?</question>
|
|
<answer>
|
|
<p/>
|
|
<ul>
|
|
<li>First you must call the maven target <code>site</code> to generate all the xdocs files and the image ressources.</li>
|
|
<li>Then you can call the <code>pdf</code> target to generate the pdf documentation for your project.</li>
|
|
</ul>
|
|
<p>To automate the pdf creation you can add a post goal to the site like this :</p>
|
|
<source><![CDATA[
|
|
<postGoal name="site">
|
|
<attainGoal name="pdf"/>
|
|
</postGoal>
|
|
]]></source>
|
|
</answer>
|
|
</faq>
|
|
<faq id="how-use-multiproject">
|
|
<question>How do I use the PDF Plugin with a multiproject ?</question>
|
|
<answer>
|
|
<p>To generate a PDF from documentations defined in several sub-projects, you must copy all the xdocs files from these projects.</p>
|
|
<p>Here is an example on how to do it :</p>
|
|
<source><![CDATA[
|
|
<attainGoal name="multiproject:site"/>
|
|
<maven:reactor
|
|
basedir="${basedir}"
|
|
postProcessing="true"
|
|
includes="**/project.xml"
|
|
collectOnly="true"
|
|
ignoreFailures="false"
|
|
collectionVar="multiprojects"/>
|
|
<!-- We copy the generated files to use them in the pdf -->
|
|
<j:forEach var="reactorProject" items="${multiprojects}">
|
|
<j:set var="fromDir" value="${reactorProject.context.getVariable('maven.gen.docs')}"/>
|
|
<ant:copy todir="${maven.build.dir}/pdf/${maven.multiproject.aggregateDir}${reactorProject.artifactId}">
|
|
<ant:fileset dir="${fromDir}" force="true">
|
|
<ant:include name="**/*.*"/>
|
|
</ant:fileset>
|
|
</ant:copy>
|
|
</j:forEach>
|
|
<attainGoal name="pdf"/>
|
|
]]></source>
|
|
<p>You can also createa dynamic menu using Velocity macro in your navigation.xml file. For example :</p>
|
|
<source><![CDATA[
|
|
<project name="$pom.name">
|
|
<body>
|
|
<links/>
|
|
<menu name="Overview">
|
|
#if ($overviewPageCreate == "true" )
|
|
<item name="${overviewPageLinkTitle}" href="${overviewPageLink}.html"/>
|
|
#end
|
|
</menu>
|
|
<menu name="Sub-Projects">
|
|
#foreach ($reactorProject in $multiprojects)
|
|
<item name="$reactorProject.name" href="/${aggregateDir}${reactorProject.artifactId}/index.html"/>
|
|
<item name="$reactorProject.name test" href="/${aggregateDir}${reactorProject.artifactId}/test.html"/>
|
|
#end
|
|
</menu>
|
|
</body>
|
|
</project>
|
|
]]></source>
|
|
</answer>
|
|
</faq>
|
|
<faq id="how-images">
|
|
<question>Which types of images can I use in my documents ?</question>
|
|
<answer>
|
|
<p>You can use images types that <a href="http://xml.apache.org/fop/graphics.html">FOP</a> can use.</p>
|
|
<p>The table below summarizes the <em>theoretical</em> support for graphical formats within FOP.</p>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Format</th>
|
|
<th>Type</th>
|
|
<th>Support Thru</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td>
|
|
<a href="http://xml.apache.org/fop/graphics.html#bmp">BMP</a> (Microsoft Windows Bitmap)</td>
|
|
<td>bitmap</td>
|
|
<td>
|
|
<a href="http://xml.apache.org/fop/graphics.html#native">FOP native</a>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<a href="http://xml.apache.org/fop/graphics.html#eps">EPS</a> (Encapsulated PostScript)</td>
|
|
<td>metafile (both bitmap and vector), probably most frequently used for vector drawings</td>
|
|
<td>
|
|
<a href="http://xml.apache.org/fop/graphics.html#native">FOP native</a> (limited support, see restrictions below)</td>
|
|
</tr>
|
|
<tr>
|
|
<td>GIF (Graphics Interchange Format)</td>
|
|
<td>bitmap</td>
|
|
<td>
|
|
<a href="http://xml.apache.org/fop/graphics.html#native">FOP native</a>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<a href="http://xml.apache.org/fop/graphics.html#jpeg">JPEG</a> (Joint Photographic Experts Group)</td>
|
|
<td>bitmap</td>
|
|
<td>
|
|
<a href="http://xml.apache.org/fop/graphics.html#native">FOP native</a>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<a href="http://xml.apache.org/fop/graphics.html#png">PNG</a> (Portable Network Graphic)</td>
|
|
<td>bitmap</td>
|
|
<td>
|
|
<a href="http://xml.apache.org/fop/graphics.html#jimi">JIMI</a> (using the property <a href="properties.html">"maven.jar.jimi"</a>) or <a href="http://xml.apache.org/fop/graphics.html#jai">JAI</a> (using properties <a href="properties.html">"maven.jar.jaicore" and "maven.jar.jaicodec"</a>)
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<a href="http://xml.apache.org/fop/graphics.html#svg">SVG</a> (Scalable Vector Graphics)</td>
|
|
<td>vector (with embedded bitmaps)</td>
|
|
<td>
|
|
<a href="http://xml.apache.org/fop/graphics.html#batik">Batik</a>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<a href="http://xml.apache.org/fop/graphics.html#tiff">TIFF</a> (Tag Image Format File)</td>
|
|
<td>bitmap</td>
|
|
<td>
|
|
<a href="http://xml.apache.org/fop/graphics.html#native">FOP native</a> or <a href="http://xml.apache.org/fop/graphics.html#jai">JAI</a> (using properties <a href="properties.html">"maven.jar.jaicore" and "maven.jar.jaicodec"</a>), depending on the subformat. See <a href="http://xml.apache.org/fop/graphics.html#tiff">TIFF</a> for more details.(JIMI also supports TIFF, but this has not been implemented within FOP).</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</answer>
|
|
</faq>
|
|
<faq id="how-png">
|
|
<question>How can I insert png images in my pdf ?</question>
|
|
<answer>
|
|
<p>You must download and put somewhere on your disk JAI or JIMI (on your repository is a good place for it).</p>
|
|
<p>Then you must register the one you installed with for JIMI :</p>
|
|
<source>maven.jar.jimi=${maven.repo.local}/jimi/jars/jimi-X.Y.Z.jar</source>
|
|
<p>Or for JAI :</p>
|
|
<source>maven.jar.jaicore=${maven.repo.local}/jai/jars/jai_core-X.Y.Z.jar
|
|
maven.jar.jaicodec=${maven.repo.local}/jai/jars/jai_codec-X.Y.Z.jar</source>
|
|
</answer>
|
|
</faq>
|
|
</part>
|
|
</faqs>
|