org.jomc.mojo
Class JomcContainerDescriptorHandler

Package class diagram package JomcContainerDescriptorHandler
java.lang.Object
  extended by org.codehaus.plexus.logging.AbstractLogEnabled
      extended by org.jomc.mojo.JomcContainerDescriptorHandler
All Implemented Interfaces:
ContainerDescriptorHandler, org.codehaus.plexus.archiver.ArchiveFinalizer, org.codehaus.plexus.components.io.fileselectors.FileSelector, org.codehaus.plexus.logging.LogEnabled

public class JomcContainerDescriptorHandler
extends org.codehaus.plexus.logging.AbstractLogEnabled
implements ContainerDescriptorHandler

Maven Assembly Plugin ContainerDescriptorHandler implementation for assembling JOMC resources.

Maven Assembly Plugin Usage

 <containerDescriptorHandler>
   <handlerName>JOMC</handlerName>
   <configuration>
     <model>http://jomc.org/model</model>
     <modelContextFactoryClassName>class name</modelContextFactoryClassName>
     <modelContextAttributes>
       <modelContextAttribute>
         <key>The name of the attribute</key>
         <value>The name of the attribute</value>
         <type>The name of the class of the object.</type>
       </modelContextAttribute>
     </modelContextAttributes/>
     <moduleEncoding>${project.build.sourceEncoding}</moduleEncoding>
     <moduleName>${project.name}</moduleName>
     <moduleVersion>${project.version}</moduleVersion>
     <moduleVendor>${project.organization.name}</moduleVendor>
     <moduleResource>META-INF/custom-jomc.xml</moduleResource>
     <moduleResources>
       <moduleResource>META-INF/jomc.xml</moduleResource>
     </moduleResources>
     <moduleIncludes>
       <moduleInclude>module name</moduleInclude>
     </moduleIncludes>
     <moduleExcludes>
       <moduleExclude>module name</moduleExclude>
     </moduleExcludes>
     <modletEncoding>${project.build.sourceEncoding}</modletEncoding>
     <modletName>${project.name}</modletName>
     <modletVersion>${project.version}</modletVersion>
     <modletVendor>${project.organization.name}</modletVendor>
     <modletResource>META-INF/custom-jomc-modlet.xml</modletResource>
     <modletResources>
       <modletResource>META-INF/jomc-modlet.xml</modletResource>
     </modletResources>
     <modletIncludes>
       <modletInclude>modlet name</modletInclude>
     </modletIncludes>
     <modletExcludes>
       <modletExclude>modlet name</modletExclude>
     </modletExcludes>
     <modelObjectStylesheet>Location of a XSLT document to use for transforming the merged model document.</modelObjectStylesheet>
     <modletObjectStylesheet>Location of a XSLT document to use for transforming the merged modlet document.</modletObjectStylesheet>
     <providerLocation>META-INF/custom-services</providerLocation>
     <platformProviderLocation>${java.home}/jre/lib/custom-jomc.properties</platformProviderLocation>
     <modletLocation>META-INF/custom-jomc-modlet.xml</modletLocation>
     <modletSchemaSystemId>http://custom.host.tld/custom/path/jomc-modlet-1.2.xsd</modletSchemaSystemId>
   </configuration>
 </containerDescriptorHandler>
 

Since:
1.2
Version:
$JOMC: JomcContainerDescriptorHandler.java 4200 2012-01-25 09:46:13Z schulte2005 $
Author:
Christian Schulte
Plexus component:
role:
"org.apache.maven.plugin.assembly.filter.ContainerDescriptorHandler"
role-hint:
"JOMC"

Field Summary
 
Fields inherited from interface org.codehaus.plexus.components.io.fileselectors.FileSelector
DEFAULT_ROLE_HINT, ROLE
 
Constructor Summary
JomcContainerDescriptorHandler()
          Creates a new JomcContainerDescriptorHandler instance.
 
Method Summary
 void finalizeArchiveCreation(org.codehaus.plexus.archiver.Archiver archiver)
           
 void finalizeArchiveExtraction(org.codehaus.plexus.archiver.UnArchiver unarchiver)
           
protected  URL getResource(String location)
          Creates an URL for a given resource location.
 List<String> getVirtualFiles()
           
 boolean isSelected(org.codehaus.plexus.components.io.fileselectors.FileInfo fileInfo)
           
 
Methods inherited from class org.codehaus.plexus.logging.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JomcContainerDescriptorHandler

public JomcContainerDescriptorHandler()
Creates a new JomcContainerDescriptorHandler instance.

Method Detail

finalizeArchiveCreation

public void finalizeArchiveCreation(org.codehaus.plexus.archiver.Archiver archiver)
                             throws org.codehaus.plexus.archiver.ArchiverException
Specified by:
finalizeArchiveCreation in interface org.codehaus.plexus.archiver.ArchiveFinalizer
Throws:
org.codehaus.plexus.archiver.ArchiverException

finalizeArchiveExtraction

public void finalizeArchiveExtraction(org.codehaus.plexus.archiver.UnArchiver unarchiver)
                               throws org.codehaus.plexus.archiver.ArchiverException
Specified by:
finalizeArchiveExtraction in interface org.codehaus.plexus.archiver.ArchiveFinalizer
Throws:
org.codehaus.plexus.archiver.ArchiverException

getVirtualFiles

public List<String> getVirtualFiles()
Specified by:
getVirtualFiles in interface org.codehaus.plexus.archiver.ArchiveFinalizer

isSelected

public boolean isSelected(org.codehaus.plexus.components.io.fileselectors.FileInfo fileInfo)
                   throws IOException
Specified by:
isSelected in interface org.codehaus.plexus.components.io.fileselectors.FileSelector
Throws:
IOException

getResource

protected URL getResource(String location)
                   throws IOException
Creates an URL for a given resource location.

This method first searches the class loader of the class for a single resource matching location. If such a resource is found, the URL of that resource is returned. If no such resource is found, an attempt is made to parse the given location to an URL. On successful parsing, that URL is returned. Failing that, the given location is interpreted as a file name. If that file is found, the URL of that file is returned. Otherwise an IOException is thrown.

Parameters:
location - The location to create an URL from.
Returns:
An URL for location.
Throws:
NullPointerException - if location is null.
IOException - if creating an URL fails.


Copyright © 2005-2012 The JOMC Project. All Rights Reserved.Get JOMC at SourceForge.net. Fast, secure and Free Open Source software downloads
Please note that this documentation is maintained by non-native english speaking authors. As such, you may encounter phrases or wordings which seem imprecise or may even have a totally different meaning to native english speaking readers than what the individual author was trying to express. If you are a native english speaking reader and find any such phrases or wordings we kindly ask you to send an email to the corresponding author and help us improve this documentation in order to avoid misunderstandings. You will find the authors' email addresses at the top of each class. Please accept our apologies for any inconvenience caused.