Package org.springframework.boot.maven
Class PropertiesMergingResourceTransformer
java.lang.Object
org.springframework.boot.maven.PropertiesMergingResourceTransformer
- All Implemented Interfaces:
org.apache.maven.plugins.shade.resource.ReproducibleResourceTransformer
,org.apache.maven.plugins.shade.resource.ResourceTransformer
public class PropertiesMergingResourceTransformer
extends Object
implements org.apache.maven.plugins.shade.resource.ReproducibleResourceTransformer
Extension for the Maven
shade plugin to allow properties files (e.g. META-INF/spring.factories)
to be merged without losing any information.
- Since:
- 1.0.0
- Author:
- Dave Syer, Andy Wilkinson
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
canTransformResource
(String resource) getData()
Return the data the properties being merged.boolean
void
void
processResource
(String resource, InputStream inputStream, List<org.apache.maven.plugins.shade.relocation.Relocator> relocators) Deprecated.void
processResource
(String resource, InputStream inputStream, List<org.apache.maven.plugins.shade.relocation.Relocator> relocators, long time) void
setResource
(String resource)
-
Constructor Details
-
PropertiesMergingResourceTransformer
public PropertiesMergingResourceTransformer()
-
-
Method Details
-
getData
Return the data the properties being merged.- Returns:
- the data
-
canTransformResource
- Specified by:
canTransformResource
in interfaceorg.apache.maven.plugins.shade.resource.ResourceTransformer
-
processResource
@Deprecated(since="2.4.0", forRemoval=false) public void processResource(String resource, InputStream inputStream, List<org.apache.maven.plugins.shade.relocation.Relocator> relocators) throws IOException Deprecated.- Specified by:
processResource
in interfaceorg.apache.maven.plugins.shade.resource.ResourceTransformer
- Throws:
IOException
-
processResource
public void processResource(String resource, InputStream inputStream, List<org.apache.maven.plugins.shade.relocation.Relocator> relocators, long time) throws IOException - Specified by:
processResource
in interfaceorg.apache.maven.plugins.shade.resource.ReproducibleResourceTransformer
- Throws:
IOException
-
hasTransformedResource
public boolean hasTransformedResource()- Specified by:
hasTransformedResource
in interfaceorg.apache.maven.plugins.shade.resource.ResourceTransformer
-
modifyOutputStream
- Specified by:
modifyOutputStream
in interfaceorg.apache.maven.plugins.shade.resource.ResourceTransformer
- Throws:
IOException
-
getResource
-
setResource
-