Class ApacheLicenseResourceTransformer
- java.lang.Object
-
- org.apache.maven.plugins.shade.resource.ApacheLicenseResourceTransformer
-
- All Implemented Interfaces:
ResourceTransformer
public class ApacheLicenseResourceTransformer extends java.lang.Object implements ResourceTransformer
Prevents duplicate copies of the license
-
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.String
LICENSE_PATH
private static java.lang.String
LICENSE_TXT_PATH
-
Constructor Summary
Constructors Constructor Description ApacheLicenseResourceTransformer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canTransformResource(java.lang.String resource)
boolean
hasTransformedResource()
void
modifyOutputStream(java.util.jar.JarOutputStream os)
void
processResource(java.lang.String resource, java.io.InputStream is, java.util.List<Relocator> relocators)
Transform an individual resource
-
-
-
Field Detail
-
LICENSE_PATH
private static final java.lang.String LICENSE_PATH
- See Also:
- Constant Field Values
-
LICENSE_TXT_PATH
private static final java.lang.String LICENSE_TXT_PATH
- See Also:
- Constant Field Values
-
-
Method Detail
-
canTransformResource
public boolean canTransformResource(java.lang.String resource)
- Specified by:
canTransformResource
in interfaceResourceTransformer
-
processResource
public void processResource(java.lang.String resource, java.io.InputStream is, java.util.List<Relocator> relocators) throws java.io.IOException
Description copied from interface:ResourceTransformer
Transform an individual resource- Specified by:
processResource
in interfaceResourceTransformer
- Parameters:
resource
- The resoure nameis
- An input stream for the resource, the implementation should *not* close this streamrelocators
- A list of relocators- Throws:
java.io.IOException
- When the IO blows up
-
hasTransformedResource
public boolean hasTransformedResource()
- Specified by:
hasTransformedResource
in interfaceResourceTransformer
-
modifyOutputStream
public void modifyOutputStream(java.util.jar.JarOutputStream os) throws java.io.IOException
- Specified by:
modifyOutputStream
in interfaceResourceTransformer
- Throws:
java.io.IOException
-
-