Class PluginXmlResourceTransformer

  • All Implemented Interfaces:
    ResourceTransformer

    public class PluginXmlResourceTransformer
    extends java.lang.Object
    implements ResourceTransformer
    A resource processor that aggregates Maven plugin.xml files.
    Since:
    3.0
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.List<org.codehaus.plexus.util.xml.Xpp3Dom> mojos  
      static java.lang.String PLUGIN_XML_PATH  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean canTransformResource​(java.lang.String resource)  
      private static java.lang.String getAttribute​(org.codehaus.plexus.util.xml.Xpp3Dom dom, java.lang.String attribute)  
      private java.lang.String getRelocatedClass​(java.lang.String className, java.util.List<Relocator> relocators)  
      (package private) byte[] getTransformedResource()  
      private static java.lang.String getValue​(org.codehaus.plexus.util.xml.Xpp3Dom dom, java.lang.String element)  
      boolean hasTransformedResource()  
      void modifyOutputStream​(java.util.jar.JarOutputStream jos)  
      void processResource​(java.lang.String resource, java.io.InputStream is, java.util.List<Relocator> relocators)
      Transform an individual resource
      private static void setAttribute​(org.codehaus.plexus.util.xml.Xpp3Dom dom, java.lang.String attribute, java.lang.String value)  
      private static void setValue​(org.codehaus.plexus.util.xml.Xpp3Dom dom, java.lang.String element, java.lang.String value)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • mojos

        private java.util.List<org.codehaus.plexus.util.xml.Xpp3Dom> mojos
    • Constructor Detail

      • PluginXmlResourceTransformer

        public PluginXmlResourceTransformer()
    • Method Detail

      • 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 interface ResourceTransformer
        Parameters:
        resource - The resoure name
        is - An input stream for the resource, the implementation should *not* close this stream
        relocators - A list of relocators
        Throws:
        java.io.IOException - When the IO blows up
      • modifyOutputStream

        public void modifyOutputStream​(java.util.jar.JarOutputStream jos)
                                throws java.io.IOException
        Specified by:
        modifyOutputStream in interface ResourceTransformer
        Throws:
        java.io.IOException
      • getTransformedResource

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

        private java.lang.String getRelocatedClass​(java.lang.String className,
                                                   java.util.List<Relocator> relocators)
      • getValue

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

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

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

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