Class EffectiveSiteMojo

java.lang.Object
org.apache.maven.plugin.AbstractMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

@Mojo(name="effective-site", requiresReports=true) public class EffectiveSiteMojo extends AbstractSiteDescriptorMojo
Displays the effective site descriptor as an XML for this build, after inheritance and interpolation of site.xml, for the first locale.
Since:
2.2
  • Field Details

    • output

      @Parameter(property="output") protected File output
      Optional parameter to write the output of this help in a given file, instead of writing to the console.

      Note: Could be a relative path.

  • Constructor Details

    • EffectiveSiteMojo

      public EffectiveSiteMojo()
  • Method Details

    • execute

      public void execute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
      Throws:
      org.apache.maven.plugin.MojoExecutionException
      org.apache.maven.plugin.MojoFailureException
    • writeHeader

      protected static void writeHeader(org.codehaus.plexus.util.xml.XMLWriter writer)
      Write comments in the Effective POM/settings header.
      Parameters:
      writer - not null
    • writeComment

      protected static void writeComment(org.codehaus.plexus.util.xml.XMLWriter writer, String comment)
      Write comments in a normalize way.
      Parameters:
      writer - not null
      comment - not null
    • writeEffectiveSite

      private void writeEffectiveSite(org.apache.maven.doxia.site.SiteModel siteModel, org.codehaus.plexus.util.xml.XMLWriter writer) throws org.apache.maven.plugin.MojoExecutionException
      Throws:
      org.apache.maven.plugin.MojoExecutionException
    • writeXmlFile

      protected static void writeXmlFile(File output, String content) throws IOException
      Throws:
      IOException