Package org.codehaus.mojo.xml
Class AbstractXmlMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- org.codehaus.mojo.xml.AbstractXmlMojo
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
- Direct Known Subclasses:
CheckFormatMojo,TransformMojo,ValidateMojo
public abstract class AbstractXmlMojo extends org.apache.maven.plugin.AbstractMojoAbstract base class for the plugins Mojo's.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAbstractXmlMojo.CatalogHandling
-
Constructor Summary
Constructors Constructor Description AbstractXmlMojo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ObjectactivateProxy()Called to install the plugins proxy settings.protected FileasAbsoluteFile(File f)Converts the given file into an file with an absolute path.protected File[]asFiles(File pDir, String[] pFileNames)Converts the given set of file names into a set ofFileinstances.protected FilegetBasedir()Returns the projects base directory.protected AbstractXmlMojo.CatalogHandlinggetCatalogHandling()protected String[]getExcludes(String[] origExcludes, boolean skipDefaultExcludes)Calculates the exclusions to use when searching files.protected String[]getFileNames(File pDir, String[] pIncludes, String[] pExcludes)Scans a directory for files and returns a set of path names.protected File[]getFiles(File pDir, String[] pIncludes, String[] pExcludes)Scans a directory for files and returns a set ofFileinstances.protected org.codehaus.plexus.resource.ResourceManagergetLocator()protected org.apache.maven.project.MavenProjectgetProject()Returns the maven project.protected ResolvergetResolver()Creates a new resolver.protected URLgetResource(String pResource)protected booleanisSkipping()protected voidpassivateProxy(Object pProperties)Called to restore the proxy settings, which have been installed when the plugin was invoked.protected voidsetCatalogs(List<File> pCatalogFiles, List<URL> pCatalogUrls)Returns the plugins catalog files.-
Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
-
-
-
Method Detail
-
getProject
protected org.apache.maven.project.MavenProject getProject()
Returns the maven project.
-
getBasedir
protected File getBasedir()
Returns the projects base directory.
-
asAbsoluteFile
protected File asAbsoluteFile(File f)
Converts the given file into an file with an absolute path.
-
setCatalogs
protected void setCatalogs(List<File> pCatalogFiles, List<URL> pCatalogUrls) throws org.apache.maven.plugin.MojoExecutionException
Returns the plugins catalog files.- Throws:
org.apache.maven.plugin.MojoExecutionException
-
getResolver
protected Resolver getResolver() throws org.apache.maven.plugin.MojoExecutionException
Creates a new resolver.- Throws:
org.apache.maven.plugin.MojoExecutionException
-
getFileNames
protected String[] getFileNames(File pDir, String[] pIncludes, String[] pExcludes) throws org.apache.maven.plugin.MojoFailureException, org.apache.maven.plugin.MojoExecutionException
Scans a directory for files and returns a set of path names.- Throws:
org.apache.maven.plugin.MojoFailureExceptionorg.apache.maven.plugin.MojoExecutionException
-
asFiles
protected File[] asFiles(File pDir, String[] pFileNames)
Converts the given set of file names into a set ofFileinstances. The file names may be relative to the given base directory.
-
getFiles
protected File[] getFiles(File pDir, String[] pIncludes, String[] pExcludes) throws org.apache.maven.plugin.MojoFailureException, org.apache.maven.plugin.MojoExecutionException
Scans a directory for files and returns a set ofFileinstances.- Throws:
org.apache.maven.plugin.MojoFailureExceptionorg.apache.maven.plugin.MojoExecutionException
-
getExcludes
protected String[] getExcludes(String[] origExcludes, boolean skipDefaultExcludes)
Calculates the exclusions to use when searching files.
-
activateProxy
protected Object activateProxy()
Called to install the plugins proxy settings.
-
passivateProxy
protected void passivateProxy(Object pProperties)
Called to restore the proxy settings, which have been installed when the plugin was invoked.
-
getResource
protected URL getResource(String pResource) throws org.apache.maven.plugin.MojoFailureException
- Throws:
org.apache.maven.plugin.MojoFailureException
-
getLocator
protected org.codehaus.plexus.resource.ResourceManager getLocator()
-
isSkipping
protected boolean isSkipping()
-
getCatalogHandling
protected AbstractXmlMojo.CatalogHandling getCatalogHandling()
-
-