Class TychoBundleMapping

  • All Implemented Interfaces:
    org.apache.maven.model.io.ModelReader, org.sonatype.maven.polyglot.mapping.Mapping

    @Component(role=org.sonatype.maven.polyglot.mapping.Mapping.class,
               hint="eclipse-plugin")
    public class TychoBundleMapping
    extends AbstractTychoMapping
    • Constructor Detail

      • TychoBundleMapping

        public TychoBundleMapping()
    • Method Detail

      • initModel

        protected void initModel​(org.apache.maven.model.Model model,
                                 java.io.Reader artifactReader,
                                 java.io.File artifactFile)
                          throws org.apache.maven.model.io.ModelParseException,
                                 java.io.IOException
        Specified by:
        initModel in class AbstractTychoMapping
        Throws:
        org.apache.maven.model.io.ModelParseException
        java.io.IOException
      • readManifestHeaders

        private java.util.jar.Attributes readManifestHeaders​(java.io.File manifestFile)
                                                      throws java.io.IOException
        Throws:
        java.io.IOException
      • getBundleSymbolicName

        private java.lang.String getBundleSymbolicName​(java.util.jar.Attributes headers,
                                                       java.io.File manifestFile)
                                                throws org.apache.maven.model.io.ModelParseException
        Throws:
        org.apache.maven.model.io.ModelParseException
      • getRequiredHeaderValue

        private java.lang.String getRequiredHeaderValue​(java.lang.String headerKey,
                                                        java.util.jar.Attributes headers,
                                                        java.io.File manifestFile)
                                                 throws org.apache.maven.model.io.ModelParseException
        Throws:
        org.apache.maven.model.io.ModelParseException
      • isTestBundle

        private boolean isTestBundle​(java.lang.String bundleSymbolicName,
                                     java.util.jar.Attributes manifestHeaders,
                                     java.io.File bundleRoot)
                              throws java.io.IOException
        Throws:
        java.io.IOException
      • getManifestAttributeValue

        private static java.lang.String getManifestAttributeValue​(java.util.jar.Attributes headers,
                                                                  java.lang.String attributeName,
                                                                  java.io.File manifestFile)
                                                           throws java.io.IOException
        Throws:
        java.io.IOException