org.apache.axiom.buildutils
Class OSGiManifestResourceTransformer

java.lang.Object
  extended by org.apache.axiom.buildutils.OSGiManifestResourceTransformer
All Implemented Interfaces:
org.apache.maven.plugins.shade.resource.ResourceTransformer

public class OSGiManifestResourceTransformer
extends Object
implements org.apache.maven.plugins.shade.resource.ResourceTransformer

Resource transformer that modifies the OSGi metadata in the manifest. It is designed for scenarios where maven-shade-plugin is used to include one or more OSGi bundles into a shaded artifact which is itself an OSGi bundle. It transforms the manifest of the shaded bundle such that:


Constructor Summary
OSGiManifestResourceTransformer()
           
 
Method Summary
 boolean canTransformResource(String resource)
           
 boolean hasTransformedResource()
           
 void modifyOutputStream(JarOutputStream os)
           
 void processResource(String resource, InputStream is, List relocators)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OSGiManifestResourceTransformer

public OSGiManifestResourceTransformer()
Method Detail

canTransformResource

public boolean canTransformResource(String resource)
Specified by:
canTransformResource in interface org.apache.maven.plugins.shade.resource.ResourceTransformer

processResource

public void processResource(String resource,
                            InputStream is,
                            List relocators)
                     throws IOException
Specified by:
processResource in interface org.apache.maven.plugins.shade.resource.ResourceTransformer
Throws:
IOException

hasTransformedResource

public boolean hasTransformedResource()
Specified by:
hasTransformedResource in interface org.apache.maven.plugins.shade.resource.ResourceTransformer

modifyOutputStream

public void modifyOutputStream(JarOutputStream os)
                        throws IOException
Specified by:
modifyOutputStream in interface org.apache.maven.plugins.shade.resource.ResourceTransformer
Throws:
IOException


Copyright © 2004-2012 The Apache Software Foundation. All Rights Reserved.