Package org.apache.maven.plugins.pdf
Class PdfMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- org.apache.maven.plugins.pdf.AbstractPdfMojo
-
- org.apache.maven.plugins.pdf.PdfMojo
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled
,org.apache.maven.plugin.Mojo
,org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable
- Direct Known Subclasses:
PdfAggregateMojo
@Mojo(name="pdf", requiresDependencyResolution=TEST, threadSafe=true) public class PdfMojo extends AbstractPdfMojo implements org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable
Generates a PDF document for a project documentation usually published as web site (with maven-site-plugin).- Author:
- ltheussl
-
-
Field Summary
Fields Modifier and Type Field Description protected org.apache.maven.project.MavenProject
project
The Maven Project Object.
-
Constructor Summary
Constructors Constructor Description PdfMojo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
appendGeneratedReports(org.apache.maven.doxia.document.DocumentModel model, Locale locale)
Append generated reports to the toc only ifgenerateReports
is enabled, for instance:void
contextualize(org.codehaus.plexus.context.Context context)
void
execute()
protected File
getOutputDirectory()
protected List<org.apache.maven.reporting.exec.MavenReportExecution>
getReports()
protected File
getWorkingDirectory()
protected boolean
isIncludeReports()
protected void
prepareTempSiteDirectory(File tmpSiteDir)
Copy all site and generated-site files in the tmpSiteDirectory.-
Methods inherited from class org.apache.maven.plugins.pdf.AbstractPdfMojo
getSiteDirectoryTmp
-
-
-
-
Method Detail
-
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionException
- Specified by:
execute
in interfaceorg.apache.maven.plugin.Mojo
- Throws:
org.apache.maven.plugin.MojoExecutionException
-
contextualize
public void contextualize(org.codehaus.plexus.context.Context context) throws org.codehaus.plexus.context.ContextException
- Specified by:
contextualize
in interfaceorg.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable
- Throws:
org.codehaus.plexus.context.ContextException
-
getOutputDirectory
protected File getOutputDirectory()
- Specified by:
getOutputDirectory
in classAbstractPdfMojo
-
getWorkingDirectory
protected File getWorkingDirectory()
- Specified by:
getWorkingDirectory
in classAbstractPdfMojo
-
isIncludeReports
protected boolean isIncludeReports()
- Specified by:
isIncludeReports
in classAbstractPdfMojo
-
prepareTempSiteDirectory
protected void prepareTempSiteDirectory(File tmpSiteDir) throws IOException
Copy all site and generated-site files in the tmpSiteDirectory.
Note: ignore copying ofgenerated-site
files if they already exist in thesite
dir.- Specified by:
prepareTempSiteDirectory
in classAbstractPdfMojo
- Parameters:
tmpSiteDir
- not null- Throws:
IOException
- if any- Since:
- 1.1
-
appendGeneratedReports
protected void appendGeneratedReports(org.apache.maven.doxia.document.DocumentModel model, Locale locale)
Append generated reports to the toc only ifgenerateReports
is enabled, for instance:<item name="Project Reports" ref="project-info"> <item name="Project License" ref="license" /> <item name="Project Team" ref="team-list" /> <item name="Continuous Integration" ref="integration" /> ... </item>
- Parameters:
model
- not nulllocale
- not null- Since:
- 1.1
- See Also:
generateMavenReports(Locale)
-
getReports
protected List<org.apache.maven.reporting.exec.MavenReportExecution> getReports() throws org.apache.maven.plugin.MojoExecutionException
- Throws:
org.apache.maven.plugin.MojoExecutionException
-
-