Class 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 Detail

      • project

        @Parameter(defaultValue="${project}",
                   readonly=true,
                   required=true)
        protected org.apache.maven.project.MavenProject project
        The Maven Project Object.
    • Constructor Detail

      • PdfMojo

        public PdfMojo()
    • Method Detail

      • execute

        public void execute()
                     throws org.apache.maven.plugin.MojoExecutionException
        Specified by:
        execute in interface org.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 interface org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable
        Throws:
        org.codehaus.plexus.context.ContextException
      • prepareTempSiteDirectory

        protected void prepareTempSiteDirectory​(File tmpSiteDir)
                                         throws IOException
        Copy all site and generated-site files in the tmpSiteDirectory.
        Note: ignore copying of generated-site files if they already exist in the site dir.
        Specified by:
        prepareTempSiteDirectory in class AbstractPdfMojo
        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 if generateReports 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 null
        locale - 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