org.apache.maven.plugin.assembly
Class AbstractAssemblyMojo

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by org.apache.maven.plugin.assembly.AbstractUnpackingMojo
          extended by org.apache.maven.plugin.assembly.AbstractAssemblyMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
Direct Known Subclasses:
AbstractDirectoryMojo, AssemblyMojo, AttachedAssemblyMojo

public abstract class AbstractAssemblyMojo
extends AbstractUnpackingMojo

Version:
$Id: AbstractAssemblyMojo.java 392475 2006-04-08 02:46:26Z jvanzyl $
Author:
Brett Porter, Vincent Siveton

Field Summary
protected  boolean appendAssemblyId
          Set to false to exclude the assembly id from the assembly final name.
protected  java.io.File descriptor
          Deprecated. Please use descriptors instead
protected  java.lang.String descriptorId
          Deprecated. Please use descriptorRefs instead
protected  java.util.List filters
           
 
Fields inherited from class org.apache.maven.plugin.assembly.AbstractUnpackingMojo
archiverManager, artifactResolver, classifier, EMPTY_STRING_ARRAY, finalName, localRepository, outputDirectory, project, projectModulesOnly, reactorProjects, workDirectory
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
AbstractAssemblyMojo()
           
 
Method Summary
protected  java.io.File createArchive(org.codehaus.plexus.archiver.Archiver archiver, org.apache.maven.plugins.assembly.model.Assembly assembly, java.lang.String filename)
           
 void execute()
          Create the binary distribution.
protected  java.lang.String getDistributionName(org.apache.maven.plugins.assembly.model.Assembly assembly)
          Get the full name of the distribution artifact
protected  void processDependencySets(org.codehaus.plexus.archiver.Archiver archiver, java.util.List dependencySets, boolean includeBaseDirectory)
          Processes Dependency Sets
protected  void processFileList(org.codehaus.plexus.archiver.Archiver archiver, java.util.List fileList, boolean includeBaseDirecetory)
          Copy files to the distribution with option to change destination name
protected  void processFileSets(org.codehaus.plexus.archiver.Archiver archiver, java.util.List fileSets, boolean includeBaseDirecetory)
          Process Files that will be included in the distribution.
protected  java.util.List readAssemblies()
           
 
Methods inherited from class org.apache.maven.plugin.assembly.AbstractUnpackingMojo
getClassifier, getDependencies, getExecutedProject, getModules, unpack
 
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

descriptorId

protected java.lang.String descriptorId
Deprecated. Please use descriptorRefs instead
Predefined Assembly Descriptor Id's. You can select bin, jar-with-dependencies, or src.


descriptor

protected java.io.File descriptor
Deprecated. Please use descriptors instead
Assembly XML Descriptor file. This must be the path to your customized descriptor file.


appendAssemblyId

protected boolean appendAssemblyId
Set to false to exclude the assembly id from the assembly final name.


filters

protected java.util.List filters
Constructor Detail

AbstractAssemblyMojo

public AbstractAssemblyMojo()
Method Detail

execute

public void execute()
             throws org.apache.maven.plugin.MojoExecutionException,
                    org.apache.maven.plugin.MojoFailureException
Create the binary distribution.

Throws:
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException

getDistributionName

protected java.lang.String getDistributionName(org.apache.maven.plugins.assembly.model.Assembly assembly)
Get the full name of the distribution artifact

Parameters:
assembly -
Returns:
the distribution name

createArchive

protected java.io.File createArchive(org.codehaus.plexus.archiver.Archiver archiver,
                                     org.apache.maven.plugins.assembly.model.Assembly assembly,
                                     java.lang.String filename)
                              throws org.codehaus.plexus.archiver.ArchiverException,
                                     java.io.IOException,
                                     org.apache.maven.plugin.MojoExecutionException,
                                     org.apache.maven.plugin.MojoFailureException,
                                     org.codehaus.plexus.util.xml.pull.XmlPullParserException,
                                     RepositoryAssemblyException,
                                     org.apache.maven.artifact.InvalidRepositoryException
Throws:
org.codehaus.plexus.archiver.ArchiverException
java.io.IOException
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException
org.codehaus.plexus.util.xml.pull.XmlPullParserException
RepositoryAssemblyException
org.apache.maven.artifact.InvalidRepositoryException

readAssemblies

protected java.util.List readAssemblies()
                                 throws org.apache.maven.plugin.MojoFailureException,
                                        org.apache.maven.plugin.MojoExecutionException,
                                        AssemblyInterpolationException
Throws:
org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoExecutionException
AssemblyInterpolationException

processDependencySets

protected void processDependencySets(org.codehaus.plexus.archiver.Archiver archiver,
                                     java.util.List dependencySets,
                                     boolean includeBaseDirectory)
                              throws org.codehaus.plexus.archiver.ArchiverException,
                                     java.io.IOException,
                                     org.apache.maven.plugin.MojoExecutionException,
                                     org.apache.maven.plugin.MojoFailureException,
                                     org.codehaus.plexus.util.xml.pull.XmlPullParserException
Processes Dependency Sets

Parameters:
archiver -
dependencySets -
includeBaseDirectory -
Throws:
org.codehaus.plexus.archiver.ArchiverException
java.io.IOException
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException
org.codehaus.plexus.util.xml.pull.XmlPullParserException

processFileSets

protected void processFileSets(org.codehaus.plexus.archiver.Archiver archiver,
                               java.util.List fileSets,
                               boolean includeBaseDirecetory)
                        throws org.codehaus.plexus.archiver.ArchiverException,
                               java.io.IOException,
                               org.codehaus.plexus.util.xml.pull.XmlPullParserException
Process Files that will be included in the distribution.

Parameters:
archiver -
fileSets -
includeBaseDirecetory -
Throws:
org.codehaus.plexus.archiver.ArchiverException
java.io.IOException
org.codehaus.plexus.util.xml.pull.XmlPullParserException

processFileList

protected void processFileList(org.codehaus.plexus.archiver.Archiver archiver,
                               java.util.List fileList,
                               boolean includeBaseDirecetory)
                        throws org.codehaus.plexus.archiver.ArchiverException,
                               java.io.IOException,
                               org.apache.maven.plugin.MojoExecutionException
Copy files to the distribution with option to change destination name

Parameters:
archiver -
fileList -
Throws:
org.codehaus.plexus.archiver.ArchiverException
java.io.IOException
org.apache.maven.plugin.MojoExecutionException


Copyright © 2002-2007 Apache Software Foundation. All Rights Reserved.