org.apache.myfaces.buildtools.maven2.plugin.builder.unpack
Class AbstractDependencyMojo

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by org.apache.myfaces.buildtools.maven2.plugin.builder.unpack.AbstractDependencyMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
Direct Known Subclasses:
AbstractFromConfigurationMojo

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

Version:
$Id: AbstractDependencyMojo.java 552528 2007-07-02 16:12:47Z markh $
Author:
Brian Fox

Field Summary
protected  org.codehaus.plexus.archiver.manager.ArchiverManager archiverManager
          To look up Archiver/UnArchiver implementations
protected  org.apache.maven.artifact.resolver.ArtifactCollector artifactCollector
          Artifact collector, needed to resolve dependencies.
protected  org.apache.maven.artifact.metadata.ArtifactMetadataSource artifactMetadataSource
           
protected  org.apache.maven.artifact.factory.ArtifactFactory factory
          Used to look up Artifacts in the remote repository.
protected  org.apache.maven.artifact.repository.ArtifactRepository local
          Location of the local repository.
protected  boolean outputAbsoluteArtifactFilename
          Output absolute filename for resolved artifacts
protected  org.apache.maven.project.MavenProject project
          POM
protected  List reactorProjects
          Contains the full list of projects in the reactor.
protected  List remoteRepos
          List of Remote Repositories used by the resolver
protected  org.apache.maven.artifact.resolver.ArtifactResolver resolver
          Used to look up Artifacts in the remote repository.
 boolean silent
          If the plugin should be silent.
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
AbstractDependencyMojo()
           
 
Method Summary
protected  void copyFile(File artifact, File destFile)
          Does the actual copy of the file and logging.
 org.codehaus.plexus.archiver.manager.ArchiverManager getArchiverManager()
           
 org.apache.maven.artifact.resolver.ArtifactCollector getArtifactCollector()
           
 org.apache.maven.artifact.metadata.ArtifactMetadataSource getArtifactMetadataSource()
           
 org.apache.maven.artifact.factory.ArtifactFactory getFactory()
           
 org.apache.maven.artifact.repository.ArtifactRepository getLocal()
           
 org.apache.maven.plugin.logging.Log getLog()
           
 org.apache.maven.project.MavenProject getProject()
           
 List getRemoteRepos()
           
 org.apache.maven.artifact.resolver.ArtifactResolver getResolver()
           
 void setArchiverManager(org.codehaus.plexus.archiver.manager.ArchiverManager archiverManager)
           
 void setArtifactCollector(org.apache.maven.artifact.resolver.ArtifactCollector theArtifactCollector)
           
 void setArtifactMetadataSource(org.apache.maven.artifact.metadata.ArtifactMetadataSource theArtifactMetadataSource)
           
 void setFactory(org.apache.maven.artifact.factory.ArtifactFactory factory)
           
 void setLocal(org.apache.maven.artifact.repository.ArtifactRepository local)
           
 void setRemoteRepos(List remoteRepos)
           
 void setResolver(org.apache.maven.artifact.resolver.ArtifactResolver resolver)
           
protected  void unpack(File file, File location)
           
protected  void unpack(File file, File location, String includes, String excludes)
          Unpacks the archive file.
 
Methods inherited from class org.apache.maven.plugin.AbstractMojo
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
 

Field Detail

factory

protected org.apache.maven.artifact.factory.ArtifactFactory factory
Used to look up Artifacts in the remote repository.


resolver

protected org.apache.maven.artifact.resolver.ArtifactResolver resolver
Used to look up Artifacts in the remote repository.


artifactCollector

protected org.apache.maven.artifact.resolver.ArtifactCollector artifactCollector
Artifact collector, needed to resolve dependencies.


artifactMetadataSource

protected org.apache.maven.artifact.metadata.ArtifactMetadataSource artifactMetadataSource

local

protected org.apache.maven.artifact.repository.ArtifactRepository local
Location of the local repository.


remoteRepos

protected List remoteRepos
List of Remote Repositories used by the resolver


archiverManager

protected org.codehaus.plexus.archiver.manager.ArchiverManager archiverManager
To look up Archiver/UnArchiver implementations


