Class PluginXmlResourceTransformer

java.lang.Object
org.apache.maven.plugins.shade.resource.AbstractCompatibilityTransformer
org.apache.maven.plugins.shade.resource.PluginXmlResourceTransformer
All Implemented Interfaces:
ReproducibleResourceTransformer, ResourceTransformer

public class PluginXmlResourceTransformer extends AbstractCompatibilityTransformer
A resource processor that aggregates Maven plugin.xml files.
Since:
3.0
  • Field Details

    • mojos

      private List<org.codehaus.plexus.util.xml.Xpp3Dom> mojos
    • time

      private long time
    • PLUGIN_XML_PATH

      public static final String PLUGIN_XML_PATH
      See Also:
  • Constructor Details

    • PluginXmlResourceTransformer

      public PluginXmlResourceTransformer()
  • Method Details

    • canTransformResource

      public boolean canTransformResource(String resource)
    • processResource

      public void processResource(String resource, InputStream is, List<Relocator> relocators, long time) throws IOException
      Description copied from interface: ReproducibleResourceTransformer
      Transform an individual resource
      Parameters:
      resource - The resource name
      is - An input stream for the resource, the implementation should *not* close this stream
      relocators - A list of relocators
      time - the time of the resource to process
      Throws:
      IOException - When the IO blows up
    • modifyOutputStream

      public void modifyOutputStream(JarOutputStream jos) throws IOException
      Throws:
      IOException
    • hasTransformedResource

      public boolean hasTransformedResource()
    • getTransformedResource

      byte[] getTransformedResource() throws IOException
      Throws:
      IOException
    • getRelocatedClass

      private String getRelocatedClass(String className, List<Relocator> relocators)
    • getValue

      private static String getValue(org.codehaus.plexus.util.xml.Xpp3Dom dom, String element)
    • setValue

      private static void setValue(org.codehaus.plexus.util.xml.Xpp3Dom dom, String element, String value)
    • getAttribute

      private static String getAttribute(org.codehaus.plexus.util.xml.Xpp3Dom dom, String attribute)
    • setAttribute

      private static void setAttribute(org.codehaus.plexus.util.xml.Xpp3Dom dom, String attribute, String value)