org.apache.maven.plugin.assembly.io
Class DefaultAssemblyReader

java.lang.Object
  extended by org.codehaus.plexus.logging.AbstractLogEnabled
      extended by org.apache.maven.plugin.assembly.io.DefaultAssemblyReader
All Implemented Interfaces:
AssemblyReader, org.codehaus.plexus.logging.LogEnabled

public class DefaultAssemblyReader
extends org.codehaus.plexus.logging.AbstractLogEnabled
implements AssemblyReader


Constructor Summary
DefaultAssemblyReader()
           
 
Method Summary
 Assembly getAssemblyForDescriptorReference(java.lang.String ref, AssemblerConfigurationSource configSource)
           
 Assembly getAssemblyFromDescriptorFile(java.io.File file, AssemblerConfigurationSource configSource)
           
protected  Component getComponentFromFile(java.lang.String filePath, AssemblerConfigurationSource configSource)
          Load the Component via a given file path relative to ${basedir}
protected  org.codehaus.plexus.logging.Logger getLogger()
           
 void includeSiteInAssembly(Assembly assembly, AssemblerConfigurationSource configSource)
           
protected  void mergeComponentsWithMainAssembly(Assembly assembly, AssemblerConfigurationSource configSource)
          Add the contents of all included components to main assembly
protected  void mergeComponentWithAssembly(Component component, Assembly assembly)
          Add the content of a single Component to main assembly
 java.util.List readAssemblies(AssemblerConfigurationSource configSource)
           
 Assembly readAssembly(java.io.Reader reader, java.lang.String locationDescription, AssemblerConfigurationSource configSource)
           
protected  Component readComponent(java.io.Reader reader)
          Load the Component via a Reader
 
Methods inherited from class org.codehaus.plexus.logging.AbstractLogEnabled
enableLogging, setupLogger, setupLogger, setupLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultAssemblyReader

public DefaultAssemblyReader()
Method Detail

readAssemblies

public java.util.List readAssemblies(AssemblerConfigurationSource configSource)
                              throws AssemblyReadException,
                                     InvalidAssemblerConfigurationException
Specified by:
readAssemblies in interface AssemblyReader
Throws:
AssemblyReadException
InvalidAssemblerConfigurationException

getAssemblyForDescriptorReference

public Assembly getAssemblyForDescriptorReference(java.lang.String ref,
                                                  AssemblerConfigurationSource configSource)
                                           throws AssemblyReadException,
                                                  InvalidAssemblerConfigurationException
Specified by:
getAssemblyForDescriptorReference in interface AssemblyReader
Throws:
AssemblyReadException
InvalidAssemblerConfigurationException

getAssemblyFromDescriptorFile

public Assembly getAssemblyFromDescriptorFile(java.io.File file,
                                              AssemblerConfigurationSource configSource)
                                       throws AssemblyReadException,
                                              InvalidAssemblerConfigurationException
Specified by:
getAssemblyFromDescriptorFile in interface AssemblyReader
Throws:
AssemblyReadException
InvalidAssemblerConfigurationException

readAssembly

public Assembly readAssembly(java.io.Reader reader,
                             java.lang.String locationDescription,
                             AssemblerConfigurationSource configSource)
                      throws AssemblyReadException,
                             InvalidAssemblerConfigurationException
Specified by:
readAssembly in interface AssemblyReader
Throws:
AssemblyReadException
InvalidAssemblerConfigurationException

mergeComponentsWithMainAssembly

protected void mergeComponentsWithMainAssembly(Assembly assembly,
                                               AssemblerConfigurationSource configSource)
                                        throws AssemblyReadException
Add the contents of all included components to main assembly

Parameters:
assembly -
Throws:
AssemblyReadException
org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoExecutionException

mergeComponentWithAssembly

protected void mergeComponentWithAssembly(Component component,
                                          Assembly assembly)
Add the content of a single Component to main assembly

Parameters:
component -
assembly -

getComponentFromFile

protected Component getComponentFromFile(java.lang.String filePath,
                                         AssemblerConfigurationSource configSource)
                                  throws AssemblyReadException
Load the Component via a given file path relative to ${basedir}

Parameters:
filePath -
Returns:
Throws:
AssemblyReadException
org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoExecutionException

readComponent

protected Component readComponent(java.io.Reader reader)
                           throws AssemblyReadException
Load the Component via a Reader

Parameters:
reader -
Throws:
AssemblyReadException

includeSiteInAssembly

public void includeSiteInAssembly(Assembly assembly,
                                  AssemblerConfigurationSource configSource)
                           throws InvalidAssemblerConfigurationException
Specified by:
includeSiteInAssembly in interface AssemblyReader
Throws:
InvalidAssemblerConfigurationException

getLogger

protected org.codehaus.plexus.logging.Logger getLogger()
Overrides:
getLogger in class org.codehaus.plexus.logging.AbstractLogEnabled


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