org.kathrynhuxtable.maven.plugins.htmlfiltersite
Class MergeMojo

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by org.kathrynhuxtable.maven.plugins.htmlfiltersite.MergeMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

public class MergeMojo
extends org.apache.maven.plugin.AbstractMojo

Goal runs Velocity on the files in the specified directory.


Field Summary
protected  org.apache.maven.artifact.repository.ArtifactRepository localRepository
          The local repository.
protected  org.apache.maven.project.MavenProject project
          The maven project.
protected  List<?> reactorProjects
          The reactor projects.
protected  List<?> repositories
          Remote repositories used for the project.
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
MergeMojo()
           
 
Method Summary
 void execute()
           
protected  String getInputEncoding()
          Gets the input files encoding.
protected  String getOutputEncoding()
          Gets the effective reporting output files encoding.
 org.apache.maven.project.MavenProject getProject()
          Maven project.
protected  List<org.jdom.Element> getXPathList(org.jdom.Document document, String path)
          Extract a list matching an XPath path.
 void setFilePattern(String filePattern)
          Set the file pattern.
 void setI18n(org.codehaus.plexus.i18n.I18N i18n)
          Set the Plexus internationalization object.
 void setInputEncoding(String inputEncoding)
          Set the input encoding.
 void setLocalRepository(org.apache.maven.artifact.repository.ArtifactRepository localRepository)
          Set the local repository.
 void setOutputEncoding(String outputEncoding)
          Set the output encoding.
 void setProject(org.apache.maven.project.MavenProject project)
          Set the project.
 void setReactorProjects(List<?> reactorProjects)
          Set the reactor projects.
 void setRepositories(List<?> repositories)
          Set the repositories.
 void setSiteDirectory(File siteDirectory)
          Set the site directory.
 void setSiteTool(org.apache.maven.doxia.tools.SiteTool siteTool)
          Set the site tool object.
 void setSourceDirectory(File sourceDirectory)
          Set the source directory.
 void setTargetDirectory(File targetDirectory)
          Set the target directory.
 void setTemplateFile(File templateFile)
          Set the template file.
 
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

repositories

protected List<?> repositories
Remote repositories used for the project.


localRepository

protected org.apache.maven.artifact.repository.ArtifactRepository localRepository
The local repository.


project

protected org.apache.maven.project.MavenProject project
The maven project.


reactorProjects

protected List<?> reactorProjects
The reactor projects.

Constructor Detail

MergeMojo

public MergeMojo()
Method Detail

getProject

public org.apache.maven.project.MavenProject getProject()
Maven project.

Returns:
the project

setProject

public void setProject(org.apache.maven.project.MavenProject project)
Set the project.

Parameters:
project - the project to set

getInputEncoding

protected String getInputEncoding()
Gets the input files encoding.

Returns:
The input files encoding, never null.

setInputEncoding

public void setInputEncoding(String inputEncoding)
Set the input encoding.

Parameters:
inputEncoding - the inputEncoding to set

setOutputEncoding

public void setOutputEncoding(String outputEncoding)
Set the output encoding.

Parameters:
outputEncoding - the outputEncoding to set

getOutputEncoding

protected String getOutputEncoding()
Gets the effective reporting output files encoding.

Returns:
The effective reporting output file encoding, never null.

setRepositories

public void setRepositories(List<?> repositories)
Set the repositories.

Parameters:
repositories - the repositories to set

setLocalRepository

public void setLocalRepository(org.apache.maven.artifact.repository.ArtifactRepository localRepository)
Set the local repository.

Parameters:
localRepository - the localRepository to set

setFilePattern

public void setFilePattern(String filePattern)
Set the file pattern.

Parameters:
filePattern - the filePattern to set

setSiteDirectory

public void setSiteDirectory(File siteDirectory)
Set the site directory.

Parameters:
siteDirectory - the siteDirectory to set

setSourceDirectory

public void setSourceDirectory(File sourceDirectory)
Set the source directory.

Parameters:
sourceDirectory - the sourceDirectory to set

setTargetDirectory

public void setTargetDirectory(File targetDirectory)
Set the target directory.

Parameters:
targetDirectory - the targetDirectory to set

setTemplateFile

public void setTemplateFile(File templateFile)
Set the template file.

Parameters:
templateFile - the templateFile to set

setI18n

public void setI18n(org.codehaus.plexus.i18n.I18N i18n)
Set the Plexus internationalization object.

Parameters:
i18n - the i18n to set

setReactorProjects

public void setReactorProjects(List<?> reactorProjects)
Set the reactor projects.

Parameters:
reactorProjects - the reactorProjects to set

setSiteTool

public void setSiteTool(org.apache.maven.doxia.tools.SiteTool siteTool)
Set the site tool object.

Parameters:
siteTool - the siteTool to set

execute

public void execute()
             throws org.apache.maven.plugin.MojoExecutionException
Throws:
org.apache.maven.plugin.MojoExecutionException
See Also:
Mojo.execute()

getXPathList

protected List<org.jdom.Element> getXPathList(org.jdom.Document document,
                                              String path)
Extract a list matching an XPath path. This surreptitiously adds the XHTML namespace.

Parameters:
document - the document.
path - the path to select.
Returns:
the list of elements matching the path.


Copyright © 2010 kathrynhuxtable.org. All Rights Reserved.