project

protected org.apache.maven.project.MavenProject project
POM


reactorProjects

protected List reactorProjects
Contains the full list of projects in the reactor.


silent

public boolean silent
If the plugin should be silent.

Since:
2.0

outputAbsoluteArtifactFilename

protected boolean outputAbsoluteArtifactFilename
Output absolute filename for resolved artifacts

Since:
2.0
Constructor Detail

AbstractDependencyMojo

public AbstractDependencyMojo()
Method Detail

getLog

public org.apache.maven.plugin.logging.Log getLog()
Specified by:
getLog in interface org.apache.maven.plugin.Mojo
Overrides:
getLog in class org.apache.maven.plugin.AbstractMojo
Returns:
Returns the log.

getArchiverManager

public org.codehaus.plexus.archiver.manager.ArchiverManager getArchiverManager()
Returns:
Returns the archiverManager.

copyFile

protected void copyFile(File artifact,
                        File destFile)
                 throws org.apache.maven.plugin.MojoExecutionException
Does the actual copy of the file and logging.

Parameters:
artifact - represents the file to copy.
destFile - file name of destination file.
Throws:
org.apache.maven.plugin.MojoExecutionException - with a message if an error occurs.

unpack

protected void unpack(File file,
                      File location)
               throws org.apache.maven.plugin.MojoExecutionException
Throws:
org.apache.maven.plugin.MojoExecutionException

unpack

protected void unpack(File file,
                      File location,
                      String includes,
                      String excludes)
               throws org.apache.maven.plugin.MojoExecutionException
Unpacks the archive file.

Parameters:
file - File to be unpacked.
location - Location where to put the unpacked files.
includes - Comma separated list of file patterns to include i.e. **\/*.xml, **\/*.properties
excludes - Comma separated list of file patterns to exclude i.e. **\/*.xml, **\/*.properties
Throws:
org.apache.maven.plugin.MojoExecutionException

getFactory

public org.apache.maven.artifact.factory.ArtifactFactory getFactory()
Returns:
Returns the factory.

setFactory

public void setFactory(org.apache.maven.artifact.factory.ArtifactFactory factory)
Parameters:
factory - The factory to set.

getProject

public org.apache.maven.project.MavenProject getProject()
Returns:
Returns the project.

getLocal

public org.apache.maven.artifact.repository.ArtifactRepository getLocal()
Returns:
Returns the local.

setLocal

public void setLocal(org.apache.maven.artifact.repository.ArtifactRepository local)
Parameters:
local - The local to set.

getRemoteRepos

public List getRemoteRepos()
Returns:
Returns the remoteRepos.

setRemoteRepos

public void setRemoteRepos(List remoteRepos)
Parameters:
remoteRepos - The remoteRepos to set.

getResolver

public org.apache.maven.artifact.resolver.ArtifactResolver getResolver()
Returns:
Returns the resolver.

setResolver

public void setResolver(org.apache.maven.artifact.resolver.ArtifactResolver resolver)
Parameters:
resolver - The resolver to set.

setArchiverManager

public void setArchiverManager(org.codehaus.plexus.archiver.manager.ArchiverManager archiverManager)
Parameters:
archiverManager - The archiverManager to set.

getArtifactCollector

public org.apache.maven.artifact.resolver.ArtifactCollector getArtifactCollector()
Returns:
Returns the artifactCollector.

setArtifactCollector

public void setArtifactCollector(org.apache.maven.artifact.resolver.ArtifactCollector theArtifactCollector)
Parameters:
theArtifactCollector - The artifactCollector to set.

getArtifactMetadataSource

public org.apache.maven.artifact.metadata.ArtifactMetadataSource getArtifactMetadataSource()
Returns:
Returns the artifactMetadataSource.

setArtifactMetadataSource

public void setArtifactMetadataSource(org.apache.maven.artifact.metadata.ArtifactMetadataSource theArtifactMetadataSource)
Parameters:
theArtifactMetadataSource - The artifactMetadataSource to set.


Copyright © 2001-2011 The Apache Software Foundation. All Rights Reserved.