Author: vsiveton
Date: Tue Sep 1 13:02:58 2009
New Revision: 810012
URL: http://svn.apache.org/viewvc?rev=810012&view=rev
Log:
MPDF-30: Add a parameter to include or not the TOC
o added includeTOC parameter
Modified:
maven/plugins/trunk/maven-pdf-plugin/src/main/java/org/apache/maven/plugins/pdf/PdfMojo.java
Modified:
maven/plugins/trunk/maven-pdf-plugin/src/main/java/org/apache/maven/plugins/pdf/PdfMojo.java
URL:
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-pdf-plugin/src/main/java/org/apache/maven/plugins/pdf/PdfMojo.java?rev=810012&r1=810011&r2=810012&view=diff
==============================================================================
---
maven/plugins/trunk/maven-pdf-plugin/src/main/java/org/apache/maven/plugins/pdf/PdfMojo.java
(original)
+++
maven/plugins/trunk/maven-pdf-plugin/src/main/java/org/apache/maven/plugins/pdf/PdfMojo.java
Tue Sep 1 13:02:58 2009
@@ -319,14 +319,23 @@
/**
* If <code>true</false>, generate all Maven reports defined in
<code>${project.reporting}</code> and append
- * them as a new entry in the Table Of Contents.
- * <b>Note</b>: Including the report generation could fail the PDF
generation.
+ * them as a new entry in the TOC (Table Of Contents).
+ * <b>Note</b>: Including the report generation could fail the PDF
generation or increase the build time.
*
* @parameter expression="${includeReports}" default-value="true"
* @since 1.1
*/
private boolean includeReports;
+ /**
+ * If <code>true</false>, generate a TOC (Table Of Content) for all items
defined in the <toc/> element from
+ * the document descriptor.
+ *
+ * @parameter expression="${includeTOC}" default-value="true"
+ * @since 1.1
+ */
+ private boolean includeTOC;
+
// ----------------------------------------------------------------------
// Instance fields
// ----------------------------------------------------------------------
@@ -518,6 +527,7 @@
context.put( "FileUtils", new FileUtils() );
context.put( "StringUtils", new StringUtils() );
context.put( "i18n", i18n );
+ context.put( "includeTOC", Boolean.valueOf( includeTOC ) );
try
{