org.apache.maven.plugins.site
Class EffectiveSiteMojo

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by org.apache.maven.plugins.site.AbstractSiteMojo
          extended by org.apache.maven.plugins.site.AbstractSiteRenderingMojo
              extended by org.apache.maven.plugins.site.EffectiveSiteMojo
All Implemented Interfaces:
ContextEnabled, Mojo, org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable

@Mojo(name="effective-site",
      requiresReports=true)
public class EffectiveSiteMojo
extends AbstractSiteRenderingMojo

Displays the effective site descriptor as an XML for this build, after inheritance and interpolation of site.xml.

Since:
2.2
Version:
$Id: EffectiveSiteMojo.html 861484 2013-05-09 23:10:16Z hboutemy $
Author:
Hervé Boutemy

Field Summary
protected  File output
          Optional parameter to write the output of this help in a given file, instead of writing to the console.
 
Fields inherited from class org.apache.maven.plugins.site.AbstractSiteRenderingMojo
generatedSiteDirectory, mavenSession, reports, siteRenderer
 
Fields inherited from class org.apache.maven.plugins.site.AbstractSiteMojo
i18n, locales, localRepository, project, reactorProjects, siteDirectory, siteTool
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
EffectiveSiteMojo()
           
 
Method Summary
 void execute()
          
protected static void writeComment(XMLWriter writer, String comment)
          Write comments in a normalize way.
protected static void writeHeader(XMLWriter writer)
          Write comments in the Effective POM/settings header.
protected static void writeXmlFile(File output, String content)
           
 
Methods inherited from class org.apache.maven.plugins.site.AbstractSiteRenderingMojo
categoriseReports, contextualize, createSiteRenderingContext, getReports, locateDocuments, locateReports, populateReportItems
 
Methods inherited from class org.apache.maven.plugins.site.AbstractSiteMojo
getInputEncoding, getMavenVersion, getOutputEncoding, isMaven3OrMore
 
Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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 Detail

EffectiveSiteMojo

public EffectiveSiteMojo()
Method Detail

execute

public void execute()
             throws MojoExecutionException,
                    MojoFailureException

Throws:
MojoExecutionException
MojoFailureException

writeHeader

protected static void writeHeader(XMLWriter writer)
Write comments in the Effective POM/settings header.

Parameters:
writer - not null

writeComment

protected static void writeComment(XMLWriter writer,
                                   String comment)
Write comments in a normalize way.

Parameters:
writer - not null
comment - not null

writeXmlFile

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


Copyright © 2002-2013 The Apache Software Foundation. All Rights Reserved.