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.String
buildQualifier
private Interpolator
interpolator
private MavenLogger
logger
private PublisherActionRunner
publisherRunner
private PublishingRepository
publishingRepository
private P2TargetPlatform
targetPlatform
-
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 void
addRootFeatures(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.String
getProductSpecificP2InfName(java.lang.String productFileName)
private static org.eclipse.equinox.internal.p2.publisher.eclipse.IProductDescriptor
loadProductFile(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.IInstallableUnit
selectUnit(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:PublishProductTool
Publishes the given product definition.- Specified by:
publishProduct
in 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)
-
-