org.apache.maven.plugins.shade.resource
Class ManifestResourceTransformer

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

public class ManifestResourceTransformer
extends Object
implements ResourceTransformer

A resource processor that allows the arbitrary addition of attributes to the first MANIFEST.MF that is found in the set of JARs being processed, or to a newly created manifest for the shaded JAR.

Since:
1.2
Author:
Jason van Zyl

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

Constructor Detail

ManifestResourceTransformer

public ManifestResourceTransformer()
Method Detail

canTransformResource

public boolean canTransformResource(String resource)
Specified by:
canTransformResource in interface ResourceTransformer

processResource

public void processResource(String resource,
                            InputStream is,
                            List<Relocator> relocators)
                     throws IOException
Specified by:
processResource in interface ResourceTransformer
Throws:
IOException

hasTransformedResource

public boolean hasTransformedResource()
Specified by:
hasTransformedResource in interface ResourceTransformer

modifyOutputStream

public void modifyOutputStream(JarOutputStream jos)
                        throws IOException
Specified by:
modifyOutputStream in interface ResourceTransformer
Throws:
IOException


Copyright © 2002–2014 The Apache Software Foundation. All rights reserved.