Class PublishProductToolImpl
- java.lang.Object
-
- org.eclipse.tycho.p2.tools.publisher.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.
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.StringbuildQualifierprivate Interpolatorinterpolatorprivate MavenLoggerloggerprivate PublisherActionRunnerpublisherRunnerprivate PublishingRepositorypublishingRepositoryprivate P2TargetPlatformtargetPlatform
-
Constructor Summary
Constructors Constructor Description PublishProductToolImpl(PublisherActionRunner publisherRunner, PublishingRepository publishingRepository, P2TargetPlatform targetPlatform, java.lang.String buildQualifier, Interpolator interpolator, MavenLogger logger)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static voidaddRootFeatures(ExpandedProduct product, java.util.List<DependencySeed> seeds)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 seeProductAction.createAdviceFileAdvice()), we allow a "xx.p2.inf" next to a product file "xx.product".private static java.lang.StringgetProductSpecificP2InfName(java.lang.String productFileName)private static org.eclipse.equinox.internal.p2.publisher.eclipse.IProductDescriptorloadProductFile(java.io.File productFile)java.util.List<DependencySeed>publishProduct(java.io.File productFile, java.io.File launcherBinaries, java.lang.String flavor)Publishes the given product definition.private static org.eclipse.equinox.p2.metadata.IInstallableUnitselectUnit(java.util.Collection<org.eclipse.equinox.p2.metadata.IInstallableUnit> units, java.lang.String id)
-
-
-
Field Detail
-
targetPlatform
private final P2TargetPlatform targetPlatform
-
publisherRunner
private final PublisherActionRunner publisherRunner
-
publishingRepository
private final PublishingRepository publishingRepository
-
buildQualifier
private final java.lang.String buildQualifier
-
interpolator
private final Interpolator interpolator
-
logger
private final MavenLogger logger
-
-
Constructor Detail
-
PublishProductToolImpl
public PublishProductToolImpl(PublisherActionRunner publisherRunner, PublishingRepository publishingRepository, P2TargetPlatform targetPlatform, java.lang.String buildQualifier, Interpolator interpolator, MavenLogger logger)
-
-
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:PublishProductToolPublishes the given product definition.- Specified by:
publishProductin interfacePublishProductTool- Parameters:
productFile- A .product file as defined by the Eclipse PDElauncherBinaries- A folder that contains the native Eclipse launcher binariesflavor- 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 seeProductAction.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)
-
addRootFeatures
private static void addRootFeatures(ExpandedProduct product, java.util.List<DependencySeed> seeds)
-
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)
-
-