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 Details

    • PropertiesMergingResourceTransformer

      public PropertiesMergingResourceTransformer()
  • Method Details

    • getData

      public Properties getData()
      Return the data the properties being merged.
      Returns:
      the data
    • canTransformResource

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

      @Deprecated public void processResource(String resource, InputStream inputStream, List<org.apache.maven.plugins.shade.relocation.Relocator> relocators) throws IOException
      Deprecated.
      Specified by:
      processResource in interface org.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 interface org.apache.maven.plugins.shade.resource.ReproducibleResourceTransformer
      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
    • getResource

      public String getResource()
    • setResource

      public void setResource(String resource)