public abstract class AbstractXmlMojo
extends org.apache.maven.plugin.AbstractMojo
Modifier and Type | Class and Description |
---|---|
static class |
AbstractXmlMojo.CatalogHandling |
Modifier and Type | Field and Description |
---|---|
private java.io.File |
basedir
The base directory, relative to which directory names are interpreted.
|
private AbstractXmlMojo.CatalogHandling |
catalogHandling
How to handle entities which cannot be found in any catalog.
|
private java.lang.String[] |
catalogs
An XML catalog file, or URL, which is being used to resolve entities.
|
private org.codehaus.plexus.resource.ResourceManager |
locator
Plexus resource manager used to obtain XSL.
|
private boolean |
locatorInitialized |
private org.apache.maven.project.MavenProject |
project
The Maven Project.
|
private org.apache.maven.settings.Settings |
settings
The Maven Settings.
|
private boolean |
skip
Whether to skip execution.
|
Constructor and Description |
---|
AbstractXmlMojo() |
Modifier and Type | Method and Description |
---|---|
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. |
(package private) void |
checkCatalogHandling() |
protected java.io.File |
getBasedir()
Returns the projects base directory.
|
protected AbstractXmlMojo.CatalogHandling |
getCatalogHandling() |
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.codehaus.plexus.resource.ResourceManager |
getLocator() |
protected org.apache.maven.project.MavenProject |
getProject()
Returns the maven project.
|
protected Resolver |
getResolver()
Creates a new resolver.
|
protected java.net.URL |
getResource(java.lang.String pResource) |
private boolean |
isEmpty(java.lang.String value) |
protected boolean |
isSkipping() |
protected void |
passivateProxy(java.lang.Object pProperties)
Called to restore the proxy settings, which have been installed when the plugin was invoked.
|
protected void |
setCatalogs(java.util.List<java.io.File> pCatalogFiles,
java.util.List<java.net.URL> pCatalogUrls)
Returns the plugins catalog files.
|
private void |
setProperty(java.util.List<java.lang.String> pProperties,
java.lang.String pKey,
java.lang.String pValue) |
getLog, getPluginContext, setLog, setPluginContext
@Parameter(defaultValue="${project}", required=true, readonly=true) private org.apache.maven.project.MavenProject project
@Parameter(defaultValue="${settings}", required=true, readonly=true) private org.apache.maven.settings.Settings settings
@Parameter(defaultValue="${project.basedir}", required=true, readonly=true) private java.io.File basedir
@Parameter(property="xml.skip", defaultValue="false") private boolean skip
@Parameter private java.lang.String[] catalogs
@Parameter(property="xml.catalogHandling", defaultValue="passThrough") private AbstractXmlMojo.CatalogHandling catalogHandling
@Component private org.codehaus.plexus.resource.ResourceManager locator
private boolean locatorInitialized
protected org.apache.maven.project.MavenProject getProject()
protected java.io.File getBasedir()
protected java.io.File asAbsoluteFile(java.io.File f)
protected void setCatalogs(java.util.List<java.io.File> pCatalogFiles, java.util.List<java.net.URL> pCatalogUrls) throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
protected Resolver getResolver() throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
protected java.lang.String[] getFileNames(java.io.File pDir, java.lang.String[] pIncludes, java.lang.String[] pExcludes) throws org.apache.maven.plugin.MojoFailureException, org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoExecutionException
protected java.io.File[] asFiles(java.io.File pDir, java.lang.String[] pFileNames)
File
instances. The file names may be relative to the
given base directory.protected java.io.File[] getFiles(java.io.File pDir, java.lang.String[] pIncludes, java.lang.String[] pExcludes) throws org.apache.maven.plugin.MojoFailureException, org.apache.maven.plugin.MojoExecutionException
File
instances.org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoExecutionException
protected java.lang.String[] getExcludes(java.lang.String[] origExcludes, boolean skipDefaultExcludes)
private boolean isEmpty(java.lang.String value)
private void setProperty(java.util.List<java.lang.String> pProperties, java.lang.String pKey, java.lang.String pValue)
protected java.lang.Object activateProxy()
protected void passivateProxy(java.lang.Object pProperties)
protected java.net.URL getResource(java.lang.String pResource) throws org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoFailureException
protected org.codehaus.plexus.resource.ResourceManager getLocator()
protected boolean isSkipping()
void checkCatalogHandling() throws org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoFailureException
protected AbstractXmlMojo.CatalogHandling getCatalogHandling()