public class JomcContainerDescriptorHandler extends org.codehaus.plexus.logging.AbstractLogEnabled implements ContainerDescriptorHandler
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.3.xsd</modletSchemaSystemId> </configuration> </containerDescriptorHandler>
|
Constructor and Description |
---|
JomcContainerDescriptorHandler()
Creates a new
JomcContainerDescriptorHandler instance. |
Modifier and Type | Method and Description |
---|---|
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) |
public JomcContainerDescriptorHandler()
JomcContainerDescriptorHandler
instance.public void finalizeArchiveCreation(org.codehaus.plexus.archiver.Archiver archiver) throws org.codehaus.plexus.archiver.ArchiverException
finalizeArchiveCreation
in interface org.codehaus.plexus.archiver.ArchiveFinalizer
org.codehaus.plexus.archiver.ArchiverException
public void finalizeArchiveExtraction(org.codehaus.plexus.archiver.UnArchiver unarchiver) throws org.codehaus.plexus.archiver.ArchiverException
finalizeArchiveExtraction
in interface org.codehaus.plexus.archiver.ArchiveFinalizer
org.codehaus.plexus.archiver.ArchiverException
public List<String> getVirtualFiles()
getVirtualFiles
in interface org.codehaus.plexus.archiver.ArchiveFinalizer
public boolean isSelected(org.codehaus.plexus.components.io.fileselectors.FileInfo fileInfo) throws IOException
isSelected
in interface org.codehaus.plexus.components.io.fileselectors.FileSelector
IOException
protected URL getResource(String location) throws IOException
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.
location
- The location to create an URL
from.URL
for location
.NullPointerException
- if location
is null
.IOException
- if creating an URL fails.Copyright © 2005-2013 The JOMC Project. All Rights Reserved.