org.codehaus.mojo.xml
Class AbstractXmlMojo

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by org.codehaus.mojo.xml.AbstractXmlMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
Direct Known Subclasses:
TransformMojo, ValidateMojo

public abstract class AbstractXmlMojo
extends org.apache.maven.plugin.AbstractMojo

Abstract base class for the plugins Mojo's.


Field Summary
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
AbstractXmlMojo()
           
 
Method Summary
protected  java.lang.Object activateProxy()
          Called to install the plugins proxy settings.
protected  java.io.File asAbsoluteFile(java.io.File f)
          Converts the given file into an file with an absolute path.
protected  java.io.File[] asFiles(java.io.File pDir, java.lang.String[] pFileNames)
          Converts the given set of file names into a set of File instances.
protected  java.io.File getBasedir()
          Returns the projects base directory.
protected  java.io.File[] getCatalogs()
          Returns the plugins catalog files.
protected  java.lang.String[] getExcludes(java.lang.String[] origExcludes, boolean skipDefaultExcludes)
          Calculates the exclusions to use when searching files.
protected  java.lang.String[] getFileNames(java.io.File pDir, java.lang.String[] pIncludes, java.lang.String[] pExcludes)
          Scans a directory for files and returns a set of path names.
protected  java.io.File[] getFiles(java.io.File pDir, java.lang.String[] pIncludes, java.lang.String[] pExcludes)
          Scans a directory for files and returns a set of File instances.
protected  org.apache.maven.project.MavenProject getProject()
          Returns the maven project.
protected  Resolver getResolver()
          Creates a new resolver.
protected  void passivateProxy(java.lang.Object pProperties)
          Called to restore the proxy settings, which have been installed when the plugin was invoked.
 
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
 
Methods inherited from interface org.apache.maven.plugin.Mojo
execute
 

Constructor Detail

AbstractXmlMojo

public AbstractXmlMojo()
Method Detail

getProject

protected org.apache.maven.project.MavenProject getProject()
Returns the maven project.


getBasedir

protected java.io.File getBasedir()
Returns the projects base directory.


asAbsoluteFile

protected java.io.File asAbsoluteFile(java.io.File f)
Converts the given file into an file with an absolute path.


getCatalogs

protected java.io.File[] getCatalogs()
Returns the plugins catalog files.


getResolver

protected Resolver getResolver()
                        throws org.apache.maven.plugin.MojoExecutionException
Creates a new resolver.

Throws:
org.apache.maven.plugin.MojoExecutionException

getFileNames

protected java.lang.String[] getFileNames(java.io.File pDir,
                                          java.lang.String[] pIncludes,
                                          java.lang.String[] pExcludes)
                                   throws org.apache.maven.plugin.MojoFailureException
Scans a directory for files and returns a set of path names.

Throws:
org.apache.maven.plugin.MojoFailureException

asFiles

protected java.io.File[] asFiles(java.io.File pDir,
                                 java.lang.String[] pFileNames)
Converts the given set of file names into a set of File instances. The file names may be relative to the given base directory.


getFiles

protected java.io.File[] getFiles(java.io.File pDir,
                                  java.lang.String[] pIncludes,
                                  java.lang.String[] pExcludes)
                           throws org.apache.maven.plugin.MojoFailureException
Scans a directory for files and returns a set of File instances.

Throws:
org.apache.maven.plugin.MojoFailureException

getExcludes

protected java.lang.String[] getExcludes(java.lang.String[] origExcludes,
                                         boolean skipDefaultExcludes)
Calculates the exclusions to use when searching files.


activateProxy

protected java.lang.Object activateProxy()
Called to install the plugins proxy settings.


passivateProxy

protected void passivateProxy(java.lang.Object pProperties)
Called to restore the proxy settings, which have been installed when the plugin was invoked.



Copyright © 2006-2010 The Apache Software Foundation. All Rights Reserved.