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

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

public class ServicesResourceTransformer
extends Object
implements ResourceTransformer

Resources transformer that appends entries in META-INF/services resources into a single resource. For example, if there are several META-INF/services/org.apache.maven.project.ProjectBuilder resources spread across many JARs the individual entries will all be concatenated into a single META-INF/services/org.apache.maven.project.ProjectBuilder resource packaged into the resultant JAR produced by the shading process.

Author:
jvanzyl

Constructor Summary
ServicesResourceTransformer()
           
 
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

ServicesResourceTransformer

public ServicesResourceTransformer()
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.