Class PublishProductToolImpl

  • All Implemented Interfaces:
    PublishProductTool

    public class PublishProductToolImpl
    extends java.lang.Object
    implements PublishProductTool
    Tool for transforming product definition source files into p2 metadata and artifacts. Includes more steps than classic publisher would do, e.g. qualifier expansion.
    • Method Detail

      • publishProduct

        public java.util.List<DependencySeed> publishProduct​(java.io.File productFile,
                                                             java.io.File launcherBinaries,
                                                             java.lang.String flavor)
                                                      throws java.lang.IllegalArgumentException
        Description copied from interface: PublishProductTool
        Publishes the given product definition.
        Specified by:
        publishProduct in interface PublishProductTool
        Parameters:
        productFile - A .product file as defined by the Eclipse PDE
        launcherBinaries - A folder that contains the native Eclipse launcher binaries
        flavor - The installation flavor the product shall be published for
        Returns:
        a handles to the published product IU
        Throws:
        java.lang.IllegalArgumentException
      • getProductSpecificAdviceFileAdvice

        private static org.eclipse.equinox.p2.publisher.IPublisherAdvice[] getProductSpecificAdviceFileAdvice​(java.io.File productFile,
                                                                                                              org.eclipse.equinox.internal.p2.publisher.eclipse.IProductDescriptor expandedProduct)
        In addition to the p2.inf file in the project root (which is automatically picked up by p2, see see ProductAction.createAdviceFileAdvice()), we allow a "xx.p2.inf" next to a product file "xx.product".
      • getProductSpecificP2InfName

        private static java.lang.String getProductSpecificP2InfName​(java.lang.String productFileName)
      • loadProductFile

        private static org.eclipse.equinox.internal.p2.publisher.eclipse.IProductDescriptor loadProductFile​(java.io.File productFile)
                                                                                                     throws java.lang.IllegalArgumentException
        Throws:
        java.lang.IllegalArgumentException
      • selectUnit

        private static org.eclipse.equinox.p2.metadata.IInstallableUnit selectUnit​(java.util.Collection<org.eclipse.equinox.p2.metadata.IInstallableUnit> units,
                                                                                   java.lang.String id)