Class P2GeneratorImpl

    • Field Detail

      • SUPPORTED_TYPES

        private static final java.lang.String[] SUPPORTED_TYPES
      • dependenciesOnly

        private boolean dependenciesOnly
        Whether we need full p2 metadata (false) or just required capabilities.
    • Constructor Detail

      • P2GeneratorImpl

        public P2GeneratorImpl​(boolean dependenciesOnly)
      • P2GeneratorImpl

        public P2GeneratorImpl()
    • Method Detail

      • generateMetadata

        public java.util.Map<java.lang.String,​IP2Artifact> generateMetadata​(java.util.List<IArtifactFacade> artifacts,
                                                                                  PublisherOptions options,
                                                                                  java.io.File targetDir)
                                                                           throws java.io.IOException
        Specified by:
        generateMetadata in interface P2Generator
        targetDir - location to store artifacts created during meta data generation (e.g. root file zip)
        Throws:
        java.io.IOException
      • getPackedArtifactDescriptor

        private org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor getPackedArtifactDescriptor​(java.util.Set<org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor> artifactDescriptors)
      • getCanonicalArtifact

        private org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor getCanonicalArtifact​(java.lang.String classifier,
                                                                                                    java.util.Set<org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor> artifactDescriptors)
      • eq

        private static <T> boolean eq​(T a,
                                      T b)
      • persistMetadata

        public void persistMetadata​(java.util.Map<java.lang.String,​IP2Artifact> metadata,
                                    java.io.File unitsXml,
                                    java.io.File artifactsXml)
                             throws java.io.IOException
        Specified by:
        persistMetadata in interface P2Generator
        Throws:
        java.io.IOException
      • isSupported

        public boolean isSupported​(java.lang.String type)
      • getProductFiles

        private java.util.List<java.io.File> getProductFiles​(java.io.File projectLocation)
        Looks for all files at the base of the project that extension is ".product" Duplicated in the EclipseRepositoryProject
        Parameters:
        projectLocation -
        Returns:
        The list of product files to parse for an eclipse-repository project
      • getCategoryFiles

        private java.util.List<java.io.File> getCategoryFiles​(java.io.File projectLocation)